Splunk Search

Display total events on email subject

loveforsplunk
Explorer

Hi All,

Is there a way to display the total number of events in the email body of the alert .

Please note: The search string written is * stats count by field. so, I want the total count in my email subject and the break up in the report.

Tags (1)
0 Karma

niketn
Legend

@loveforsplunk, You are either looking for $job.resultCount$ which will list number or rows returned by the Search or $result.count$ where count is the field name generated by the search stats count (only first row or search query with single results.

Refer to the following documentation for complete list of tokens available during an email notification: http://docs.splunk.com/Documentation/Splunk/latest/Alert/EmailNotificationTokens

____________________________________________
| makeresults | eval message= "Happy Splunking!!!"
0 Karma
Get Updates on the Splunk Community!

Index This | I’m short for "configuration file.” What am I?

May 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with a Special ...

New Articles from Academic Learning Partners, Help Expand Lantern’s Use Case Library, ...

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...

Your Guide to SPL2 at .conf24!

So, you’re headed to .conf24? You’re in for a good time. Las Vegas weather is just *chef’s kiss* beautiful in ...