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!

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...