Getting Data In

How to grab data from a the search result for an API call script?

Athildjax64
New Member

I have a job that is set to run off of every alert. I have a python script executing that is showing Exit Code 0. The script is designed to grab a specific field from the alert and pass it along with an API call to a web server.

I am not seeing any errors other than it does not seem to be grabbing the file information from the search results.

Any help here would be great

0 Karma

somesoni2
SplunkTrust
SplunkTrust

Splunk passed 8 arguments to alert script, 8th one is the full path to the compressed result file of the search. How is your python script grabbing the specific fields?

https://docs.splunk.com/Documentation/Splunk/7.0.3/Alert/Configuringscriptedalerts#Access_arguments_...

0 Karma

Athildjax64
New Member

This is not a run a script function, but a modular alert so it is part of an app.
in the alert_actions.conf file I have tried calling a $result.$ to add it as an argument, creating a param.message using the same filed and calling that from in the script.
None work.

0 Karma
Get Updates on the Splunk Community!

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

Let’s Get You Certified – Vegas-Style at .conf24

Are you ready to level up your Splunk game? Then, let’s get you certified live at .conf24 – our annual user ...