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!

Announcing Scheduled Export GA for Dashboard Studio

We're excited to announce the general availability of Scheduled Export for Dashboard Studio. Starting in ...

Extending Observability Content to Splunk Cloud

Watch Now!   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to leverage ...

More Control Over Your Monitoring Costs with Archived Metrics GA in US-AWS!

What if there was a way you could keep all the metrics data you need while saving on storage costs?This is now ...