Splunk Search

Graph by field value not by field count

fizwit
Explorer

Why can't I make a graph by field value directly?

This works:
index=logs Error_Type="WARN" | timechart count(Error_Type)

This does not
index=logs | timechart count(Error_Type="WARN")

I would like to to this graph two types of error on the same pannel
index=logs | timechart count(Error_Type="WARN"), count(Error_Type="ERROR")

fizwit
Explorer

Thanks, that worked perfectly!

0 Karma

chris
Motivator

Hi fizwit,

this is possible have a look at the documentation of the timechart command (Example 5) you were pretty close there is just an eval missing:

 index=logs | timechart count(eval(Error_Type="WARN")) AS WARN, count(eval(Error_Type="ERROR")) AS ERROR

Good luck

Chris

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 ...