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!

Splunk Mobile: Your Brand-New Home Screen

Meet Your New Mobile Hub  Hello Splunk Community!  Staying connected to your data—no matter where you are—is ...

Introducing Value Insights (Beta): Understand the Business Impact your organization ...

Real progress on your strategic priorities starts with knowing the business outcomes your teams are delivering ...

Enterprise Security (ES) Essentials 8.3 is Now GA — Smarter Detections, Faster ...

As of today, Enterprise Security (ES) Essentials 8.3 is now generally available, helping SOC teams simplify ...