Restart Windows Services

In addition to monitoring the state of a Windows Service, to ensure that all essential services are running, the Advanced Monitoring Agent can attempt to restart a service when it is in the "stopped" state (either stopped unexpectedly or stopped manually).

How to setup the Windows Service Restart

The Windows Service Check Restart Service option was included from the Advanced Monitoring Agent 7.1 onwards.

When configuring the Check for the target Service simply enable the RESTART service if Stopped tick box, once enabled the Advanced Monitoring Agent will attempt to restart the selected service when it is in the Stopped state.

Windows Service Restart Example: in normal operation some web servers require IISRESET to run frequently and this is normally actioned from the Services console on the device. But when using the Windows Service Check this may be achieved by simply selecting the Restart Automatically if "Stopped" option for the WWW service (of course, underlying problems should be investigated in parallel.)

Services in the Disabled state are not restarted.

Some services may routinely stop as part of their normal operation, and restarting such services prematurely may cause problems. For example, an antivirus service may stop as part of the update process and restarting this service may result in the antivirus update failing to complete.

When RESTART service if Stopped is enabled, a new alert Restart Service Mail can be sent based on the number of consecutive restarts or the number of times the service is restarted within a given time period.

Alert Thresholds

The restart related option in the Alert Thresholds section become available when RESTART service if Stopped is enabled.

From this section it is possible to configure the restart alerting behavior with two options available:

Option

Behavior

Number of consecutive restarts before alert

This option sends an Alert when the number of consecutive restarts exceeds the entered threshold figure.

To adjust the Alert generation sensitivity select the number of consecutive restarts from the drop-down (1-50).

Please be aware that sending an Alert resets the consecutive restart counter.

Alert if service is restarted X times in Y hours

This option sends an Alert when the cumulative number of restarts exceeds the entered threshold figure during the selected time period.

To adjust the Alert generation sensitivity select the number of restarts from Alert if service is restarted (1-5) and times in () hours

Please be aware that any restarts that results in a consecutive restart Alert are excluded from the cumulative count.

Please note that we do not generate two messages for the same restart events, so depending on the number of consecutive restarts the restart may be included in either Number of consecutive restarts before alert is sent (where the consecutive restarts exceeded the threshold figure) or a Alert if service is restarted X times in Y hours (where the cumulative restarts for the time period exceeded the threshold figure - excluding any consecutive restarts an Alert was already generated for) .

Once the check results have uploaded to the Dashboard the results are displayed in the lower panel with increased detail available from the More Information column.

wsc_restart