Splunk Search

Removing a line from a timechart?

thefosk
Engager

Within our application we are tracking a "Pings" metric, and in our query we are showing pings over time along with a metric called "instances" that's calculated in real-time by dividing "Pings" by 24:

index="helloworld" metric="ping" | timechart count as Pings span=1d | eval Instances=floor(Pings/24)

This query has the result of showing both "Pings" and "Instances" in the timechart. How can we only display "Instances" and remove the "Pings" line?

Tags (3)
0 Karma
1 Solution

Richfez
SplunkTrust
SplunkTrust

Just remove it with the fields command at the end of your search.

... | fields - Pings

That should remove "Pings" but leave all else.

View solution in original post

Richfez
SplunkTrust
SplunkTrust

Just remove it with the fields command at the end of your search.

... | fields - Pings

That should remove "Pings" but leave all else.

Get Updates on the Splunk Community!

Stay Connected: Your Guide to May Tech Talks, Office Hours, and Webinars!

Take a look below to explore our upcoming Community Office Hours, Tech Talks, and Webinars this month. This ...

They're back! Join the SplunkTrust and MVP at .conf24

With our highly anticipated annual conference, .conf, comes the fez-wearers you can trust! The SplunkTrust, as ...

Enterprise Security Content Update (ESCU) | New Releases

Last month, the Splunk Threat Research Team had two releases of new security content via the Enterprise ...