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!

Modern way of developing distributed application using OTel

Recently, I had the opportunity to work on a complex microservice using Spring boot and Quarkus to develop a ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had 3 releases of new security content via the Enterprise Security ...

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...