This is a Splunk modular input add-on for polling REST APIs.
You require an activation key to use this App. Visit http://www.baboonbones.com/#activation to obtain a non-expiring key
The following authentication mechanisms are supported:
You can provide your own custom Authentication Handler. This is a Python class that you should add to the rest_ta/bin/authhandlers.py module.
http://docs.python-requests.org/en/latest/user/advanced/#custom-authentication
You can then declare this class name and any parameters in the REST Input setup page.
You can provide your own custom Response Handler. This is a Python class that you should add to the rest_ta/bin/responsehandlers.py module.
You can then declare this class name and any parameters in the REST Input setup page.
There is support for dynamic token substitution in the endpoint URL
ie : /someurl/foo/$sometoken$/goo
$sometoken$ will get substituted with the output of the 'sometoken' function in bin/tokens.py
So you can add you own tokens simply by adding a function to bin/tokens.py
Currenty there is 1 token implemented , $datetoday$ , which will resolve to today's date in format "2014-02-18"
Token replacement functions in the URL can also return a list of values, that will cause
multiple URL's to be formed and the requests for these URL's will be executed in parallel in multiple threads.
Settings -- Data Inputs -- REST to add a new Input stanza via the UIREADME/inputs.conf.spec. The inputs.conf file should be placed in a local directory under an App or User context.Any log entries/errors will get written to $SPLUNK_HOME/var/log/splunk/splunkd.log
These are also searchable in Splunk : index=_internal error rest.py
added client certificate config options
updated docs
added trial key functionality
added a triggers stanza to app.conf to prevent reloading after saving state back to inputs.conf
Patched a bug to callbacks to Splunk for persisting state that required the activation key in the payload
minor manager xml ui tweak for 7.1
Corrected a build bug with responsehandlers
Added an activation key requirement , visit http://www.baboonbones.com/#activation to obtain a free,non-expiring key
Added support for HEAD requests
Docs updated
Splunk 7.1 compatible
Delimiter fix
Can now declare a CRON pattern for your polling interval.
Multiple requests spawned by tokenization can be declared to run in parallel or sequentially.
Multiple sequential requests can optionally have a stagger time enforced between each request.
Minor code fix for a logging statement error
Added support for token replacement functions in the URL to be able to return a list
of values, that will cause multiple URL's to be formed and the requests for these
URL's will be executed in parallel in multiple threads. See tokens.py
Added a custom response handler for rolling out generic JSON arrays
Refactored key=value delimited string handling to only split on the first "=" delimiter
Ensure that token substitution in the endpoint URL is dynamically applied for each
HTTP request
Added support for dynamic token substitution in the endpoint URL
ie : /someurl/foo/$sometoken$/goo
$sometoken$ will get substituted with the output of the 'sometoken' function
in bin/tokens.py
Currently have just shipped with 1 example token $datetoday$ which will dynamically resolve to today's date in format 2014-02-18
Added support for sending and persisting cookies
Changed the logic for persistence of state back to inputs.conf to occur directly after polling/event indexing has completed rather than waiting for the polling loop frequency sleep period to exit. This potentially deals with situations where you might terminate Splunk before the REST Mod Input has persisted state changes back to inputs.conf because it was in a sleep loop during shutdown.
Cosmetic fix for 1.3 release
Added a new feature that will automatically persist updates to URL Arguments , HTTP Header Propertys or HTTP Request Body content back to your inputs.conf stanza. Such a scenario might occur if you are using a custom response handler to dynamically calculate URL Arguments , such as a timestamp or event paging cursor, and you want this latest state to be persisted back into your configuration so that if you need to restart the REST input , it's configuration is in the latest polled state and can resume polling from where it left off.
Upgraded underlying python requests library to version 2.0 , primarily to support the HTTP CONNECT verb
Added support for user defined delimiter for multiple "key=value" fields .
Added hooks in responsehandlers.py for custom handling of responses, use cases such as URL arguments/HTTP header properties that might require a dynamic value per request , HTTP REL Header link following , dynamically changing the endpoint URL.
Strip newlines from default output ++ add unbroken attribute to XML output stream so that Splunk props /transforms can be applied
Added more robust exception handling
Fixed minor script bug when printing http errors
Added support for POST and PUT HTTP Methods for getting data. Not RESTful per say but a useful out for API's that are "REST like"
Renamed the manager xml file to avoid naming clashes
Fixed some spelling typos
First release
Splunk AppInspect evaluates Splunk apps against a set of Splunk-defined criteria to assess the validity and security of an app package and components.
As a Splunkbase app developer, you will have access to all Splunk development resources and receive a 10GB license to build an app that will help solve use cases for customers all over the world. Splunkbase has 1000+ apps and add-ons from Splunk, our partners and our community. Find an app or add-on for most any data source and user need, or simply create your own with help from our developer portal.