Splunk Search

Configure alert to send email to a certain field value?

evallja
Path Finder

Hello everyone,

I have the following results when running my search:

_time                                        user             connection
1 2023-01-09 20:36:04   john        Transport closing
2 2023-01-09 20:32:45   brian      DPD failure
3 2023-01-09 19:44:26   tom         assigned to session

Please, I want to configure an alert to send the _raw field by email to the specific user (by adding @gmail.com), every time it returns results from that user, (ex. john@gmail.com, brian@gmail.com, tom@gmail.com)

Thank you in advance.

Labels (1)
Tags (3)
0 Karma
1 Solution

PaulPanther
Builder

Just use eval to set up a new internal field  

 

| eval _mail_address=user + "@gmail.com," 

 

 and then use this field in your alert as recipient $result._mail_address$. Finally set the trigger to "For each result" to send each line to the specific mail_address.

View solution in original post

PaulPanther
Builder

Just use eval to set up a new internal field  

 

| eval _mail_address=user + "@gmail.com," 

 

 and then use this field in your alert as recipient $result._mail_address$. Finally set the trigger to "For each result" to send each line to the specific mail_address.

Get Updates on the Splunk Community!

Detecting Remote Code Executions With the Splunk Threat Research Team

REGISTER NOWRemote code execution (RCE) vulnerabilities pose a significant risk to organizations. If ...

Observability | Use Synthetic Monitoring for Website Metadata Verification

If you are on Splunk Observability Cloud, you may already have Synthetic Monitoringin your observability ...

More Ways To Control Your Costs With Archived Metrics | Register for Tech Talk

Tuesday, May 14, 2024  |  11AM PT / 2PM ET Register to Attend Join us for this Tech Talk and learn how to ...