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!

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...