Alerting

How to send search results of an alert to a script?

kinguchiha
New Member

Hi guys. Here's what I want to do:

I made an alert that triggers if a new computer is found.

I want to send the results (IP MAC etc.) to my script.

I learned how to make a custom search command, but I don't know how to send the results as args. Any advice?

0 Karma

woodcock
Esteemed Legend

Why are you using a custom command? Why not create a custom alert action or script? In any case, this might help (but probably not):

https://answers.splunk.com/answers/41949/passing-search-results-to-external-python-script.html

0 Karma
Get Updates on the Splunk Community!

Introducing Splunk Enterprise 9.2

WATCH HERE! Watch this Tech Talk to learn about the latest features and enhancements shipped in the new Splunk ...

Adoption of RUM and APM at Splunk

    Unleash the power of Splunk Observability   Watch Now In this can't miss Tech Talk! The Splunk Growth ...

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...