Monitor and automatically restart Windows services in SAM

You can configure SAM to monitor Windows services, automatically restart any Down services, and send an email notification about the event. To set this up, you'll need to complete two tasks:

  • Create an application monitor to check nodes for stopped Windows services and switch the status to Down, and
  • Create an alert to detect Windows services that are down, restart services automatically, and send notification emails.

A good analogy for this is a fuel indicator for a car. A sensor checks the level of gas in your tank, similar to how a SAM template or application monitor checks the status of a Windows service on a node. The car includes a series of symbols that light up in the dashboard when events occur, such as low tire pressure or a bad battery. If the gas level drops very low, a sensor triggers the low fuel indicator to illuminate in your dashboard. In SAM, you can create an alert to detect if Windows services are Down, restart the services, and then send an email to a group or person. Returning to the analogy, you don't have to fill the tank of gas, SAM does it for you.

Create an application monitor to check for stopped Windows services

Follow these steps to create an application monitor that consists of a single component monitor, the Windows Service Monitor, and assign it to nodes in your environment.

  1. Click Settings > All Settings > SAM Settings > Component Monitor Wizard.
  2. Select Windows Service Monitor, and then click Next.
  3. Enter the IP address of the Windows node you want to monitor, or click Browse to select the node from a list.
  4. Enter or select the appropriate credentials, choose a Platform type, and then click Next.
  5. Select services to monitor and click Next.
  6. Select component monitors and edit properties as necessary, and then click Next.
  7. On the Add to Application Monitor or Template tab, select New Application Monitor, provide a name, and then click Next.
  8. On the Assign to Nodes tab, select the nodes to monitor and click Next.
  9. On the Confirm tab, click OK, Create.

When polling begins, the application monitor checks Windows services on each assigned node. If any Windows services are stopped, SAM switches the status of the service to Down, as displayed in the Orion Web Console.

To learn more about SAM templates, see Use application monitor templates and component monitors.

Create an alert to restart Windows services and send an email

You may require Admin-level permissions to create alerts that restart Windows services automatically.

Follow these steps to create an alert that restarts Windows services and sends an email to notify a group or person that services were restarted.

  1. Click Alerts & Activity > Alerts.
  2. On the All Active Alerts page, click Manage Alerts.
  3. Click Add New Alert and follow these steps to create the alert. Click Next to navigate through pages.
    1. Enter alert properties to specify who can view the alert, its severity, and how frequently alert conditions are evaluated.
    2. Define the conditions must exist to trigger the alert. In this case, you'll want to alert on a Component.
    3. Define what event occurs to reset the alert.
    4. Schedule when you want the alert to monitor your environment.
    5. Define what happens when an alert is triggered.
    6. Define what happens when the alert is reset.
    7. Review your alert, including the number of alerts that will be triggered based on the conditions you defined.
  4. Scroll to the bottom of the list in the Manage Alerts dialog box, and check the box for Restart a service.
  5. To send an email notification for the service restart:
    1. Highlight Restart a Service and click Edit.
    2. Select the Trigger Actions tab and then click Add New Action.
    3. Select Send an E-Mail / Page and click OK.
    4. Complete the e-mail info and click OK.
    5. Click OK.
  6. Click Done.

To learn more about alerts, see Use alerts to monitor your environment in the Orion Platform Administrator Guide.