Follow

How To Automatically Restart a Monitored Windows Service That Stops Running

Applies To

  • Zenoss Core 4.2.x
  • Zenoss Resource Manager 4.1.x
  • Zenoss Resource Manager 4.2.x
  • Windows Zenpack version 2.1.2 or higher

Summary

Administrators may wish to configure Zenoss to automatically restart important services on Windows servers as soon as those services stop running. Resource Manager can be configured to both notify administrators and automatically restart the affected service.

Example Use Case

Consider a scenario wherein administrators have a recurring problem with the Print Spooler service stopping on certain systems, interrupting users' ability to print. The administrators wish to (i) be notified which servers are encountering the condition, so they can troubleshoot and (ii) have the Print Spooler service restarted immediately so that users' printing can continue in the meantime.

Procedure

Each of the following steps must be completed:

  1. Resource Manager must be configured to monitor the Print Spooler service, either on specific servers or on all servers.
    See Section 6.6.5 of the Zenoss Service Dynamics Resource Manager Administration guide for information on monitoring Windows services.
  2. A trigger must be configured to 'flag" the event associated with the service stopping. 
    See Section 2.6 of the Zenoss Service Dynamics Resource Manager Administration guide for information on setting up triggers.
  3. The notification must be configured as follows: 
    1. In the Zenoss UI, navigate to Events > Triggers.
    2. Click Notifications in the left pane.
    3. In the Notifications pane:
      1. click the + (plus) sign to display the Add Notification dialog box.
      2. Enter a name for the notification in the Id field.
      3. Click the Action drop-down and select WinCommand.
      4. Click Submit to save and exit the Add Notification dialog box.
    4. Double-click on your new notification in the Notifications pane.
    5. Under the Notification tab:
      1. Use the drop-down list to associate your trigger(s) for this notification.
      2. Click Add for each selection.
      3. Verify the checkboxes and options, especially:
        • Enabled:
        • Send only on Initial Occurrence?:
    6. Under the Content tab, enter the following into the Windows CMD Command field:

      net start ${component/id}

    7. Click Submit to close and save the information.

If desired, use these steps as a guide to set up an email notification and to associate it with the same trigger(s).

Was this article helpful?
0 out of 0 found this helpful

Comments

Powered by Zendesk