The London Perl and Raku Workshop takes place on 26th Oct 2024. If your company depends on Perl, please consider sponsoring and/or attending.

NAME

Net::Splunk::API - Splunk REST client

DESCRIPTION

Net::Splunk::API is a low-level interface to Splunk log search engine. It deals with HTTP communication as well as working around certain interface glitches.

See http://www.splunk.com/base/Documentation/latest/Developer/RESTSearch for API definition.

This module is designed to be Splunk API version agnostic.

Please consider this an alpha quality code, whose API can change at any time, until we reach version 2.0. There are known glitches in the code quality now. Remember the code is the best documentation for now.

new (params)

A constructor.

  my $splunk = new Net::Splunk::API ({
          host    => $host,
          port    => $port,
          login   => $login,
          password => $password,
          unsafe_ssl => 0,
  });

parse_csv (string)

Make the splunk-produced CSV into a hash or an array of hashes.

delete (parameters)

Wrapper around HTTP::Request::Common::DELETE ().

post (parameters)

Wrapper around HTTP::Request::Common::POST ().

get (parameters)

Wrapper around HTTP::Request::Common::GET ().

head (parameters)

Wrapper around HTTP::Request::Common::HEAD (). Not used anywhere in splunk API

put (parameters)

Wrapper around HTTP::Request::Common::PUT (). Not used anywhere in splunk API

request (method, location)

Request a Splunk api and deal with the results.

SEE ALSO

Net::Splunk, sc

AUTHORS

Lubomir Rintel, <lkundrak@v3.sk>

The code is hosted on GitHub http://github.com/lkundrak/perl-Net-Splunk. Bug fixes and feature enhancements are always welcome.