check_snmp_storage and 5% reserved space on local FS

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

check_snmp_storage and 5% reserved space on local FS

Post by emi65 »

Hi
I'm using Nagios core 4.2.1 and check_snmp_storage Ver. 1.3.3

The check show this situation
../check_snmp_storage -H 10.209.31.120 -S0,1 -C SGS-MGMT-01 -m ^/ -q "FixedDisk" -w5 -c8 -o 20000 -t 60
CRITICAL : (>8%) /boot: 20%used(20MB/99MB) /filestore/p8p2000: 6%used(119MB/2016MB) /var: 19%used(384MB/1984MB) /shared: 94%used(1898MB/2016MB) /filestore/P8GN000: 15%used(299MB/2016MB) /filestore/P8AF002: 17%used(1671MB/10079MB) /was: 72%used(2892MB/4032MB) /filestore/p8prpef: 38%used(774MB/2016MB) /: 67%used(3324MB/4960MB)


df -k
Filesystem blocchi di 1K Usati Disponib. Uso% Montato su
/dev/mapper/vg00-lv_slash
5078656 3403444 1413084 71% /
/dev/mapper/vg00-lv_var
2031440 392880 1533704 21% /var
/dev/mapper/vg00-lv_backup
4062912 163976 3689224 5% /var/backup
/dev/mapper/vg00-lv_tmp
1015704 35624 927652 4% /tmp
/dev/mapper/vg00-lv_home
1015704 34728 928548 4% /home
/dev/mapper/vg00-lv_was
4128448 2961836 956924 76% /was
/dev/sda1 101086 20129 75738 21% /boot
/dev/mapper/vg00-lv_shared
2064208 1943360 16004 100% /shared

tmpfs 2021860 0 2021860 0% /dev/shm
sgsfilvr04:/vol/vr_nosnapnorepl01/wasinst
31457280 22295040 9162240 71% /install
sgsfilvr04:/vol/vr_nosnapnorepl03/fp8adde2
10485760 2803264 7682496 27% /filestore
/dev/mapper/vg00-lv_p8p2000
2064208 121816 1837536 7% /filestore/p8p2000
/dev/mapper/vg00-lv_p8prpef
2064208 792988 1166364 41% /filestore/p8prpef
/dev/mapper/vg00-lv_P8AF002
10321208 1711384 8085536 18% /filestore/P8AF002


You can see that the /shared is showed by check , used 94% but df -k shows the /shared used to 100%
The difference seems due to 5% of OS (Linux) reserved space .

Does it exist a check that use to calculate the used space also this reserved space ?

thanks
Emilio
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: check_snmp_storage and 5% reserved space on local FS

Post by emi65 »

I found that exist the -R option
If I use this option the 5% of reseverd space is counted ... but ....

This 5% is used for local and nfs FS and this is an error because must be used only for local FS

I'm not an perl expert
Someone could be check the check code in order to understand if it is possible to correct this bug ?

thanks
Emilio
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_storage and 5% reserved space on local FS

Post by tgriep »

I think the problem is a rounding issue with the df command.
The output shows that the partition does have some free space and it is not at 100% used.
Try running the df command like the example below using 4048 as the block size.

Code: Select all

df -B 4096
https://support.nagios.com/forum/viewto ... 04#p223804
Be sure to check out our Knowledgebase for helpful articles and solutions!
emi65
Posts: 119
Joined: Fri Aug 17, 2012 3:41 am

Re: check_snmp_storage and 5% reserved space on local FS

Post by emi65 »

I'm sorry but it isn't a Block Size problem

df -B 4096 doen't change the output result

The check_snmp_storage has -R option in order to sum 5% space to %occupied space

The rule should be applie only to ext2 and ext3 FS but the script sum this 5% to NFS FS

This is the error

Regards
Emilio
User avatar
tgriep
Madmin
Posts: 9177
Joined: Thu Oct 30, 2014 9:02 am

Re: check_snmp_storage and 5% reserved space on local FS

Post by tgriep »

Try posting a bug fix at the following site to see if the maintainer of the plugin will fix the issue for you.
https://github.com/dnsmichi/manubulon-snmp/issues
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked