-
Notifications
You must be signed in to change notification settings - Fork 29
Nagios Plugin check_podman
Davide Madrisan edited this page Aug 8, 2020
·
1 revision
check_podman - returns some runtime metrics of Podman containers
[/etc/nrpe.d/check_podmand]
command[check_podman_block_in]=/usr/lib/nagios/plugins/check_podman --block-in
command[check_podman_block_out]=/usr/lib/nagios/plugins/check_podman --block-out
command[check_podman_cpu]=/usr/lib/nagios/plugins/check_podman --cpu
command[check_podman_memory]=/usr/lib/nagios/plugins/check_podman --memory
command[check_podman_net_in]=/usr/lib/nagios/plugins/check_podman --net-in
command[check_podman_net_out]=/usr/lib/nagios/plugins/check_podman --net-out
command[check_podman_pids]=/usr/lib/nagios/plugins/check_podman --pids
This plugin returns some runtime metrics of Podman containers
Copyright (C) 2020 Davide Madrisan <[email protected]>
Usage:
check_podman [--image IMAGE] [-w COUNTER] [-c COUNTER]
check_podman --block-in [-b,-k,-m,-g] [--image IMAGE] [-w COUNTER] [-c COUNTER]
check_podman --block-out [-b,-k,-m,-g] [--image IMAGE] [-w COUNTER] [-c COUNTER]
check_podman --cpu [--image IMAGE] [-w COUNTER] [-c COUNTER]
check_podman --memory [-b,-k,-m,-g] [--image IMAGE] [--perc] [-w COUNTER] [-c COUNTER]
check_podman --net-in [-b,-k,-m,-g] [--image IMAGE] [-w COUNTER] [-c COUNTER]
check_podman --net-out [-b,-k,-m,-g] [--image IMAGE] [-w COUNTER] [-c COUNTER]
Options:
-i, --image IMAGE limit the investigation only to the containers running IMAGE
-l, --block-in return the block input metrics
-C, --cpu return the cpu percentage metrics
-L, --net-out return the block output metrics
-M, --memory return the runtime memory metrics
-n, --net-in return the network input metrics
-N, --net-out return the network output metrics
-p, --pids return the number of PIDs
'b,-k,-m,-g show output in bytes, KB (the default), MB, or GB
-%, --perc return the percentages when possible
-a, --varlink-address ADDRESS varlink address (default: unix:/run/podman/io.podman)
-w, --warning COUNTER warning threshold
-c, --critical COUNTER critical threshold
-h, --help display this help and exit
-V, --version output version information and exit
Note:
Podman stats will not work in rootless environments that use CGroups V1.
Rootless environments that use CGroups V2 are not able to report statistics
about their networking usage.
Examples:
check_podman -w 100 -c 120
check_podman -i "docker.io/library/nginx:latest" -c 5:
check_podman --block-out -m
check_podman --cpu
check_podman --memory -k --perc
check_podman --memory -m --image "docker.io/library/nginx:latest"
check_podman --net-in -k --image "docker.io/library/redis:latest"
check_podman --pids --warning 8: