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!

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...