-
Notifications
You must be signed in to change notification settings - Fork 29
Nagios Plugin check_pressure
Davide Madrisan edited this page Jul 11, 2022
·
1 revision
check_pressure - check whether the given filesystems are mounted
[/etc/nrpe.d/check_pressure]
command[check_pressure]=/usr/lib/nagios/plugins/check_pressure
This plugin checks Linux Pressure Stall Information (PSI) data.
Copyright (C) 2020 Davide Madrisan <[email protected]>
Usage:
check_pressure --cpu [-w COUNTER] [-c COUNTER] [delay]
check_pressure --io [--full] [-w COUNTER] [-c COUNTER] [delay]
check_pressure --memory [--full] [-w COUNTER] [-c COUNTER] [delay]
Options:
-C, --cpu return the cpu pressure metrics
-i, --io return the io (block layer/filesystems) pressure metrics
-m, --memory return the memory pressure metrics
-f, --full select the data labeled "full" to calculate thresholds
instead of the one with "some" (io and memory only)
-w, --warning COUNTER warning threshold (in microseconds/s)
-c, --critical COUNTER critical threshold (in microseconds/s)
-h, --help display this help and exit
-V, --version output version information and exit
"delay" is the delay in seconds between two proc reads (default: 1sec)
Note:
It requires at least a kernel 4.20, which provides this information in the
/proc/pressure folder.
Examples:
check_pressure --cpu
check_pressure --io
check_pressure --memory --full 100 2
> /usr/lib/nagios/plugins/check_pressure --cpu
pressure (CPU starvation) OK: 13103 microsecs/s | cpu_avg10=1.00% cpu_avg60=1.00% cpu_avg300=1.00% cpu_starvation/s=13103
> /usr/lib/nagios/plugins/check_pressure --io
pressure (IO starvation) OK: some:36 full:36 microsecs/s | io_some_avg10=0.00% io_some_avg60=0.00% io_some_avg300=0.00% io_some_starvation/s=36 io_full_avg10=0.00% io_full_avg60=0.00% io_full_avg300=0.00% io_full_starvation/s=36
> /usr/lib/nagios/plugins/check_pressure --memory --full 10 2
pressure (Memory starvation) OK: some:0 full:0 microsecs/s | mem_some_avg10=0.00% mem_some_avg60=0.00% mem_some_avg300=0.00% mem_some_starvation/s=0 mem_full_avg10=0.00% mem_full_avg60=0.00% mem_full_avg300=0.00% mem_full_starvation/s=0
cpu_avg10
cpu_avg60
cpu_avg300
cpu_starvation/s
io_some_avg10
io_some_avg60
io_some_avg300
io_some_starvation/s
io_full_avg10
io_full_avg60
io_full_avg300
io_full_starvation/s
mem_some_avg10
mem_some_avg60
mem_some_avg300
mem_some_starvation/s
mem_full_avg10
mem_full_avg60
mem_full_avg300
mem_full_starvation/s
You can find detailed informations in the PSI - Pressure Stall Information page of the Linux Kernel Documentation site.