Alerting

Passing the output of a search to an alert script

bruceclarke
Contributor

All,

I have an alert that runs nightly that reads the distinct databases that have encountered a given event. When the alert is run, I want to pass that list of databases to a python script that will be able to execute logic on each of the values in that list.

Is there a way to do this? Is this what the eighth argument detailed here is used for? I'm unsure as to what format that data will be in though, since I really just want the formatted list of values the search returns.

Thanks!

Tags (3)
0 Karma
1 Solution

martin_mueller
SplunkTrust
SplunkTrust

Yup, the eighth argument is a path to a file containing the raw results, I believe in a .csv.gz archive.

As for the format of the data vs your expectations, just take a look at them at (roughly) $SPLUNK_HOME/var/run/splunk/dispatch/searchid/results.csv.gz on your search head.

View solution in original post

martin_mueller
SplunkTrust
SplunkTrust

Yup, the eighth argument is a path to a file containing the raw results, I believe in a .csv.gz archive.

As for the format of the data vs your expectations, just take a look at them at (roughly) $SPLUNK_HOME/var/run/splunk/dispatch/searchid/results.csv.gz on your search head.

bruceclarke
Contributor

I'll give this a shot. Thanks!

0 Karma

jzapantis
Path Finder

I just checked and it is a .gzip online.

That is awesome, good response.

For anyone curious, the documentation is here:
http://docs.splunk.com/Documentation/Splunk/5.0/Alert/Configuringscriptedalerts

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...