Dashboards & Visualizations

How to subtract field values every 5 minutes and display these results on a graph?

dperry
Communicator

This log is updated every 5 minutes (I have included three examples of the logs). The value is cumulative. So, while graphing it in Splunk, I have to deduct the previous value to get the value for that 5 minute interval. So for example, lets take one field, pdweb.sescache hit has the following three values of 26965624, 27089514, and 27622280.

Taking 27622280-27089514 = 532766 (this is the actual value I want for that 5 minute interval.)

2015-06-22-11:30:00.000-08:00I----- pdweb.sescache hit : 26965624

2015-06-22-11:30:00.000-08:00I----- pdweb.sescache hit : 27089514

2015-06-22-11:30:00.000-08:00I----- pdweb.sescache hit : 27622280
Tags (3)
0 Karma
1 Solution

jnicholsenernoc
Path Finder

Use the delta command:

index=main pdweb | delta pdweb.sescache as hits | timechart last(hits)

http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/Delta

View solution in original post

jnicholsenernoc
Path Finder

Use the delta command:

index=main pdweb | delta pdweb.sescache as hits | timechart last(hits)

http://docs.splunk.com/Documentation/Splunk/6.2.3/SearchReference/Delta

pradeepkumarg
Influencer

Something like below should work for you

 
... | delta pdweb.sescache AS cache p=1 | timechart avg(cache)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Level Up Your .conf25: Splunk Arcade Comes to Boston

With .conf25 right around the corner in Boston, there’s a lot to look forward to — inspiring keynotes, ...

Manual Instrumentation with Splunk Observability Cloud: How to Instrument Frontend ...

Although it might seem daunting, as we’ve seen in this series, manual instrumentation can be straightforward ...

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

Ready to make your IT operations smarter and more efficient? Discover how to automate Splunk alerts with Red ...