Alerting

Is it possible to pass additional parameters to an alert script?

robertlabrie
Path Finder

So this has been asked, and I've googled it hard, but I can't seem to find a concise answer. Can I pass additional parameters to an alert script? Say for arguments sake, I have dosomethingawesome.py, and I want to re-use it for different alerts, and maybe I want to pass in a -server parameter or a -awesomelevel parameter into dosomethingawesome.py, can I do that? Of course I tried and it looks like no, I just want to know for sure: is it impossible?

Thanks,
Rob

0 Karma

stephanefotso
Motivator

Hello! I don't know if i have understood very well your problem . But i think,

If you just want to pass in a -server parameter or a -awesomelevel parameter into dosomethingawesome.py, Just write annother script, let say setparameter.py, which can take your server parameters and pass it into dosomethingawesome.py. And then create your alert that run setparameter.py as an action. When the alert triggered, your parametters will be sent to dosomethingawesome.py by setparameter.py.

Thanks.
please let me know if i got you.

SGF
0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

What's new in Splunk Cloud Platform 9.1.2312?

Hi Splunky people! We are excited to share the newest updates in Splunk Cloud Platform 9.1.2312! Analysts can ...

What’s New in Splunk Security Essentials 3.8.0?

Splunk Security Essentials (SSE) is an app that can amplify the power of your existing Splunk Cloud Platform, ...