Dashboards & Visualizations

math operations between events

cl3513
New Member

I am using snmp to poll interface stats from a device, which is only returning total packets received on interface, I am polling every 60 seconds.  Is there any way in dashboard to take the difference between those values and then divide by 60t to get packets per second and display this value in dashboard?  (<event1 value> -  event2 value>)/60. Dashboard would need to do this for each event coming in.

Labels (1)
0 Karma

richgalloway
SplunkTrust
SplunkTrust

The streamstats command can give you the difference of a field between events.  Then use eval to do the division.

... | streamstats window=2 range(foo) as diff
| eval diff=diff/60

 

---
If this reply helps you, Karma would be appreciated.
0 Karma
Get Updates on the Splunk Community!

What’s New in Splunk Enterprise 9.4: Tools for Digital Resilience

What’s New in Splunk Enterprise 9.4: Tools for Digital ResilienceTune in to What’s New in Splunk Enterprise ...

Get Schooled with Splunk Education: Explore Our Latest Courses

At Splunk Education, we’re dedicated to providing incredible learning experiences that cater to every skill ...

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL

Splunk AI Assistant for SPL | Key Use Cases to Unlock the Power of SPL  The Splunk AI Assistant for SPL ...