A lot of things in SplunkJS require you to have a service object. I've read in a bunch of places that splunkjs.Service should work, but it hasn't for me. How do I get a SplunkJS service object?
Despite some of the docs I saw, the answer is quite simply:
// Get access to Splunk objects via the JavaScript SDK
var service = mvc.createService();
Courtesy of: http://dev.splunk.com/view/SP-CAAAE25#Addingcode:usingJavaScriptandSearchProcessingLanguage-Usingthe...
Despite some of the docs I saw, the answer is quite simply:
// Get access to Splunk objects via the JavaScript SDK
var service = mvc.createService();
Courtesy of: http://dev.splunk.com/view/SP-CAAAE25#Addingcode:usingJavaScriptandSearchProcessingLanguage-Usingthe...