TracNav menu
-
Home
-
Documentation...
-
Information...
-
Commands/Modules
-
CheckDisk...
-
CheckEventLog...
-
CheckSystem
- CheckCPU
- CheckUpTime
- CheckServiceState
- CheckProcState
- CheckMem
- CheckCounter
-
CheckHelpers...
-
CheckTaskSched...
-
FileLogger...
-
NRPEListener...
-
NSClientListener...
-
SysTray...
-
CheckWMI...
-
RemoteConfiguration...
-
CheckExternalScripts...
-
LUAScript...
-
NSCAAgent...
-
Donate...
CheckServiceState
This check checks the state of one or more service on the system and generates a critical state if any service is not in the required state.
| Option | Values | Description |
| ShowAll | A flag to toggle if all service states should be listed. | |
| ShowFail? | (default) | A flag to indicate if only failed service states should be listed. |
| service=state | A service name or service display name and a state the service should have. The state can be either started or stopped. If no state is given started is assumed. | |
| CheckAll? | Check to see that all services set to auto-start are started and all set to disabled are not started. | |
| exclude | service name | Exclude this service from CheckAll? |
Examples
Check that myService is running and that MyStoppedService? is not running:
checkServiceState ShowAll myService MyStoppedService=stopped myService : Running - MyStoppedService : Stopped
Check that all auto-start services are running but exclude some that are intentionaly not in the correct state:
checkServiceState CheckAll exclude=wampmysqld exclude=MpfService OK: All services are running.
If the service you are excluding has spaces in, you need to enclose the entire option in quotes, not just the string.
checkServiceState CheckAll exclude=wampmysqld "exclude=NetBackup SAN Client Fibre Transport Service"




