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!

Archived Metrics Now Available for APAC and EMEA realms

We’re excited to announce the launch of Archived Metrics in Splunk Infrastructure Monitoring for our customers ...

Detecting Remote Code Executions With the Splunk Threat Research Team

WATCH NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If exploited, ...

Enter the Dashboard Challenge and Watch the .conf24 Global Broadcast!

The Splunk Community Dashboard Challenge is still happening, and it's not too late to enter for the week of ...