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!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

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