Splunk Search

Need a sum

Michael_Schyma1
Contributor

sourcetype="MFApps" | addtotals fieldname=sum |top limit=1 sum | fields + count | rename count AS "Number of Events

This is my search and all I want is one field that lists the total number of events. It does not seem to be keeping a sum of all events. Instead it just seems to be keeping the highest event number.

Tags (1)
0 Karma
1 Solution

cphair
Builder

Use stats count.


sourcetype="MFApps" | stats count as "Number of Events"

View solution in original post

cphair
Builder

Use stats count.


sourcetype="MFApps" | stats count as "Number of Events"

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