NagiosEnterprises / ncpa

Nagios Cross-Platform Agent
Other
177 stars 95 forks source link

FR: disk/logical thresholds check the used space but show used/free/total, please add the functionality to change which metric the thresholds match against #817

Open ssaxnagios opened 3 years ago

ssaxnagios commented 3 years ago

FR: disk/logical thresholds check the used space but show used/free/total, please add the functionality to change which metric the thresholds match against.

The default check thresholds check the used space:

[root@xid ~]# /usr/local/nagios/libexec/check_ncpa.py -H 192.168.X.X -t 'yourtoken' -P 5693 -M 'disk/logical/D:|' -w '90' -c '95'
OK: Used disk space was 84.90 % (Used: 100.67 GiB, Free: 17.92 GiB, Total: 118.58 GiB) | 'used'=100.67GiB;107;113; 'free'=17.92GiB;107;113; 'total'=118.58GiB;107;113;

You can check the free space like this:

[root@xid ~]# /usr/local/nagios/libexec/check_ncpa.py -H 192.168.X.X -t 'yourtoken' -P 5693 -M 'disk/logical/D:|/free' -w '8:' -c '5:' -u G
OK: Free was 19.24 GB | 'free'=19.24GB;8:;5:;

But then the used/total metrics are missing (which obviously won't be shown/graphed). It would be nice if you could specify which metric the thresholds match against and still show all three used, free, and total metrics.

Thanks!

From here:

https://support.nagios.com/tickets/scp/tickets.php?id=15966