Page 1 of 1

18TB disk not monitoring

Posted: Fri May 10, 2019 7:30 am
by progressive.nagiosXI
Hi ,

we are not able to monitor drive size greater than 2TB.

Actual disk Usage == Showing in nagiosxi
1TB = 50% used
2TB = 100% used
4TB = 200% used
6TB = 300% used
8TB = 400% used


Please help to set threshold 800% for check_snmp_storage.pl as drive is 18TB and plugin show error when set threshold greater than 100%,PFA

Also we are not able to calculate Total storage size data coming from OID:-
/hana/data/P10 == 18 TB Disk Size
HOST-RESOURCES-MIB::hrStorageIndex.34 = INTEGER: 34
HOST-RESOURCES-MIB::hrStorageType.34 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.34 = STRING: /hana/shared/P10
HOST-RESOURCES-MIB::hrStorageAllocationUnits.34 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.34 = INTEGER: 1609042432
HOST-RESOURCES-MIB::hrStorageUsed.34 = INTEGER: 19216671
=======================
/ == 254 GB Disk size
HOST-RESOURCES-MIB::hrStorageIndex.31 = INTEGER: 31
HOST-RESOURCES-MIB::hrStorageType.31 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.31 = STRING: /
HOST-RESOURCES-MIB::hrStorageAllocationUnits.31 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.31 = INTEGER: 66482969
HOST-RESOURCES-MIB::hrStorageUsed.31 = INTEGER: 12148555
=======================

Re: 18TB disk not monitoring

Posted: Fri May 10, 2019 11:34 am
by cdienger
This is a limitation of SNMP - updating net-snmp on the monitored machine and adding "realStorageUnits 0" to the snmpd.conf is a potential work around:

https://bugzilla.redhat.com/show_bug.cgi?id=1257161

Re: 18TB disk not monitoring

Posted: Mon May 13, 2019 7:03 am
by progressive.nagiosXI
added "realStorageUnits 0" to the snmpd.conf and
then restart the snmpd service

we are getting same value as before

$/usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 10.199.5.19 -C string --v2c -m "^/hana/data/P10$" -w 70 -c 80 -f
/hana/data/P10: 328%used(6853044MB/2091018MB) (>80%) : CRITICAL | '/hana/data/P10'=6853044MB;1463713;1672814;0;2091018


Please provide some alternative like set Critical threshold 800% for check_snmp_storage.pl as drive is 18TB.
$ /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 10.199.5.19 -C string --v2c -m "^/hana/data/P10$" -w 700 -c 800 -f
percent must be < 100

Actual disk Usage == Showing in nagiosxi
1TB = 50% used
2TB = 100% used
4TB = 200% used
6TB = 300% used
8TB = 400% used

Thanks

Re: 18TB disk not monitoring

Posted: Mon May 13, 2019 11:40 am
by cdienger
Line 302 of the plugin looks like:

Code: Select all

 if ( ($o_warn > 100 ) || ($o_crit > 100 )) { print "percent must be < 100\n";print_usage(); exit $ERRORS{"UNKNOWN"}};
Commenting it out should take care of the "percent must be < 100" message:

Code: Select all

 if ( ( $o_type eq 'pl' ) || ( $o_type eq 'pu' )) {
    # if ( ($o_warn > 100 ) || ($o_crit > 100 )) { print "percent must be < 100\n";print_usage(); exit $ERRORS{"UNKNOWN"}};
    }
While this isn't likely to cause any problems, note that we are not the authors of check_snmp_storage_wizard.pl and changes in one part of the code may impact other parts.

Re: 18TB disk not monitoring

Posted: Tue May 14, 2019 12:35 pm
by progressive.nagiosXI
Thanks ,now we set threshold at 700,800%.


Team can you please also explain how used storage calculated to 332% by below plugin.(which formula is used)

[nagios@monitoring-nagiosxi~]$ /usr/local/nagios/libexec/check_snmp_storage_wizard.pl -H 10.199.5.18 -C String--v2c -m "^/hana/data/P10$" -w 70 -c 80 -f
/hana/data/P10: 332%used(6934083MB/2091018MB) (>80%) : CRITICAL | '/hana/data/P10'=6934083MB;1463713;1672814;0;2091018


/hana/data/P10 == 18 TB Disk Size
HOST-RESOURCES-MIB::hrStorageIndex.36 = INTEGER: 36
HOST-RESOURCES-MIB::hrStorageType.36 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.36 = STRING: /hana/data/P10
HOST-RESOURCES-MIB::hrStorageAllocationUnits.36 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.36 = INTEGER: 535300608 (18 TB)
HOST-RESOURCES-MIB::hrStorageUsed.36 = INTEGER: 1775125134 (6.7TB)

used storage= hrStorageUsed.34*hrStorageAllocationUnits.34
=>1775125134 *4096 != Actual usage (6.7TB/18TB).


Thanks

Re: 18TB disk not monitoring

Posted: Tue May 14, 2019 1:46 pm
by cdienger
I believe the code that calculates the percentage is:

Code: Select all

if ( $$result{$used_table . $tindex[$i]} != 0 ) {
        $pu = $$result{$used_table . $tindex[$i]}* 100 /  ( $$result{$size_table . $tindex[$i]} * ( 100 - $o_reserve ) / 100 );
  }else {
    $pu=0;
  }
Running the command with the "-v" can also help give you an idea of what values are being returned/used.

Re: 18TB disk not monitoring

Posted: Tue May 14, 2019 2:35 pm
by progressive.nagiosXI
Thanks,

Why hrStorageSize value(!=18TB) < hrStorageUsed value

/hana/data/P10 == 18 TB Disk Size
HOST-RESOURCES-MIB::hrStorageIndex.36 = INTEGER: 36
HOST-RESOURCES-MIB::hrStorageType.36 = OID: HOST-RESOURCES-TYPES::hrStorageFixedDisk
HOST-RESOURCES-MIB::hrStorageDescr.36 = STRING: /hana/data/P10
HOST-RESOURCES-MIB::hrStorageAllocationUnits.36 = INTEGER: 4096 Bytes
HOST-RESOURCES-MIB::hrStorageSize.36 = INTEGER: 535300608 (18 TB)
HOST-RESOURCES-MIB::hrStorageUsed.36 = INTEGER: 1775125134 (6.7TB)

@team have you any known snap version which work for higher TB disks like 20TB,40TB etc.
Or is their any way to find why realStorageUnits 0 not worked for us.

Re: 18TB disk not monitoring

Posted: Tue May 14, 2019 3:44 pm
by cdienger
According to the BZ link that was posted, newer versions of net-snmp should be able to use realStorageUnits. Make sure the package installed on the machine supports this.