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!

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