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!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...