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

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!

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...