1
0
mirror of https://github.com/opinkerfi/nagios-plugins.git synced 2024-11-25 03:43:46 +01:00

Fixed metric conversion for all mibs

This commit is contained in:
Tomas Edwardsson 2012-10-22 15:10:24 +00:00 committed by Tomas Edwardsson
parent d7f9474ed6
commit ae0968af02

View File

@ -41,11 +41,11 @@ my %rpduamps;
my %oids = (
'nbmstemp' => {
'label' => 'Temp',
'unit' => ($metric ? 'degC' : 'degF'),
'unit' => 'degF',
'oidbase' => '.1.3.6.1.4.1.5528.100.4.1.1.1',
'sensor_key' => 5,
'sensor_val' => 2,
'cdef' => ($metric ? '$val * 0.1' : '($val * .18) + 32')
'$val * 0.1'
},
'nbmshum' => {
'label' => 'Humidity',
@ -95,13 +95,13 @@ my %oids = (
},
'acscsupair' => {
'label' => 'Supply Air',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.8.0',
'cdef' => '$val * .10'
},
'acscretair' => {
'label' => 'Return Air',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.10.0',
'cdef' => '$val * .10'
},
@ -112,19 +112,19 @@ my %oids = (
},
'acscracktemp' => {
'label' => 'Rack Inlet Temp',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.6.0',
'cdef' => '$val * .10'
},
'acsccondin' => {
'label' => 'Cond Inlet Temp',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.30.0',
'cdef' => '$val * .10'
},
'acsccondout' => {
'label' => 'Cond Outlet Temp',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.4.1.2.28.0',
'cdef' => '$val * .10'
},
@ -152,19 +152,19 @@ my %oids = (
},
'acrcracktemp' => {
'label' => 'Rack Inlet Temp',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.6.0',
'cdef' => '$val * .10'
},
'acrcsupair' => {
'label' => 'Supply Air',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.8.0',
'cdef' => '$val * .10'
},
'acrcretair' => {
'label' => 'Return Air',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.10.0',
'cdef' => '$val * .10'
},
@ -183,13 +183,13 @@ my %oids = (
},
'acrcflenttemp' => {
'label' => 'Entering Fluid Temp',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.23.0',
'cdef' => '$val * .10'
},
'acrcflrettemp' => {
'label' => 'Returning Fluid Temp',
'unit' => 'F',
'unit' => 'degF',
'oid' => '.1.3.6.1.4.1.318.1.1.13.3.2.2.2.25.0',
'cdef' => '$val * .10'
},
@ -368,6 +368,11 @@ if ($param eq "rpduamps") {
$fval = $val;
}
if ($metric and $oids{$param}->{unit} eq 'degF') {
$oids{$param}->{unit} = 'degC';
$fval = sprintf("%.1f", f2c($fval));
}
if ($fval > $crit) {
$retval = 2;
$outmsg = "CRITICAL";