Alerting

Is it possible to pass the query of an alert to a script?

mjlsnombrado
Communicator

Is it possible to pass the query of an alert to a script? I want to trigger a script via alert and at the same time I want to pass the query of the alert to the said script. Is this possible? can someone give me hints / ideas on how to do this, thanks in advance 🙂

0 Karma

mstjohn_splunk
Splunk Employee
Splunk Employee

hi @mjlsnombrado

Did the answer below solve your problem? If so, please resolve this post by approving it! If your problem is still not solved, keep us updated so that someone else can help ya. Thanks for posting!

0 Karma

harsmarvania57
Ultra Champion

Hi,

If you are using Custom Alert Action to fire script in your alert in that case you can use param.search_query = $search$ in alert_actions.conf which will provide search query in payload with parameter search_query

0 Karma
Get Updates on the Splunk Community!

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

.conf24 | Learning Tracks for Security, Observability, Platform, and Developers!

.conf24 is taking place at The Venetian in Las Vegas from June 11 - 14. Continue reading to learn about the ...

Announcing Scheduled Export GA for Dashboard Studio

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