All Apps and Add-ons

Triggers alerts with differents conditions on the result

arnauld18
Explorer

How can i trigger my alert with different conditions on the result?

i want my alert not to be triggered if i have more than 9 results.

so i put this:  search count<9.

The problem is, even when there is no result in the search, like 0, the alert keep being triggered.

so i try this:  search count>0 and count<9. 

And it doesn't work.. can someone please help me?

Labels (3)
1 Solution

inventsekar
SplunkTrust
SplunkTrust

Hi @arnauld18 ...Please check .. 


try: base search |  where count<9 

and Alert condition --- When number of events > 0

or, try this--- base search | where count>0 AND count<9

 

~ Happy Splunking | Best Regards | Sekar | PS - Karma points appreciated! 

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi @arnauld18,

insert the conditions in the main search and fire the alert when you have results, something like this:

 

your search
| stats count
| where count<9

 

in this way:

  • if you have results, there's the condition to be fired in the alert,
  • if there isn't any result (count=0 or count>= 9) the aler isn't fired.

Ciao.

Giuseppe

arnauld18
Explorer

Thank you

0 Karma

gcusello
SplunkTrust
SplunkTrust

Hi @arnauld18,

if one solution solves your need, please accept it for the other people of Community.

Ciao and happy splunking.

Giuseppe

P.S.: Karma Points are appreciated by all the contributors 😉

0 Karma

inventsekar
SplunkTrust
SplunkTrust

Hi @arnauld18 ...Please check .. 


try: base search |  where count<9 

and Alert condition --- When number of events > 0

or, try this--- base search | where count>0 AND count<9

 

~ Happy Splunking | Best Regards | Sekar | PS - Karma points appreciated! 

thanks and best regards,
Sekar

PS - If this or any post helped you in any way, pls consider upvoting, thanks for reading !

arnauld18
Explorer

Thank you. I'm trying it rn

0 Karma
Get Updates on the Splunk Community!

Splunk + ThousandEyes: Correlate frontend, app, and network data to troubleshoot ...

 Are you tired of troubleshooting delays caused by siloed frontend, application, and network data? We've got a ...

Splunk Observability for AI

Don’t miss out on an exciting Tech Talk on Splunk Observability for AI!Discover how Splunk’s agentic AI ...

🔐 Trust at Every Hop: How mTLS in Splunk Enterprise 10.0 Makes Security Simpler

From Idea to Implementation: Why Splunk Built mTLS into Splunk Enterprise 10.0  mTLS wasn’t just a checkbox ...