Check podman-info¶
Overview¶
Displays system-wide Podman information including container counts, image count, storage driver, logging driver, number of search registries, runtime version, available CPUs, and total memory. Alerts on the warnings and errors Podman writes while answering. Individual lines can be filtered out with --ignore (e.g. benign cgroup warnings on rootless hosts). For Docker, use the docker-info check instead.
Important Notes:
- Podman runs rootless by default, and every user keeps their containers and images in their own storage. Running the check as root (via
sudo) reports on root's own Podman, not on the rootless containers of other users. To report on a rootless user's Podman, pass--user=<name>: the check then runs podman as that user. Every line of output names the inspected user, so an empty result against root's storage is obvious. The Podman Service Set in the Icinga Director creates its services without--user. Set it on the service of every host whose containers belong to a rootless user, otherwise a tagged host reports "No containers to check" while the containers are running.
Data Collection:
- Executes
podman info --format jsonto collect system-wide Podman information - Parses container counts (running, paused, stopped), image count, storage driver, logging driver, registries, Podman version, CPU count, and total memory
Fact Sheet¶
| Fact | Value |
|---|---|
| Check Plugin Download | https://github.com/Linuxfabrik/monitoring-plugins/tree/main/check-plugins/podman-info |
| Nagios/Icinga Check Name | check_podman_info |
| Check Interval Recommendation | Every day |
| Can be called without parameters | Yes |
| Runs on | Cross-platform |
| Compiled for Windows | No |
Help¶
usage: podman-info [-h] [-V] [--always-ok] [--ignore IGNORE] [--no-perfdata]
[--user USER]
Displays system-wide Podman information including container counts, image
count, storage driver, logging driver, number of search registries, runtime
version, available CPUs, and total memory. Alerts on the warnings and errors
Podman writes while answering. Individual lines can be filtered out with
--ignore (e.g. benign cgroup warnings on rootless hosts). For Docker, use the
docker-info check instead. Requires root or sudo.
options:
-h, --help show this help message and exit
-V, --version show program's version number and exit
--always-ok Always returns OK.
--ignore IGNORE Ignore stderr lines matching this Python regular
expression. Case-sensitive by default; use `(?i)` for case-
insensitive matching. Can be specified multiple times.
Example: `--ignore="cgroup v1"` to suppress a benign
cgroup-version warning on hosts that have not yet migrated
to cgroup v2. Example: `--ignore="(?i)rootless"` (case-
insensitive) to suppress any rootless-related informational
warning. Default: None
--no-perfdata Suppress the performance data section from the output. The
status message and the exit code are unaffected, so
alerting keeps working while trending data is dropped.
--user USER Report on the rootless Podman of this user instead of the
one visible to the executing user. Podman keeps each user's
rootless containers and images in that user's own storage,
so root (the monitoring user runs the check via sudo) does
not see them. With --user, the check runs podman as that
user. Requires the right to `sudo -u <user>` (root has this
by default). Example: `--user=rocketchat`. Default: None
Documentation:
https://linuxfabrik.github.io/monitoring-plugins/check-plugins/podman-info/
Usage Examples¶
./podman-info
Output:
2 Containers (1 running, 0 paused, 1 stopped), 1055 Images, Storage Driver: overlay, Logging Driver: journald, 3 Registries, Podman v5.8.1, 8 CPUs, 30.9GiB Memory
States¶
- OK if
podman infocompletes without warnings or errors. - WARN on
podman infowarnings in stderr. - CRIT on
podman infoerrors in stderr or return codes != 0. - UNKNOWN if the check may not talk to the container engine. The engine is answering, this check is only not allowed to ask, so it says nothing about it and names the sudoers file instead.
- UNKNOWN if the answer cannot be read, or reports no version at all.
--always-oksuppresses all alerts and always returns OK.
Perfdata / Metrics¶
| Name | Type | Description |
|---|---|---|
| containers | Number | Number of containers. |
| containers_paused | Number | Number of paused containers. |
| containers_running | Number | Number of running containers. |
| containers_stopped | Number | Number of stopped containers. |
| cpu | Number | Number of host CPUs. |
| images | Number | Number of images. |
| ram | Bytes | Total host memory. |
Credits, License¶
- Authors: Linuxfabrik GmbH, Zurich
- License: The Unlicense, see LICENSE file.