Getting Data In

How to restart a universal forwarder remotely via deployment server?

koshyk
Super Champion

We are facing a few issues whereour endpoints (clients) may have the Splunk service stopped.
Can we force a restart of the Universal forwarder (agent) "splunk service" or "splunk" from our deployment server?

Currently, we are asking the support team of the respective application team to do it for us, but would be great if we can manage the agents ourselves. (BTW the agents have local accounts in the clients)

0 Karma
1 Solution

adayton20
Contributor

I do not know of a way to force restart a deployment client once it already stopped. After all, if the service is stopped, it can’t connect to the deployment server in the first place.

I used to work in an environment where we monitored for critical services stopping in Splunk, the Splunk service being one of them. Perhaps it would be a good idea to investigate why the service is stopping to verify nothing malicious is occurring. Should be Event ID 7036. You could do what we did and use a powershell script to restart the service should it stop. We ran the script in the background as a scheduled task every 15 minutes.

View solution in original post

gcusello
SplunkTrust
SplunkTrust

Hi koshyk,
No you cannot if your Forwarder is stopped!
you can restart a Forwarder only if it runs and you deploy a TA on this Forwarder.
probablu the only way is a remote script shell.
Bye.
Giuseppe

0 Karma

adayton20
Contributor

I do not know of a way to force restart a deployment client once it already stopped. After all, if the service is stopped, it can’t connect to the deployment server in the first place.

I used to work in an environment where we monitored for critical services stopping in Splunk, the Splunk service being one of them. Perhaps it would be a good idea to investigate why the service is stopping to verify nothing malicious is occurring. Should be Event ID 7036. You could do what we did and use a powershell script to restart the service should it stop. We ran the script in the background as a scheduled task every 15 minutes.

koshyk
Super Champion

+1 thanks for the tip of powershell script. hopefully will get more ideas from other people

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!

Take Action Automatically on Splunk Alerts with Red Hat Ansible Automation Platform

 Are you ready to revolutionize your IT operations? As digital transformation accelerates, the demand for ...

Calling All Security Pros: Ready to Race Through Boston?

Hey Splunkers, .conf25 is heading to Boston and we’re kicking things off with something bold, competitive, and ...

Beyond Detection: How Splunk and Cisco Integrated Security Platforms Transform ...

Financial services organizations face an impossible equation: maintain 99.9% uptime for mission-critical ...