Splunk Search

Display a timechart count as positive and negative values.

markramsay20070
New Member

I've a standard time chart, counting up HTTP error codes. It's all fine, however I'd like to separate out the error-type codes. A good visual way would be to somehow alter them with a negative modifier.

For example I have the HTTP OK code as coming up as a total of 200 events on Monday, while I have 10 404 errors. I'd like someway to alter the 10 to -10 so that when it's graphed it's easy to identify the errors - as they all lie below the X axis. I don't need an exact answer, just a nudge in the right direction.

0 Karma

gokadroid
Motivator

Can you try this:

your query to get you the stats of status and count
| eval myCount=if(status!=200, -count, count)
| timechart values(myCount) by status
0 Karma
Get Updates on the Splunk Community!

How to Monitor Google Kubernetes Engine (GKE)

We’ve looked at how to integrate Kubernetes environments with Splunk Observability Cloud, but what about ...

Index This | How can you make 45 using only 4?

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

Splunk Education Goes to Washington | Splunk GovSummit 2024

If you’re in the Washington, D.C. area, this is your opportunity to take your career and Splunk skills to the ...