Getting Data In

Is there a way to launch a script on the Universal Forwarder's App's bin directory from the search head?

daniel333
Builder

Hello,

Is there a way to launch a script on the Universal Forwarder's App's bin directory from the search head?

For example:
Scheduled search index=java *oom* host=mybadjbossserver

Causes:
mybadjbossserver's universal forwarder to call /opt/splunkforwarders/etc/apps/myjobsapps/bin/fixjboss.sh to run

Right now I have scripted inputs that have scripts that check the condition via bash, which isn't good. I suppose I could use wget to make an API call to a search head and act on results, but I feel like I would be running the same script twice (one for the notification and one for the action) and I am not really confident in my ability to produce a good API call.

0 Karma

tom_frotscher
Builder

Hi,

if you define your scheduled search as an alert, you can configure a script to be run whenever the alert is triggered. For security reasons, the scripts need to be placed in a specific folder, which can be similar to the folder you posted:

$SPLUNK_HOME/etc/<AppName>/bin/scripts

Is this a solution to your problem?

You can get further informations here:

http://docs.splunk.com/Documentation/Splunk/6.2.2/Alert/Setupalertactions#Run_a_script_for_an_alert_...

0 Karma
Get Updates on the Splunk Community!

Extending Observability Content to Splunk Cloud

Register to join us !   In this Extending Observability Content to Splunk Cloud Tech Talk, you'll see how to ...

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