From c67e5f984666290159fc8a5cd5a5c94c5b38526e Mon Sep 17 00:00:00 2001 From: fbsanchez Date: Tue, 16 Mar 2021 10:14:28 +0100 Subject: [PATCH] hrStorageAllocationUnits fixed ref. snmp_remote.pl --- pandora_server/util/plugin/snmp_remote.pl | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pandora_server/util/plugin/snmp_remote.pl b/pandora_server/util/plugin/snmp_remote.pl index 040de876bb..96d1f69c39 100755 --- a/pandora_server/util/plugin/snmp_remote.pl +++ b/pandora_server/util/plugin/snmp_remote.pl @@ -247,9 +247,10 @@ if ($module eq "diskuse") { $diskuse = 0; } else { - my @diskfree = split (/\s/, `snmpget -r 2 $command_line_parameters .1.3.6.1.2.1.25.2.3.1.6.$diskid`) ; + # hrStorageAllocationUnits + my @diskUsed = split (/\s/, `snmpget -r 2 $command_line_parameters .1.3.6.1.2.1.25.2.3.1.6.$diskid`) ; - $diskuse = ($disktot[-1] - $diskfree[-1]) * 100 / $disktot[-1]; + $diskuse = ($diskUsed[-1] * 100) / $disktot[-1]; } printf("%.2f", $diskuse);