Restart a service if alarm is triggered (service is not down)
-
Hello,
I'm monitoring a webservice using NetXMS and want to restart the windows service that's responsible for this webservice, in case of a returnvalue other then HTTP 200.
The monitoring already works fine and I get notified when the returnvalue is different to 200.
The service itself is running when I check it, but it delivers no results anymore.
So I restart in manually at the moment to fix this.How can I make NetXMS do the net stop/net start commands?
Best regards
Stefan
-
Hi,
you can define action in agent configuration file on that machine:
ActionShellExec = RestartService:net stop svcname && net start svcname(I'm not sure if command is actually correct, but you should get an idea).
then define server side action of type "execute command on remote node", enter RestartService as command name, and add this new action in EPP to be executed on web service error event.
Best regards,
Victor -
Hello,
i want to watch a service called FileWaveWinClient.
The Alarm works fine, but the Server action does not work.In agent´s config file I added this line:
ActionShellExec = StartFileWaveService:"C:\Windows\system32\net.exe" start FileWaveWinClientI tried also:
ActionShellExec = StartFileWaveService:net start FileWaveWinClientIn Actions Configuration I added
Name: Start_FileWaveWinClient_Service
Type: Execute command on remote node via agent
Remote host <empty>
Agents´s action: StartFileWaveService
(See attachment "Action Configuration.png")I create a Event Processing Policy
Events: ... Process not running
Alarm - this configuration works fine. The Alarm is working
Server Actions: Start_FileWaveWinClient_Service - does not work
(See attachment "Event Processing Policy.png")The Alarm works fine, but the Server action does not work.
Thank you
Rainer


-
You should put either %a (to use IP address) or #%i (to refer to current node by ID) in "remote host" field.
Best regards,
Victor
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login