Alerting

How to run a shell script alert action in splunk web and how to pass parameters to the script

kumar28
New Member

Hello,

I have an alert which triggers host name and task name. whenever an application status is down on any of the servers. I would like to run a script alert action based on triggered alert where the script will reset the status of application to UP. In doing so, I had to pass hostname and Taskname as parameters to the script.How can I pass those particular arguments to the script and please do let me know how to make this alert action by using splunk web? A detailed explanation would be appreciated

Thanks

Tags (1)
0 Karma

renjith_nair
Legend

@kumar28,

The run a script alert action is officially deprecated but it still works in most of the recent versions.

This should help you to start with : https://docs.splunk.com/Documentation/SplunkCloud/6.6.3/Alert/Configuringscriptedalerts

Ideally you have to process the gzip file and get your data.

Alternatively as suggested by splunk, you could use http://docs.splunk.com/Documentation/Splunk/6.6.1/AdvancedDev/CustomAlertConvertScripted#Scripted_al...

---
What goes around comes around. If it helps, hit it with Karma 🙂
0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

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