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.
- Click Settings > All Settings > SAM Settings > Component Monitor Wizard.
- Select Windows Service Monitor, and then click Next.
- Enter the IP address of the Windows node you want to monitor, or click Browse to select the node from a list.
- Enter or select the appropriate credentials, choose a Platform type, and then click Next.
- Select services to monitor and click Next.
- Select component monitors and edit properties as necessary, and then click Next.
- On the Add to Application Monitor or Template tab, select New Application Monitor, provide a name, and then click Next.
- On the Assign to Nodes tab, select the nodes to monitor and click Next.
- 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.
- Click Alerts & Activity > Alerts.
- On the All Active Alerts page, click Manage Alerts.
- Click Add New Alert and follow these steps to create the alert. Click Next to navigate through pages.
- Enter alert properties to specify who can view the alert, its severity, and how frequently alert conditions are evaluated.
- Define the conditions must exist to trigger the alert. In this case, you'll want to alert on a Component.
- Define what event occurs to reset the alert.
- Schedule when you want the alert to monitor your environment.
- Define what happens when an alert is triggered.
- Define what happens when the alert is reset.
- Review your alert, including the number of alerts that will be triggered based on the conditions you defined.
- Scroll to the bottom of the list in the Manage Alerts dialog box, and check the box for Restart a service.
- To send an email notification for the service restart:
- Highlight Restart a Service and click Edit.
- Select the Trigger Actions tab and then click Add New Action.
- Select Send an E-Mail / Page and click OK.
- Complete the e-mail info and click OK.
- Click OK.
- Click Done.
To learn more about alerts, see Use alerts to monitor your environment in the Orion Platform Administrator Guide.