Ad Widget

Collapse

Restart Windows Service instead of just Starting it

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • laakness
    Junior Member
    • Oct 2009
    • 20

    #1

    Restart Windows Service instead of just Starting it

    Let me first start by saying that my triggers and actions and remote commands are working.

    My situation is that I'm looking to be able to restart a service that may not actually be in the stopped state. What I've tried thus far is not working.

    Trigger: Check on the bps speed of a web check. If that is equal to 0 for 5 minutes then I assume something is wrong with the web server.

    Action:
    hostname: net stop <servicename>
    hostname: net start <servicename>

    Action Condition:
    Host = web server AND
    Trigger = Trigger name AND
    Trigger severity >= High

    The reason I need to stop the service is that when this problem happens the web server is in the running state, but a restart of the service fixes the issue. Likely an application pool problem but we just need services up and running in the middle of the night should someone not address it immediately.

    When the trigger fires, the action kicks off and does a stop and start of the service which works fine. The issue is over the next 20 seconds or so the action continues to fire before the next check of the service state marks the trigger as OK. This causes it to usually catch the action right after it stops the service again but prior to starting it. You can see the infinite loop I'm now on

    Zabbix version 1.8.1

    Any suggestions are appreciated.
    Last edited by laakness; 11-02-2010, 17:14.
  • laakness
    Junior Member
    • Oct 2009
    • 20

    #2
    I think I fixed my issue. I found a different area in the wiki that mentioned to set the trigger value to Problem instead of using the severity level. This may have been the loop problem.

    Comment

    Working...