Alerting

Alert Creation for indexes showing events less than threshold

harshsri21
New Member

I am new to splunk.

Trying to create an alert if any of the indexes shows event count less than the defined threshold. Below is my alert search query which i run every hour past 15.

| metasearch index=ip-bluecoat OR index=ip-fass-siteminder OR index=ip-win-evt OR index=ip-glux
| stats count by index|appendcols [|inputlookup feed_baseline_count.csv|table index,baseline_count]|where count < baseline_count

Below is the table for my lookup:

index baseline_count
ip-bluecoat 3000000
ip-faas_siteminder 1000
ip-glux 2000000
ip-winevt 20000000

It is not working as expected. Can somebody please help in correcting the query or the approach.

Thanks in advance.

Tags (2)
0 Karma

lguinn2
Legend

I think that appendcols is not working as you might expect - it makes no attempt to order the rows so that they "match."
Try this instead:

| tstats count where index=ip-bluecoat OR index=ip-fass-siteminder OR index=ip-win-evt OR index=ip-glux by index
| append [ inputlookup feed_baseline_count.csv ]
| stats first(*) as * by index
| where count < baseline_count

Be sure that you are specifying the timerange properly when you run the search...

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