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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...