Splunk Enterprise

How to run script on Universal Forwarder by Splunk Server

JuanAntunes
Explorer

Hello Team!

I have a problem I need to solve, but I couldn't find a way to do it.

I have some servers that have Universal Forwarder installed and Windows services are being monitored through it. What happens is that sometimes some of these services are unavailable and there is a need to restart this service,

I would like to know if, somehow, as soon as Splunk identifies that one of these services is out, run a script on the local server that restarts that service

That is, I need to know if there is any way to run a script that is in the universal forwarder through Splunk Server

Thanks in advance!

Labels (2)
0 Karma

kvanka
Loves-to-Learn

Has anyone tried to use this process for upgrading the Splunk Universal forwarder? 

0 Karma

somesoni2
Revered Legend

You should be able to run script from Universal forwarder via scripted inputs (can run at frequent interval to check the service status and run remediation steps). Only thing you'd need to take care is that Splunk universal forwarder should be running under an account which has sufficient permissions to run remedial steps.

0 Karma

JuanAntunes
Explorer

@somesoni2 Thanks for your fast response! 

I would need the trigger to be given by the Splunk server,

As if it were a "button" on the server that when clicked, runs the script on another server.

Because unfortunately I can't restart the service automatically, I need it to be alerted on a dashboard and then a person must perform this "click" to restart the service on the other server

0 Karma

somesoni2
Revered Legend

The "trigger" could be programmed into the script itself. Like checking a condition and if that condition is true, perform another command locally. Assuming the UF and windows service it's monitoring is on same server.

Tags (1)
0 Karma
Career Survey
First 500 qualified respondents will receive a $20 gift card! Tell us about your professional Splunk journey.

Can’t make it to .conf25? Join us online!

Get Updates on the Splunk Community!

Leveraging Automated Threat Analysis Across the Splunk Ecosystem

Are you leveraging automation to its fullest potential in your threat detection strategy?Our upcoming Security ...

Can’t Make It to Boston? Stream .conf25 and Learn with Haya Husain

Boston may be buzzing this September with Splunk University and .conf25, but you don’t have to pack a bag to ...

Splunk Lantern’s Guide to The Most Popular .conf25 Sessions

Splunk Lantern is a Splunk customer success center that provides advice from Splunk experts on valuable data ...