Splunk Dev

SplunkJS with SimpleXML Dashboard: How to get a service object?

David
Splunk Employee
Splunk Employee

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?

0 Karma
1 Solution

David
Splunk Employee
Splunk Employee

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...

View solution in original post

0 Karma

David
Splunk Employee
Splunk Employee

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...

0 Karma
Get Updates on the Splunk Community!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...