Alerting

Suggestion on sending search output to external server based on alert condition

phagunbaya
Explorer

I have created an alert which triggers a script based on a condition defined in alert. After the script triggers, it should pull the data based on the search and sends the data to an external server by calling it's POST API.

I'm having trouble getting data based on the search alert because the Splunk search API needs to be authenticated to get the data.

Is there any different approach to deal with this? My goal is to create an alert programmatically and upon trigger I need to send the data to external server.

0 Karma
1 Solution

woodcock
Esteemed Legend

There should be a file that is created (gzipped, I believe) with your search results that you should be able to access directly that contains the results right there. It is in the 8th argument ($ARGV[7]) and there for the taking, with no need to authenticate.

http://docs.splunk.com/Documentation/Splunk/6.2.3/Alert/Configuringscriptedalerts#Access_arguments_t...

View solution in original post

0 Karma

woodcock
Esteemed Legend

There should be a file that is created (gzipped, I believe) with your search results that you should be able to access directly that contains the results right there. It is in the 8th argument ($ARGV[7]) and there for the taking, with no need to authenticate.

http://docs.splunk.com/Documentation/Splunk/6.2.3/Alert/Configuringscriptedalerts#Access_arguments_t...

0 Karma
Get Updates on the Splunk Community!

Threat Hunting Unlocked: How to Uplevel Your Threat Hunting With the PEAK Framework ...

WATCH NOWAs AI starts tackling low level alerts, it's more critical than ever to uplevel your threat hunting ...

Splunk APM: New Product Features + Community Office Hours Recap!

Howdy Splunk Community! Over the past few months, we’ve had a lot going on in the world of Splunk Application ...

Index This | Forward, I’m heavy; backward, I’m not. What am I?

April 2024 Edition Hayyy Splunk Education Enthusiasts and the Eternally Curious!  We’re back with another ...