Merge branch 'ent-2177-lead-error-en-plugin-de-servidor-snmp_remote-pl-catrian' into 'develop'

hrStorageAllocationUnits fixed ref. snmp_remote.pl

See merge request artica/pandorafms!3913
This commit is contained in:
Daniel Rodriguez 2021-04-13 13:24:03 +00:00
commit dd41c1c0f7
1 changed files with 3 additions and 2 deletions

View File

@ -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);