Splunk Search

Splunk running total

Anesthetize
Engager

Hey Splunk gang, 

I have a dashboard that I am creating and it will ingest a file every 5 minutes.  I need to create a search that will accumulate the value of an extracted field.  ie.) Extracted field = ACA, and it comes in the first time at 10, and then the second time(5 minutes later) at 15 and the dashboard displays 25.  Ideally in a single value panel. 

Here is the search that produces the original value, but it does not accumulate a total:

| rename "Amt Credits Acc" as "ACA"
| fieldformat ACA = ("$".ACA)
| table "ACA"

Labels (1)
0 Karma
1 Solution

codebuilder
Influencer

Your search needs a little work.
To calculate a total you'll need to use stats:
https://docs.splunk.com/Documentation/Splunk/8.2.1/SearchReference/Stats

And when using fieldformat you'll have to call a function:
https://docs.splunk.com/Documentation/SplunkCloud/8.2.2106/SearchReference/Fieldformat

Both pages have excellent examples that are very close to what you're trying to accomplish.

----
An upvote would be appreciated and Accept Solution if it helps!

View solution in original post

codebuilder
Influencer

Your search needs a little work.
To calculate a total you'll need to use stats:
https://docs.splunk.com/Documentation/Splunk/8.2.1/SearchReference/Stats

And when using fieldformat you'll have to call a function:
https://docs.splunk.com/Documentation/SplunkCloud/8.2.2106/SearchReference/Fieldformat

Both pages have excellent examples that are very close to what you're trying to accomplish.

----
An upvote would be appreciated and Accept Solution if it helps!
Get Updates on the Splunk Community!

Updated Team Landing Page in Splunk Observability

We’re making some changes to the team landing page in Splunk Observability, based on your feedback. The ...

New! Splunk Observability Search Enhancements for Splunk APM Services/Traces and ...

Regardless of where you are in Splunk Observability, you can search for relevant APM targets including service ...

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 ...