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!

Built-in Service Level Objectives Management to Bridge the Gap Between Service & ...

Wednesday, May 29, 2024  |  11AM PST / 2PM ESTRegister now and join us to learn more about how you can ...

Get Your Exclusive Splunk Certified Cybersecurity Defense Engineer at Splunk .conf24 ...

We’re excited to announce a new Splunk certification exam being released at .conf24! If you’re headed to Vegas ...

Share Your Ideas & Meet the Lantern team at .Conf! Plus All of This Month’s New ...

Splunk Lantern is Splunk’s customer success center that provides advice from Splunk experts on valuable data ...