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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

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 GA in US-AWS!

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