mirror of
https://github.com/monitoring-plugins/monitoring-plugins.git
synced 2026-04-21 06:08:38 -04:00
* check_disk increase alert precision
Free disk percentage value was rounded to a full integer meaning it alerted about ~1% percent too early. This is about 10GB on a 1TB disk.
The warning and critical thresholds already support float values, so just the percentage calculation needs to be improved.
old:
./check_disk -w 35% -c 20% -p / -f -vvv
Thresholds(pct) for / warn: 35.000000 crit 20.000000
calling stat on /
For /, used_pct=65 free_pct=35 used_units=286451 free_units=156651 total_units=443102 used_inodes_pct=11 free_inodes_pct=89 fsp.fsu_blocksize=4096 mult=1048576
Freespace_units result=0
Freespace% result=1
Usedspace_units result=0
Usedspace_percent result=0
Usedinodes_percent result=0
Freeinodes_percent result=0
DISK WARNING - free space: WARNING [ / 156651MiB (35% inode=89%)];| /=300365643776B;302006979788;371700898201;0;464626122752
new:
./check_disk -w 35% -c 20% -p / -f -vvv
Thresholds(pct) for / warn: 35.000000 crit 20.000000
calling stat on /
For /, used_pct=64.649722 free_pct=35.350278 used_units=286464 free_units=156637 total_units=443102 used_inodes_pct=10.016183 free_inodes_pct=89.983817 fsp.fsu_blocksize=4096 mult=1048576
Freespace_units result=0
Freespace% result=0
Usedspace_units result=0
Usedspace_percent result=0
Usedinodes_percent result=0
Freeinodes_percent result=0
DISK OK - free space: / 156637MiB (35.4% inode=90%);| /=300379275264B;302006979788;371700898201;0;464626122752
* check_disk: adjust test case to support float precision
|
||
|---|---|---|
| .. | ||
| picohttpparser | ||
| t | ||
| tests | ||
| check_apt.c | ||
| check_by_ssh.c | ||
| check_cluster.c | ||
| check_curl.c | ||
| check_dbi.c | ||
| check_dig.c | ||
| check_disk.c | ||
| check_dns.c | ||
| check_dummy.c | ||
| check_fping.c | ||
| check_game.c | ||
| check_hpjd.c | ||
| check_http.c | ||
| check_ide_smart.c | ||
| check_ldap.c | ||
| check_load.c | ||
| check_mrtg.c | ||
| check_mrtgtraf.c | ||
| check_mysql.c | ||
| check_mysql_query.c | ||
| check_nagios.c | ||
| check_nt.c | ||
| check_ntp.c | ||
| check_ntp_peer.c | ||
| check_ntp_time.c | ||
| check_nwstat.c | ||
| check_overcr.c | ||
| check_pgsql.c | ||
| check_ping.c | ||
| check_procs.c | ||
| check_radius.c | ||
| check_real.c | ||
| check_smtp.c | ||
| check_snmp.c | ||
| check_ssh.c | ||
| check_swap.c | ||
| check_tcp.c | ||
| check_time.c | ||
| check_ups.c | ||
| check_users.c | ||
| common.h | ||
| Makefile.am | ||
| negate.c | ||
| netutils.c | ||
| netutils.h | ||
| popen.c | ||
| popen.h | ||
| runcmd.c | ||
| runcmd.h | ||
| sslutils.c | ||
| urlize.c | ||
| utils.c | ||
| utils.h | ||