Alerting

How do I use the contents of a log in a script triggered by an alert?

treydismukes
Engager

I have a realtime alert that's kicking off a python script, and I'd like to use the contents of the log entry that triggered the alert in the script. Is that possible?

Tags (2)
0 Karma

linu1988
Champion

Yes it,
You need to use the alert parameters for the script. The search needs to be formatted so that you get the content in the field to use in the script. Pass the script in savedsearch window or action.script.filename = <script filename>

More documentation here:

http://docs.splunk.com/Documentation/Splunk/6.0.2/Alert/Setupalertactions
https://wiki.splunk.com/Community:Use_Splunk_alerts_with_scripts_to_create_a_ticket_in_your_ticketin...
http://wiki.splunk.com/Community:TroubleshootingAlertScripts

Thanks

0 Karma
Get Updates on the Splunk Community!

Index This | Forward, I’m heavy; backward, I’m not. What am I?

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

A Guide To Cloud Migration Success

As enterprises’ rapid expansion to the cloud continues, IT leaders are continuously looking for ways to focus ...

Join Us for Splunk University and Get Your Bootcamp Game On!

If you know, you know! Splunk University is the vibe this summer so register today for bootcamps galore ...