Check service

Overview

Checks the state of a Windows service.

Fact Sheet

Check Plugin Download

https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/service

Check Interval Recommendation

Once a minute

Can be called without parameters

No

Available for

Python 3, Windows

Requirements

Python module psutil

Help

usage: service [-h] [-V] --service SERVICE [--severity {crit,warn}]
               [--starttype {automatic,disabled,manual}]
               [--status {continue_pending,pause_pending,paused,running,start_pending,stop_pending,stopped}]

Check the state of a Windows service.

optional arguments:
  -h, --help            show this help message and exit
  -V, --version         show program's version number and exit
  --service SERVICE     Name of the service.
  --severity {crit,warn}
                        Severity if something is found. Default: warn
  --starttype {automatic,disabled,manual}
                        Expected service start type. Default: automatic
  --status {continue_pending,pause_pending,paused,running,start_pending,stop_pending,stopped}
                        At least one expect

Usage Examples

service.exe --service Schedule --status running --severity crit

Output:

Schedule is running, automatic

States

  • WARN if result does not match the given parameter values.

  • CRIT only if configured as such.

Perfdata / Metrics

There is no perfdata.

Credits, License