Quantcast
Channel: Questions in topic: "splunk-enterprise"
Viewing all articles
Browse latest Browse all 47296

Is it possible to access properties from a custom config file (props.conf) in a Simple XML extension?

$
0
0
I would like to access properties from a custom config file in a Simple XML extension - is this possible? For now, I am just trying to access the props.conf from the default search app using the following code, which is based on the SplunkJS SDK documentation: var files = svc.configurations( { app: "search", owner: "admin" }); files.item("props", function(err, propsFile) { propsFile.fetch(function(err, props) { console.log(props.properties()); }); }); However, I am unsure how to instantiate the svc (splunkjs.Service) object for a Simple XML extension. I have tried instantiating it like this: var http = new splunkjs.ProxyHttp("/proxy"); var svc = new splunkjs.Service(http, { username: "admin", password: "changeme", scheme: "https", host: "localhost", port:"8089", version:"6.3.0" }); and it does give me a configurations object, but the result is always null. Any help would be greatly appreciated.

Viewing all articles
Browse latest Browse all 47296

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>