Use this Knowledge Script to monitor whether specified Microsoft Windows services are stopped or started, and, optionally, start any service that is stopped. This script allows you to monitor Windows Services that are not discovered by AppManager, such as the WinLogon or NetIQms services.
HINT:Use the General_ServiceDown script to monitor services that are discovered by AppManager.
Windows 2003 Server or later
The default schedule for this script is Every 5 minutes.
Set the following parameters as needed:
Description |
How to Set It |
---|---|
General Settings |
|
Job Failure Notification |
|
Event severity when job fails |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which the ServiceDown job fails unexpectedly. The default is 5 (red event indicator). |
Monitor Services |
|
Services to monitor |
Specify the names of the services you want to monitor, separating multiple names with commas. For example: MSSQLServer,SQLServerAgent,PrintSpooler. The default is EventLog,WinMgmt. You can specify the internal short service names (short service name), or the service name displayed in the Control Panel (long service name). Type an asterisk (*) to monitor all service startup types that are specified in the Service start-type filter parameter. To monitor multiple instances of the same instance name, use one of the following methods:
|
Service start-type filter |
Select the startup type for the services you want to monitor. This parameter is used only when monitoring all services or when you use an asterisk (*) to monitor services using a wildcard with partial service names entered in the Services to monitor parameter. The startup types include:
Use this parameter along with the Services to monitor parameter to monitor services by their startup types instead of their names. For example, if you enter “*” in the Services to monitor parameter and then select Manual, the script monitors all services whose startup type is Manual. The default is Automatic. Notes
|
Services to exclude |
Specify the names of the services you want to exclude from monitoring, separating multiple names with commas. You can specify the internal service names or the service names displayed in the Control Panel. |
Start services that stopped abnormally? |
Select Yes to automatically start services that stopped abnormally. The default is Yes. |
Also start services that were last stopped normally? |
Select Yes to automatically start a service that stopped normally, perhaps as the result of a stop request from another process or human interaction. The default is unselected. |
Service start timeout |
Set the maximum number of seconds to wait after initiating the start command before reporting that the service could not be started. If the service is not running after the specified amount of time, this script reports that the service did not start in the time you specified. The default is 30 seconds. |
Monitor Dependent Services |
|
Monitor dependent services? |
Select Yes to monitor services that are dependent upon the other services you chose to monitor. The default is Yes. |
Start dependent services that are stopped? |
Select Yes to automatically start a stopped service that is dependent upon a stopped monitored service. AppManager starts dependent services after the monitored service is started. The default is unselected. The options you choose for start-type filter and service start timeout apply to dependent services as well. NOTE:If you enable this parameter, you must also enable the Monitor dependent services? parameter. |
Event Notification |
|
Raise event if a service stopped abnormally and will not be restarted? |
Select Yes to raise an event if a service stopped abnormally, and you have selected this script to restart the service. The default is Yes. |
Event severity when a service stopped abnormally and will not be restarted |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which a service stopped abnormally, and you have selected this script to restart the service. The default is 5 (red event indicator). |
Raise event if a service is stopped and cannot be started? |
Select Yes to raise an event if a service is stopped and this script cannot start the service. The default is Yes. |
Event severity when a service is stopped and cannot be started |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which a stopped service cannot be started. The default is 10 (red event indicator). |
Raise event if a stopped service is started successfully? |
Select Yes to raise an event if AppManager successfully starts a stopped service. The default is Yes. |
Event severity when a stopped service is started successfully |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which AppManager successfully starts a stopped service. The default is 25 (blue event indicator). |
Raise event if a service was last stopped normally? |
Select Yes to raise an event if a service was last stopped normally. If enabled, an event is raised only if Also start services that were last stopped normally is not selected. The default is Yes. |
Event severity when a services was last stopped normally |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which a service stopped normally and was not set to be started. The default is 30 (blue event indicator). |
Raise event if a monitored service does not exist? |
Select Yes to raise an event if a service specified in the Services to monitor parameter does not exist. The default is Yes. |
Event severity when a monitored service does not exist |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which a monitored service cannot be found. The default is 8 (red event indicator). |
Raise event if a monitored service is disabled? |
Select Yes to raise an event if a service is disabled. The default is Yes. AppManager cannot automatically start disabled services. |
Event severity when a monitored service is disabled |
Set the event severity level, from 1 to 40, to indicate the importance of an event in which a monitored service is disabled. The default is 12 (yellow event indicator). |
Data Collection |
|
Collect data for monitored services? |
Select Yes to collect data for charts and reports. If enabled, data collection returns a separate datastream for each service you monitor:
The data detail message includes the name of the service, the start type, and the status. The default is unselected. |
Collect data for dependent services? |
Select Yes to collect data for charts and reports. If enabled, data collection returns a separate datastream for each dependent service you monitor:
The data detail message includes the name of the dependent service, the start type, and the status. The default is unselected. |