Alerting

How can I get an alert Trigger action, to log the data that triggers it as the log event > event text?

jjlandauer
New Member

I have an alert based on application logs of a web application. This alert fires based on data generated by user activity. For example, if a user is using the application from more than one IP an alert is triggered. I would like to use the alert action log event to log the alert and the data that triggered it. If I add $name$ to the event text, the name of the alert is logged. But how can I get the data that triggered the alert, the 1 username and 2 ip address, to be logged under the alert?

Tags (1)
0 Karma
1 Solution

HiroshiSatoh
Champion

In the case of this alert

(your search)|stats dc(ip) as count,values(ip) as ip by user|where count >1

You can embed ” $result.ip$”

View solution in original post

0 Karma

HiroshiSatoh
Champion

In the case of this alert

(your search)|stats dc(ip) as count,values(ip) as ip by user|where count >1

You can embed ” $result.ip$”

0 Karma

jjlandauer
New Member

Thank you!!! This worked perfectly!! How did you know this though? Is there a place this is documented? I searched!!!

0 Karma

HiroshiSatoh
Champion

There is a document about tokens. The search statement is an experience.
Please enjoy Splunk.

https://docs.splunk.com/Documentation/Splunk/7.2.5/Alert/EmailNotificationTokens

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 ...