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
Get Updates on the Splunk Community!

Routing logs with Splunk OTel Collector for Kubernetes

The Splunk Distribution of the OpenTelemetry (OTel) Collector is a product that provides a way to ingest ...

Welcome to the Splunk Community!

(view in My Videos) We're so glad you're here! The Splunk Community is place to connect, learn, give back, and ...

Tech Talk | Elevating Digital Service Excellence: The Synergy of Splunk RUM & APM

Elevating Digital Service Excellence: The Synergy of Real User Monitoring and Application Performance ...