Splunk Search

Alert on table with custom email subject field value

rmiller3
Engager

I got an alert working "for each result" by using a query that creates the following table:

errorType             count

Client                  10
Credentials      50
Unknown             5

How do I set a different threshold for each result?

I tried using a custom trigger as follows and was hoping to only get an email for "client" and "credentials", but I still get all 3.

 

search (errorType = "Client" AND count > 8 ) OR (errorType = "Credentials" AND count > 8 ) OR (errorType = "Other" AND count >8 )

 

 

 

Labels (1)
0 Karma
1 Solution

marnall
Motivator

That should work already. Could you try putting that search filter at the end of your alert search?

<yoursearch>
| search (errorType = "Client" AND count > 8 ) OR (errorType = "Credentials" AND count > 8 ) OR (errorType = "Other" AND count > 8 )

 

View solution in original post

0 Karma

rmiller3
Engager

That works.  I was really trying to have a custom alert message with just the thresholds (since my query categorizes different error types and is fairly long, I was hoping not to put it in the alert email). 

However, I think putting the whole query is fine at the end of the day, thanks!

0 Karma

marnall
Motivator

That should work already. Could you try putting that search filter at the end of your alert search?

<yoursearch>
| search (errorType = "Client" AND count > 8 ) OR (errorType = "Credentials" AND count > 8 ) OR (errorType = "Other" AND count > 8 )

 

0 Karma
Get Updates on the Splunk Community!

CX Day is Coming!

Customer Experience (CX) Day is on October 7th!! We're so excited to bring back another day full of wonderful ...

Strengthen Your Future: A Look Back at Splunk 10 Innovations and .conf25 Highlights!

The Big One: Splunk 10 is Here!  The moment many of you have been waiting for has arrived! We are thrilled to ...

Now Offering the AI Assistant Usage Dashboard in Cloud Monitoring Console

Today, we’re excited to announce the release of a brand new AI assistant usage dashboard in Cloud Monitoring ...