banshee/linux-collection/linux/ssh/
services
State of the services of a Linux by SSH, under systemd or OpenRC.
par banshee1 installation2 versions
v2Dernière
Publiée le 28 octobre 2026. One naming convention across collections; documentation completed.
Services of a Linux, by SSH
Returns the service manager that answered, systemd or OpenRC, and the state of each service, in systemd's words. By default only the SSH server and cron are watched; the others are chosen on the probe.
Versions
Generic: systemd (Debian, Fedora) and OpenRC (Alpine) are both read, and their commands write the same output on every distribution that ships them. The default selection names each service under every name it bears: ssh (the SSH server on Debian) and sshd, cron (Debian) and crond (Fedora, Alpine).
How it works
The collector runs systemctl list-units --type=service --all --no-legend --plain. If systemd does not answer (the command is missing, or the machine did not boot with systemd), it runs rc-status -a. If neither answers, it stops misconfigured with both error messages.
- systemd: the state is the active state (
active,inactive,failed,activating…). - OpenRC:
startedis given asactive,stoppedasinactive,crashedasfailed; other states stay as written. One watch thus holds on the three systems. - A line the collector does not recognise is skipped, and a service listed twice is returned once.
- Both commands only read: nothing is written on the target.
Prerequisites
- an SSH account for monitoring, without write rights; listing services needs no privilege;
- the fingerprint of the server's host key, set in
protocol:ssh:fingerprint(not needed when the Security settings trust the first SSH fingerprint presented).
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
manager | Service manager: systemd or openrc | — | no |
state | State | — | yes, per service (its name, without .service) |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
stopped | Service stopped | expected value, on state | critical unless active | yes |
missing | Service missing | expected instances, on state | no service named: it raises nothing until names are set on the probe | no |
Limits
- Under OpenRC,
rc-status -alists the services of a runlevel and those started by hand: a service in no runlevel and never started is not listed. - A service that is not installed is not listed either: the selection names services from several systems, and only those present are judged.