Splunk Search

How to keep a cumulative value of a field that occasionally resets to 0 in the source

lbentin
New Member

Hi,
I have a cumulative counter in a .csv log, the issue is, the software generating the .csv resets this counter from time to time.

The file looks like this, the counter is the second value.
1005 ,4400.00,
1005 ,4450.00,
1005 ,0.00,
1005 ,0.01,
1005 ,30.00,

What I look for is away to obtain the value of the counter disregarding resets, so in the example that would be 4480.01

I guess this can be done by summing the delta from last to previous value, however I have no Idea how to tell Splunk to ignore the delta when the last value is 0, and resume counting with the last high/non-zero value.

Thanks for the help, L

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...