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!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...