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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...