Getting Data In

Read from inputs.conf file

MikeJu25
Path Finder

Hi there,

I want to be able to allow a dashboard of my app read the hostname stored in inputs.conf, which is provided by user when setting up the app. Specifically, I have a button on one of my app's dashboard which links to the hostname url user enters. However, I'm not sure how the dashboard can read the hostname so that the button can be dynamically populated with different hostname. 

Here is how I store the hostname in inputs.conf. Once done setting up, HOST can be filled in properly. 

 

 

[modinput://input]
API_KEY = 
HOST = 
interval = 600

 

 

Thank you in advance! 

Labels (2)
0 Karma
1 Solution

s2_splunk
Splunk Employee
Splunk Employee

Not sure I understand your requirement. If your app is local to the search head (inputs usually don't live on search heads unless you have a single-server deployment), you can possibly use the REST API to get the configured value for the host property. 

Otherwise, you can dynamically populate a dropdown dashboard element by running a search to look for unique host values for the source type in question.

But I said, I probably don't understand what you are trying to achieve.

View solution in original post

s2_splunk
Splunk Employee
Splunk Employee

Not sure I understand your requirement. If your app is local to the search head (inputs usually don't live on search heads unless you have a single-server deployment), you can possibly use the REST API to get the configured value for the host property. 

Otherwise, you can dynamically populate a dropdown dashboard element by running a search to look for unique host values for the source type in question.

But I said, I probably don't understand what you are trying to achieve.

MikeJu25
Path Finder

Thank you so much! I think you have resolved my question. I tried some searches and it returned the info I need.

0 Karma
Get Updates on the Splunk Community!

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

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