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!

Earn a $35 Gift Card for Answering our Splunk Admins & App Developer Survey

Survey for Splunk Admins and App Developers is open now! | Earn a $35 gift card!      Hello there,  Splunk ...

Continuing Innovation & New Integrations Unlock Full Stack Observability For Your ...

You’ve probably heard the latest about AppDynamics joining the Splunk Observability portfolio, deepening our ...

Monitoring Amazon Elastic Kubernetes Service (EKS)

As we’ve seen, integrating Kubernetes environments with Splunk Observability Cloud is a quick and easy way to ...