Splunk Search

How to get the event count for the last 24 hours as a scheduled report?

dhavamanis
Builder

can you please tell us, how to get the last 24 hours event count to schedule the report?

1 Solution

sk314
Builder
  1. Save you splunk search.
  2. Click on Settings -> Searches and Reports -> [your saved search]
  3. Schedule it.

If you want count of all events in the last 24 hours you could try this:

* earliest=-24h latest=now | stats count (searches the default index only)

If you want the event count for specific search try this:

[your splunk search] earliest=-24h latest=now| stats count

View solution in original post

sk314
Builder
  1. Save you splunk search.
  2. Click on Settings -> Searches and Reports -> [your saved search]
  3. Schedule it.

If you want count of all events in the last 24 hours you could try this:

* earliest=-24h latest=now | stats count (searches the default index only)

If you want the event count for specific search try this:

[your splunk search] earliest=-24h latest=now| stats count

ArunIndy
Observer

Hello, I tried using the 'earliest' option and I'm getting this error

 

 

<search>
<query>index="mulertf" "$form.env$-glot-product-sapi-v1" AND "Before updating data for GCPN:" |earliest=-24h latest=now | stats count</query>
</search>

 

ArunIndy_0-1641243971762.png

 

0 Karma
Get Updates on the Splunk Community!

Introducing the Splunk Community Dashboard Challenge!

Welcome to Splunk Community Dashboard Challenge! This is your chance to showcase your skills in creating ...

Get the T-shirt to Prove You Survived Splunk University Bootcamp

As if Splunk University, in Las Vegas, in-person, with three days of bootcamps and labs weren’t enough, now ...

Wondering How to Build Resiliency in the Cloud?

IT leaders are choosing Splunk Cloud as an ideal cloud transformation platform to drive business resilience,  ...