We’ve just released an update the Splunk SDK for JavaScript, v1.7, with some great new features! Most importantly support for Node.js v0.12.x and io.js.
You can get it on npm or GitHub, and docs are available at dev.splunk.com
New features and APIs
- Added Service.getJob() method for getting a Job by its sid.
- Added Service.ConfigurationFile.getDefaultStanza() method for getting the [default] stanza of a conf file.
- Can now stream JavaScript objects with modular inputs by passing an object as the data parameter to the Event constructor; that object will then be passed to JSON.stringify().
- Updated the GitHub commits example to show this functionality.
New Examples
- The node/helloworld/get_job.js example shows how to get a Job by its sid.
- The node/helloworld/endpoint_instantiation.js example shows how to access unsupported REST API endpoints.
- Now you can roll your own endpoints!