Splunk Search

How to normalize and display data using sparklines?

rm4149
New Member

So I'm planning to normalize latency data for a network.

Search:

index=_* OR index=* sourcetype="defaut log"| rename Parent_Host as A , Child_Host as B |eventstats min(In) as minIn  max(In) as maxIn by A B|eval val = (In-minIn)/(maxIn-minIn) |stats sparkline(avg(val)) as In by A B

Now I have normalized the data between 0-1 using the eventstats and eval, but can't figure out how to display that normalized data in the sparkline as stats sparkline(val) as In by A B throws an error and doing stats sparkline(avg(val)) as In by A B is not same as printing the sparkline of the values.

0 Karma

diogofgm
SplunkTrust
SplunkTrust

You don't need the () for sparkline. (docs)
Try like this:

 index=_* OR index=* sourcetype="defaut log"| rename Parent_Host as A , Child_Host as B |eventstats min(In) as minIn  max(In) as maxIn by A B|eval val = (In-minIn)/(maxIn-minIn) | stats sparkline avg(val) as In by A B
------------
Hope I was able to help you. If so, some karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...