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!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...