Splunk Search

How to add extra fields to timechart

tgdvopab
Path Finder

I have the following search:

index=main_index sourcetype=Perfmon:InboundPSTNCalls | timechart span=5min  avg(Value) as "Inbound PSTN Calls" by host | addtotals | eval threshold=50

This result's exactly what I want, but now I have the value of the threshold saved in a field called threshold.
How can I define the variable as the value of the field?

Thanks for the responses! 🙂

0 Karma
1 Solution

maciep
Champion

do you mean something like this?

index=main_index sourcetype=Perfmon:InboundPSTNCalls | eval threshold=50 | timechart span=5min avg(Value) as "Inbound PSTN Calls" avg(threshold) as threshold by host 

View solution in original post

maciep
Champion

do you mean something like this?

index=main_index sourcetype=Perfmon:InboundPSTNCalls | eval threshold=50 | timechart span=5min avg(Value) as "Inbound PSTN Calls" avg(threshold) as threshold by host 

somesoni2
Revered Legend

Could you provide more about "defining the variable as the value of the field"? What is the expected output?

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