Alerting

Suppress Splunk alert for specific field value and for specific scheduled window

manish_singh_77
Builder

Hi Team,

I would like to suppress the splunk alert for specific duration every day for 2 hrs ( for instance 9 am to 11 am) every day on a specific field value. With throttle, I can't set for specific time range, will I have to modify the query?

Quick help would be appreciated!

Labels (1)
Tags (2)
0 Karma

anthonymelita
Contributor

For advanced evaluation like that you will probably need to do it within the search itself. You can use time functions to evaluate the current hour, and then add temporary fields to evaluate and further filter the search against. This may not be the most elegant solution, but I think it works. The important lines being the creation of the "smallHand" hour field; using it to set the filter field; and then applying the where filter.

| makeresults
| eval smallHand=strftime(now(), "%H"), field1="abc;def;ghi", field2="Lorem ipsum dolor sit amet"
| makemv field1 delim=";"
| mvexpand field1
| eval smallHand=if(field1="def" OR field1="ghi", "10", smallHand)
| eval filter=if(smallHand>=9 AND smallHand<11 AND field1="def", "True", "False")
| where filter!="True"
| fields - filter, smallHand
0 Karma

to4kawa
Ultra Champion
0 Karma

manish_singh_77
Builder

I know about the cron expression, I am looking for suppression of alerts for the specific scheduled time.

0 Karma

to4kawa
Ultra Champion
0-9,11-24

Is this enough?

0 Karma
Get Updates on the Splunk Community!

Introducing the 2024 SplunkTrust!

Hello, Splunk Community! We are beyond thrilled to announce our newest group of SplunkTrust members!  The ...

Introducing the 2024 Splunk MVPs!

We are excited to announce the 2024 cohort of the Splunk MVP program. Splunk MVPs are passionate members of ...

Splunk Custom Visualizations App End of Life

The Splunk Custom Visualizations apps End of Life for SimpleXML will reach end of support on Dec 21, 2024, ...