systemd - Plugin to monitor systemd units state
Linux systems with systemd installed.
No configuration is required for this plugin. You may optionally pass warning and critical values for any of the possible states (active, reloading, inactive, failed, activating, deactivating), and you may additionally pass both global and state-specific include/exclude filters to include only units you care about and/or exclude units you don't care about.
(Note that for failed units, default warning and critical values are set to 0 and 10, respectively. No other states have default levels set.)
Value calculations for each state are made using the following algorithm (all filters performed using
Global include rules are applied on the output of
systemctl list-units --all --no-legend; 2.
Global exclude rules are then applied to the result of that; 3.
for each state,
this global output is further filtered by include,
then exclude rules for the state; 4.
Then the result is filtered for the given state and the remaining units counted and listed.
An example configuration might be something like this:
[systemd_units] env.failed_warning 0 env.failed_critical 5 env.inactive_warning 10 env.inactive_critical 20 env.exclude boring env.inactive_exclude sleepy
In the example above, we've overridden the default warning and critical levels for failed units, added warning and critical levels for inactive units, then filtered out boring units from all results and filtered out sleepy units from results for the inactive state.
Olivier Mehani <email@example.com> Kael Shipman <firstname.lastname@example.org>
#%# family=auto #%# capabilities=autoconf