Splunk Search

How can I search for alerts that send emails to specific users in Splunk 6.6?

adexteracc
Explorer

Our setup has a quite a few alerts and we need to find all of the alerts that send email to a specific user. So far other than going through the alerts individually, I have not been able to find a way to search the alerts in this manner.

Tags (3)
0 Karma

putnamblake
Path Finder

I think the above answers are correct but this cleans things up and gives more info. As this is 2020, you the below search is not bound by Splunk 6.x or 7.x- it should work universally.

 

| rest /services/saved/searches
| search action.email.to=* action.email=1
| rename eai:acl.app as Application, title as "Alert Name", triggered_alert_count as "Times Triggered Conditions Met", splunk_server as Host, action.email.to as "Sent To"
| table Application, "Alert Name", "Times Triggered Conditions Met", Host, "Sent To"

 

 

Tags (3)

isoutamo
SplunkTrust
SplunkTrust

You must remember that there are also fields:

  • action.email.cc
  • action.email.bcc

Which you cannot get by REST.

And of course those can be a email aliases/mailing lists on mail server(s).

One way which show to you where splunk has sent alerts is query those from internal logs.

index=_internal source=*python.log sendemail "Sending email"

r. Ismo

jaxjohnny2000
Builder

Try this also.

| rest /services/saved/searches | search action.email=1 action.email.to=targetemail@targetdomain.com | table title action.email.to

0 Karma

micahkemp
Champion

Try this:

| rest /services/saved/searches | search action.email.to="<email address>" | table title action.email.to

adexteracc
Explorer

Doesn't look like that does the trick. I ran with the email address we were looking for and and a couple of others but was unable to get an results returned. Also ran the search with an asterisk for the email.to and found that the search didn't appear to return an email at all. Thank you for the suggestion.

0 Karma

wrangler2x
Motivator

This worked dandy for me.

0 Karma

micahkemp
Champion

Do you see any results for just | rest /services/saved/searches? And are you running the search on the splunk instance that has the alerts configured?

0 Karma
Get Updates on the Splunk Community!

Index This | I am a number, but when you add ‘G’ to me, I go away. What number am I?

March 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...

What’s New in Splunk App for PCI Compliance 5.3.1?

The Splunk App for PCI Compliance allows customers to extend the power of their existing Splunk solution with ...

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...