Splunk Dev

How to get Splunk port using Splunk Java SDK?

kinjalmistry
Explorer

Is there any way to find out the port on which Splunk is set up programmatically using Splunk Java SDK? Basically to read the entry from $SPLUNK_HOME/etc/system/local/web.conf?

Labels (1)
0 Karma
1 Solution

s2_splunk
Splunk Employee
Splunk Employee

The Java SDK has a class named "Settings" with methods to retrieve host and port values, among other settings.

Or use REST directly, as Rich said. Many ways to skin a cat. 🙂

View solution in original post

s2_splunk
Splunk Employee
Splunk Employee

The Java SDK has a class named "Settings" with methods to retrieve host and port values, among other settings.

Or use REST directly, as Rich said. Many ways to skin a cat. 🙂

richgalloway
SplunkTrust
SplunkTrust

Use the SDK to send the REST command /services/configs/conf-web

---
If this reply helps you, Karma would be appreciated.
Get Updates on the Splunk Community!

Splunk App for Anomaly Detection End of Life Announcment

Q: What is happening to the Splunk App for Anomaly Detection?A: Splunk is officially announcing the ...

Aligning Observability Costs with Business Value: Practical Strategies

 Join us for an engaging Tech Talk on Aligning Observability Costs with Business Value: Practical ...

Mastering Data Pipelines: Unlocking Value with Splunk

 In today's AI-driven world, organizations must balance the challenges of managing the explosion of data with ...