WWW::Splunk::API - Splunk REST client
WWW::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.
A constructor.
my $splunk = WWW::Splunk::API->new({ host => $host, port => $port, login => $login, password => $password, unsafe_ssl => 0, verbose => 0, });
Default values are: - port - 8089 - host - localhost - url - https://$host:$port - verbose - 0 - unsafe_ssl - 0 - service_prefix - /services - search - 1
Wrapper around HTTP::Request::Common::DELETE().
Wrapper around HTTP::Request::Common::POST().
Wrapper around HTTP::Request::Common::GET().
Wrapper around HTTP::Request::Common::HEAD(). Not used anywhere in splunk API
Wrapper around HTTP::Request::Common::PUT(). Not used anywhere in splunk API
Request a Splunk api and deal with the results.
Method can be either a HTTP::Request instance (see HTTP::Request::Common for useful ones), or a plain string, such as "GET" or "DELETE."
Optional data is has reference gets serialized into a request body for POST request. Use undef in case you don't have any data to send, but need to specify a callback function in subsequent argument.
Call-back function can be specified for a single special case, where a XML stream of <results> elements is expected.
WWW::Splunk, sc
Lubomir Rintel, <lkundrak@v3.sk>, Michal Josef Špaček <skim@cpan.org>
The code is hosted on GitHub http://github.com/michal-josef-spacek/perl-WWW-Splunk. Bug fixes and feature enhancements are always welcome.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.
To install WWW::Splunk, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Splunk
CPAN shell
perl -MCPAN -e shell install WWW::Splunk
For more information on module installation, please visit the detailed CPAN module installation guide.