Splunk Search

Help with search to draw a timechart for dynamic input

mayank101
New Member

I have a checkbox in which user has to enter the hostname manually by himself.
So on the basis of the hostname entered the time chart for that hostname should be drawn automatically.
I am unable to incorporate this feature. Can anyone help in writing the search?
I am particularly new to Splunk.

0 Karma

lakshman239
Influencer

If you capture the value entered in a field, say hostname, you can do something like your search |eval myhost=$hostname$ | timechart count by myhost

You can change based on what you want to plot in the timechart.

0 Karma

mayank101
New Member

Can you please tell me how to capture the hostname,right now I am just able to enter the hostname in checkbox named filterhost.It still shows waiting for the input and no result is getting displayed.

0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.
Get Updates on the Splunk Community!

Thanks for the Memories! Splunk University, .conf25, and our Community

Thank you to everyone in the Splunk Community who joined us for .conf25, which kicked off with our iconic ...

Data Persistence in the OpenTelemetry Collector

This blog post is part of an ongoing series on OpenTelemetry. What happens if the OpenTelemetry collector ...

Introducing Splunk 10.0: Smarter, Faster, and More Powerful Than Ever

Now On Demand Whether you're managing complex deployments or looking to future-proof your data ...