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!

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...

New in Observability Cloud - Explicit Bucket Histograms

Splunk introduces native support for histograms as a metric data type within Observability Cloud with Explicit ...