WIP: new perfdata for hardware components
This commit is contained in:
parent
6e5d3b3e8f
commit
c709113cae
|
@ -105,13 +105,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan '%s' is %s rpm", $id, $result->{coolingFanRPM}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_' . $id, unit => 'rpm',
|
||||
value => $result->{coolingFanRPM},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $id,
|
||||
value => $result->{coolingFanRPM},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -105,13 +105,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s degree centigrade", $id, $result->{temperatureSensorDegreesCelsius}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $id, unit => 'C',
|
||||
value => $result->{temperatureSensorDegreesCelsius},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $id,
|
||||
value => $result->{temperatureSensorDegreesCelsius},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -75,13 +75,17 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Fan '%s' is %s rpm", $instance, $result->{fanSpeedStatus}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_' . $instance, unit => 'rpm',
|
||||
value => $result->{fanSpeedStatus},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $instance,
|
||||
value => $result->{fanSpeedStatus},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -74,13 +74,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Temperature '%s' is %s degree centigrade", $instance, $result->{temperatureSensorCReading}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $result->{temperatureSensorCReading},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{temperatureSensorCReading},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -75,11 +75,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan '%s' is '%s' rpm", $instance, $result->{boxServicesFanSpeed}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_' . $instance, unit => 'rpm',
|
||||
value => $result->{boxServicesFanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $instance,
|
||||
value => $result->{boxServicesFanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -75,11 +75,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is '%s' rpm", $instance, $result->{boxServicesTempSensorTemperature}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $result->{boxServicesTempSensorTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{boxServicesTempSensorTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -78,11 +78,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is '%s' C", $instance, $result->{enclosureTemperature}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $result->{enclosureTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{enclosureTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -240,10 +240,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Sensor '%s/%s' is %s %s", $sensor_descr, $instance, $result->{entSensorValue}, $perfdata_unit{$result->{entSensorType}}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => $component . '_' . $sensor_descr, unit => $perfdata_unit{$result->{entSensorType}},
|
||||
value => $result->{entSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => $component, unit => $perfdata_unit{$result->{entSensorType}},
|
||||
nlabel => 'hardware.' . $component,
|
||||
instances => $sensor_descr,
|
||||
value => $result->{entSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,11 +87,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Temperature '%s' is %s degree centigrade", $result->{ciscoEnvMonTemperatureStatusDescr}, $result->{ciscoEnvMonTemperatureStatusValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => "temp_" . $result->{ciscoEnvMonTemperatureStatusDescr}, unit => 'C',
|
||||
value => $result->{ciscoEnvMonTemperatureStatusValue},
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "temp", unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $result->{ciscoEnvMonTemperatureStatusDescr},
|
||||
value => $result->{ciscoEnvMonTemperatureStatusValue},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -88,11 +88,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Voltage '%s' is %.3f V", $result->{ciscoEnvMonVoltageStatusDescr}, $result->{ciscoEnvMonVoltageStatusValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => "voltage_" . $result->{ciscoEnvMonVoltageStatusDescr}, unit => 'V',
|
||||
value => sprintf("%.3f", $result->{ciscoEnvMonVoltageStatusValue}),
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "voltage", unit => 'V',
|
||||
nlabel => 'hardware.voltage.volt',
|
||||
instances => $result->{ciscoEnvMonVoltageStatusDescr},
|
||||
value => sprintf("%.3f", $result->{ciscoEnvMonVoltageStatusValue}),
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -79,11 +79,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan '%s' is '%s' rpm", $instance, $result->{boxServicesFanSpeed}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_' . $instance, unit => 'rpm',
|
||||
value => $result->{boxServicesFanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $instance,
|
||||
value => $result->{boxServicesFanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -87,11 +87,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is '%s' C", $instance, $result->{boxServicesTempSensorTemperature}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $result->{boxServicesTempSensorTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{boxServicesTempSensorTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -65,12 +65,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s C", $instance, $result->{Temp}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $result->{Temp},
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{Temp},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -97,12 +97,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature sensor '%s' is %s degree centigrade", $name, $result2->{EntityExtTemperature}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $result2->{EntityExtTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.sensor.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result2->{EntityExtTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -39,13 +39,13 @@ my %map_sensor_type = (1 => 'other',
|
|||
7 => 'counter', 8 => 'switch', 9 => 'lock', 10 => 'humidity',
|
||||
11 => 'smokeDetection', 12 => 'presence', 13 => 'airFlow');
|
||||
my %mapping_units = (
|
||||
1 => '', 2 => '',
|
||||
3 => 'C', # Degrees C
|
||||
4 => 'F', # Degrees F
|
||||
5 => 'K', # Degrees K
|
||||
6 => 'V', # Volts
|
||||
7 => 'A', # Amps,
|
||||
8 => 'W', # Watts
|
||||
1 => 'unknown', 2 => 'unknown',
|
||||
3 => 'celsius',
|
||||
4 => 'fahrenheit',
|
||||
5 => 'kelvin',
|
||||
6 => 'volt',
|
||||
7 => 'ampere',
|
||||
8 => 'watt',
|
||||
9 => 'Joules', 10 => 'Coulombs', 11 => 'VA', 12 => 'Nits',
|
||||
13 => 'Lumens', 14 => 'Lux', 15 => 'Candelas',
|
||||
16 => 'kPa', 17 => 'PSI', 18 => 'Newtons',
|
||||
|
@ -54,20 +54,20 @@ my %mapping_units = (
|
|||
22 => 'Seconds', 23 => 'Minutes', 24 => 'Hours',
|
||||
25 => 'Days', 26 => 'Weeks', 27 => 'Mils',
|
||||
28 => 'Inches', 29 => 'Feet', 30 => 'Cubic_Inches',
|
||||
31 => 'Cubic_Feet', 32 => 'Meters', 33 => 'Cubic_Centimeters',
|
||||
34 => 'Cubic_Meters', 35 => 'Liters', 36 => 'Fluid_Ounces',
|
||||
31 => 'CubicFeet', 32 => 'Meters', 33 => 'CubicCentimeters',
|
||||
34 => 'CubicMeters', 35 => 'Liters', 36 => 'FluidOunces',
|
||||
37 => 'Radians', 38 => 'Steradians', 39 => 'Revolutions',
|
||||
40 => 'Cycles', 41 => 'Gravities', 42 => 'Ounces',
|
||||
43 => 'Pounds', 44 => 'Foot_Pounds', 45 => 'Ounce_Inches',
|
||||
43 => 'Pounds', 44 => 'FootPounds', 45 => 'OunceInches',
|
||||
46 => 'Gauss', 47 => 'Gilberts', 48 => 'Henries',
|
||||
49 => 'Farads', 50 => 'Ohms', 51 => 'Siemens',
|
||||
52 => 'Moles', 53 => 'Becquerels', 54 => 'PPM',
|
||||
55 => 'Decibels', 56 => 'DbA', 57 => 'DbC',
|
||||
58 => 'Grays', 59 => 'Sieverts', 60 => 'Color_Temperature_Degrees_K',
|
||||
61 => 'b', # bits
|
||||
62 => 'B', # Bytes
|
||||
58 => 'Grays', 59 => 'Sieverts', 60 => 'ColorTemperatureDegreesKelvin',
|
||||
61 => 'bits',
|
||||
62 => 'bytes',
|
||||
63 => 'Words', 64 => 'DoubleWords', 65 => 'QuadWords',
|
||||
66 => '%', # Percentage,
|
||||
66 => 'percentage',
|
||||
67 => 'Pascals',
|
||||
);
|
||||
|
||||
|
@ -130,12 +130,15 @@ sub check {
|
|||
short_msg => sprintf("%s '%s' is '%s' %s", $result->{sunPlatSensorType},
|
||||
$result->{entPhysicalName}, $result->{sunPlatNumericSensorCurrent}, $result->{sunPlatNumericSensorBaseUnits}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => $result->{sunPlatSensorType} . '_' . $result->{entPhysicalName},, unit => $result->{sunPlatNumericSensorBaseUnits},
|
||||
value => $result->{sunPlatNumericSensorCurrent},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => $result->{sunPlatSensorType}, unit => $result->{sunPlatNumericSensorBaseUnits},
|
||||
nlabel => 'hardware.entity.' . $result->{sunPlatSensorType} . '.' . lc($result->{sunPlatNumericSensorBaseUnits}),
|
||||
instances => $result->{entPhysicalName},
|
||||
value => $result->{sunPlatNumericSensorCurrent},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -52,10 +52,14 @@ sub temperature {
|
|||
$self->{output}->output_add(long_msg => sprintf("Temperature '%s' is %s degree centigrade.",
|
||||
$instance, $temperature));
|
||||
my ($exit, $warn, $crit) = $self->get_severity_numeric(section => 'temperature', instance => $instance, value => $temperature);
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $temperature,
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $temperature,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) {
|
||||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s degree centigrade", $instance, $temperature));
|
||||
|
|
|
@ -90,13 +90,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Controller fan '%s' is %s rpm", $result->{scCtlrFanName}, $result->{scCtlrFanCurrentRpm}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'ctrlfan_' . $instance, unit => 'rpm',
|
||||
value => $result->{scCtlrFanCurrentRpm},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'ctrlfan', unit => 'rpm',
|
||||
nlabel => 'hardware.controller.fan.speed.rpm',
|
||||
instances => $instance,
|
||||
value => $result->{scCtlrFanCurrentRpm},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -90,12 +90,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Controller temperature '%s' is %s C", $result->{scCtlrTempName}, $result->{scCtlrTempCurrentC}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'ctrltemp_' . $instance, unit => 'C',
|
||||
value => $result->{scCtlrTempCurrentC},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'ctrltemp', unit => 'C',
|
||||
nlabel => 'hardware.controller.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{scCtlrTempCurrentC},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -90,12 +90,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Controller voltage '%s' is %s V", $result->{scCtlrVoltageName}, $result->{scCtlrVoltageCurrentV}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'ctrlvoltage_' . $instance, unit => 'V',
|
||||
value => $result->{scCtlrVoltageCurrentV},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'ctrlvoltage', unit => 'V',
|
||||
nlabel => 'hardware.controller.voltage.volt',
|
||||
instances => $instance,
|
||||
value => $result->{scCtlrVoltageCurrentV},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -71,12 +71,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Enclosure temperature '%s' is %s C", $result->{scEnclTempLocation}, $result->{scEnclTempCurrentC}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'encltemp_' . $instance, unit => 'C',
|
||||
value => $result->{scEnclTempCurrentC},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'encltemp', unit => 'C',
|
||||
nlabel => 'hardware.enclosure.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{scEnclTempCurrentC},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -89,13 +89,17 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Fan '%s/%s' speed is %s rpm", $member_name, $result->{eqlMemberHealthDetailsFanName}, $result->{eqlMemberHealthDetailsFanValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => "fan_" . $member_name . "_" . $instance, unit => 'rpm',
|
||||
value => $result->{eqlMemberHealthDetailsFanValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "fan", unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => [$member_name, $instance],
|
||||
value => $result->{eqlMemberHealthDetailsFanValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -89,12 +89,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Temperature '%s/%s' is %s degree centigrade", $member_name, $result->{eqlMemberHealthDetailsTemperatureName}, $result->{eqlMemberHealthDetailsTemperatureValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => "temp_" . $member_name . "_" . $instance, unit => 'C',
|
||||
value => $result->{eqlMemberHealthDetailsTemperatureValue},
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "temp", unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => [$member_name, $instance],
|
||||
value => $result->{eqlMemberHealthDetailsTemperatureValue},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -79,14 +79,17 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Nvram battery '%s' charge is %s %%", $instance, $batt_value));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'nvram_battery_' . $instance, unit => '%',
|
||||
value => $batt_value,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0, max => 100
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'nvram_battery', unit => '%',
|
||||
nlabel => 'hardware.battery.nvram.charge.percentage',
|
||||
instances => $instance,
|
||||
value => $batt_value,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0, max => 100
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -83,13 +83,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s degree centigrade", $temp_descr, $temp_value));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $instance, unit => 'C',
|
||||
value => $temp_value,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $temp_value,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -62,12 +62,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan '%s' is %s rpm", $result->{fanName}, $result->{fanSpeed}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'speed_' . $result->{fanName}, unit => 'rpm',
|
||||
value => $result->{fanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'speed', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $result->{fanName},
|
||||
value => $result->{fanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -62,12 +62,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Power '%s' sensor is %s (Volt or Amp)", $result->{powerSensorName}, $result->{powerSensorValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'power_' . $result->{powerSensorName},
|
||||
value => $result->{powerSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'power',
|
||||
nlabel => 'hardware.power.sensor.count',
|
||||
instances => $result->{powerSensorName},
|
||||
value => $result->{powerSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -62,12 +62,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s C", $result->{tempSensorName}, $result->{tempSensorValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temperature_' . $result->{tempSensorName}, unit => 'C',
|
||||
value => $result->{tempSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temperature', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $result->{tempSensorName},
|
||||
value => $result->{tempSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -108,10 +108,13 @@ sub check {
|
|||
$total - $used - $not_ready, $total));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => "disk_spare_available",
|
||||
value => $total - $used - $not_ready,
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0, max => $total);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "disk_spare_available",
|
||||
nlabel => 'hardware.disk.spare.available.count',
|
||||
value => $total - $used - $not_ready,
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0, max => $total
|
||||
);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -53,10 +53,13 @@ sub check {
|
|||
$value));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => "disk_spare_non_available",
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "disk_spare_non_available",
|
||||
nlabel => 'hardware.sparedisk.unavailable.count',
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
}
|
||||
|
||||
1;
|
||||
|
|
|
@ -97,13 +97,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("storage device '%s' temperature is %s C", $result->{storageDeviceName}, $result->{storageDeviceTemperature}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $result->{storageDeviceName}, unit => 'C',
|
||||
value => $result->{storageDeviceTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
max => $result->{storageDeviceTemperatureLimit},
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.device.temperature.celsius',
|
||||
instances => $result->{storageDeviceName},
|
||||
value => $result->{storageDeviceTemperature},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
max => $result->{storageDeviceTemperatureLimit},
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -85,13 +85,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("fan '%s' speed is %s rpm", $result->{infoFanName}, $result->{infoFanSpeed}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_' . $result->{infoFanName}, unit => 'rpm',
|
||||
value => $result->{infoFanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $result->{infoFanName},
|
||||
value => $result->{infoFanSpeed},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -86,13 +86,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("temperature sensor '%s' is %s C", $result->{infoTemperatureSensorName}, $result->{infoTemperatureSensorValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $result->{infoTemperatureSensorName}, unit => 'C',
|
||||
value => $result->{infoTemperatureSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
max => $result->{infoTemperatureSensorLimit}
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $result->{infoTemperatureSensorName},
|
||||
value => $result->{infoTemperatureSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
max => $result->{infoTemperatureSensorLimit}
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -86,13 +86,16 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("voltage sensor '%s' is %s V", $result->{infoVoltageSensorName}, $result->{infoVoltageSensorValue}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'voltage_' . $result->{infoVoltageSensorName}, unit => 'V',
|
||||
value => $result->{infoVoltageSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'voltage', unit => 'V',
|
||||
nlabel => 'hardware.voltage.volt',
|
||||
instances => $result->{infoVoltageSensorName},
|
||||
value => $result->{infoVoltageSensorValue},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -70,13 +70,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Battery '%s' cell '%s' voltage is %s mV", $instance, lc($pretty_cell), $result->{$cell}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'battery_voltage_' . $instance . '_' . lc($pretty_cell),
|
||||
unit => 'mV',
|
||||
value => $result->{$cell},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'battery_voltage', unit => 'mV',
|
||||
nlabel => 'hardware.battery.voltage.millivolt',
|
||||
instances => [$instance, lc($pretty_cell)],
|
||||
value => $result->{$cell},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,12 +88,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Battery '%s' current is %s", $instance, $result->{batteryChgCurr}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'battery_current_' . $instance,
|
||||
value => $result->{batteryChgCurr},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'battery_current',
|
||||
nlabel => 'hardware.battery.current.count',
|
||||
instances => $instance,
|
||||
value => $result->{batteryChgCurr},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
}
|
||||
|
||||
if (defined($result->{batteryRmngCap}) && $result->{batteryRmngCap} =~ /[0-9]/ && defined($result->{batteryFullCap}) && $result->{batteryFullCap} =~ /[0-9]/) {
|
||||
|
@ -100,15 +105,17 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Battery '%s' capacity is %s on %s", $instance, $result->{batteryRmngCap}, $result->{batteryFullCap}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'battery_capacity_' . $instance,
|
||||
value => $result->{batteryRmngCap},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
max => $result->{batteryFullCap},
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'battery_capacity',
|
||||
nlabel => 'hardware.battery.capacity.count',
|
||||
instances => $instance,
|
||||
value => $result->{batteryRmngCap},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0, max => $result->{batteryFullCap},
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -66,14 +66,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan module '%s' PWM is %s%", $instance, $result->{fanPWM}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_pwm_' . $instance,
|
||||
unit => '%',
|
||||
value => $result->{fanPWM},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
max => 100,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan_pwm', unit => '%',
|
||||
nlabel => 'hardware.fan.pwm.percentage',
|
||||
instances => $instance,
|
||||
value => $result->{fanPWM},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0, max => 100,
|
||||
);
|
||||
}
|
||||
|
||||
if (defined($result->{fanTemp}) && $result->{fanTemp} =~ /[0-9]/) {
|
||||
|
@ -82,13 +83,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan module '%s' temperature is %s degree centigrade", $instance, $result->{fanTemp} / 10));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_temp_' . $instance,
|
||||
unit => 'C',
|
||||
value => $result->{fanTemp} / 10,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan_temp', unit => 'C',
|
||||
nlabel => 'hardware.fan.temperature.celsius',
|
||||
instances => $instance,
|
||||
value => $result->{fanTemp} / 10,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
}
|
||||
|
||||
foreach my $fan ('fan0', 'fan1', 'fan2', 'fan3') {
|
||||
|
@ -98,17 +101,18 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Fan module '%s' fan '%s' speed is %s%%", $instance, $fan, $result->{$fan}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_speed_' . $instance . '_' . $fan,
|
||||
unit => '%',
|
||||
value => $result->{$fan},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
max => 100,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan_speed', unit => '%',
|
||||
nlabel => 'hardware.fan.speed.percentage',
|
||||
instances => [$instance, $fan],
|
||||
value => $result->{$fan},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0, max => 100,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -70,13 +70,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Flashcard '%s' temperature '%s' is %sC", $instance, uc($pretty_temp), $result->{$temp} / 10));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'flashcard_temperature_' . $instance . '_' . lc($pretty_temp), unit => 'C',
|
||||
value => $result->{$temp} / 10,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
unit => 'C',
|
||||
min => 0,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'flashcard_temperature', unit => 'C',
|
||||
nlabel => 'hardware.flashcard.temperature.celsius',
|
||||
instances => [$instance, lc($pretty_temp)],
|
||||
value => $result->{$temp} / 10,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -86,13 +88,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Flashcard '%s' power is %sW", $instance, $result->{flashPower}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'flashcard_power_' . $instance,
|
||||
unit => 'W',
|
||||
value => $result->{flashPower},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'flashcard_power', unit => 'W',
|
||||
nlabel => 'hardware.flashcard.power.watt',
|
||||
instances => $instance,
|
||||
value => $result->{flashPower},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
}
|
||||
|
||||
if (defined($result->{flashOverallHealth}) && $result->{flashOverallHealth} =~ /[0-9]/) {
|
||||
|
@ -101,16 +105,17 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Flashcard '%s' overall health is %s%%", $instance, $result->{flashOverallHealth}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'flashcard_overallhealth_' . $instance,
|
||||
unit => '%',
|
||||
value => $result->{flashOverallHealth},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
max => 100,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'flashcard_overallhealth', unit => '%',
|
||||
nlabel => 'hardware.flashcard.overallhealth.percentage',
|
||||
instances => $instance,
|
||||
value => $result->{flashOverallHealth},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0, max => 100,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -89,15 +89,17 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Psu '%s' fan speed is %s rpm", $instance, $result->{psuFan}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'psu_fan_' . $instance,
|
||||
unit => 'rpm',
|
||||
value => $result->{psuFan},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'psu_fan', unit => 'rpm',
|
||||
nlabel => 'hardware.psu.fan.speed.rpm',
|
||||
instances => $instance,
|
||||
value => $result->{psuFan},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0,
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -53,11 +53,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("System stat '%s' value is '%s'", $_->{stat_name}, $_->{stat_current}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => "sstat_" . $_->{stat_name},
|
||||
value => $_->{stat_current},
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "sstat",
|
||||
nlabel => 'hardware.systemstats.current.count',
|
||||
instances => $_->{stat_name},
|
||||
value => $_->{stat_current},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -78,11 +78,15 @@ sub check {
|
|||
short_msg => sprintf("Shelve '%s' Fan '%s' speed is '%s'", $shelf_addr, $num, $current_value));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => "speed_" . $shelf_addr . "_" . $num, unit => 'rpm',
|
||||
value => $current_value,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "speed", unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => [$shelf_addr, $num],
|
||||
value => $current_value,
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -127,10 +127,14 @@ sub check {
|
|||
$shelf_addr, $num, $current_value));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => "temp_" . $shelf_addr . "_" . $num, unit => 'C',
|
||||
value => $current_value,
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "temp", unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => [$shelf_addr, $num],
|
||||
value => $current_value,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -122,12 +122,16 @@ sub check {
|
|||
$shelf_addr, $num, $current_value));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => "volt_" . $shelf_addr . "_" . $num, unit => 'mV',
|
||||
value => $current_value,
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "volt", unit => 'mV',
|
||||
nlabel => 'hardware.voltage.millivolt',
|
||||
instances => [$shelf_addr, $num],
|
||||
value => $current_value,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -84,10 +84,14 @@ sub check_v4 {
|
|||
short_msg => sprintf("fan '%s' rpm is %s", $instance, $fanrpm));
|
||||
}
|
||||
|
||||
$self->{output}->perfdata_add(label => "fan_" . $instance, unit => 'rpm',
|
||||
value => $fanrpm,
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => "fan", unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => $instance,
|
||||
value => $fanrpm,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -80,10 +80,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit2,
|
||||
short_msg => sprintf("Temperature '%s' is %s%s", $instance, $result->{temperatureValue}, $temperatureMax_unit));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => "temp_" . $instance, unit => $temperatureMax_unit,
|
||||
value => $result->{temperatureValue},
|
||||
warning => $warn,
|
||||
critical => $crit);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => $temperatureMax_unit,
|
||||
nlabel => 'hardware.temperature.' . (($temperatureMax_unit eq 'C') ? 'celsius' : 'fahrenheit'),
|
||||
instances => $instance,
|
||||
value => $result->{temperatureValue},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,12 +69,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Disk '%s' is '%s' C", $result->{pd_location}, $result->{hdd_temperature}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'disk_temperature_' . $result->{pd_location}, unit => 'C',
|
||||
value => $result->{hdd_temperature},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'disk_temperature', unit => 'C',
|
||||
nlabel => 'hardware.disk.temperature.celsius',
|
||||
instances => $result->{pd_location},
|
||||
value => $result->{hdd_temperature},
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
|
@ -69,11 +69,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("fan '%s' is '%s' rpm", $result->{ems_item}, $value));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'fan_' . $result->{ems_item} . '_' . $instance, unit => 'rpm',
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'fan', unit => 'rpm',
|
||||
nlabel => 'hardware.fan.speed.rpm',
|
||||
instances => [$result->{ems_item}, $instance],
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit, min => 0
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,11 +68,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is '%s' C", $result->{ems_item}, $value));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temperature_' . $result->{ems_item} . '_' . $instance, unit => 'C',
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temperature', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => [$result->{ems_item}, $instance],
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -68,11 +68,14 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("voltage '%s' is '%s' V", $result->{ems_item}, $value));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'voltage_' . $result->{ems_item} . '_' . $instance, unit => 'V',
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'voltage', unit => 'V',
|
||||
nlabel => 'hardware.voltage.volt',
|
||||
instances => [$result->{ems_item}, $instance],
|
||||
value => $value,
|
||||
warning => $warn,
|
||||
critical => $crit
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -73,12 +73,15 @@ sub check {
|
|||
$self->{output}->output_add(severity => $exit,
|
||||
short_msg => sprintf("Temperature '%s' is %s degree centigrade", $result->{slHdwTempSensorName}, $result->{slHdwTempSensorCurrentTemp}));
|
||||
}
|
||||
$self->{output}->perfdata_add(label => 'temp_' . $result->{slHdwTempSensorName}, unit => 'C',
|
||||
value => $result->{slHdwTempSensorCurrentTemp},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
$self->{output}->perfdata_add(
|
||||
label => 'temp', unit => 'C',
|
||||
nlabel => 'hardware.temperature.celsius',
|
||||
instances => $result->{slHdwTempSensorName},
|
||||
value => $result->{slHdwTempSensorCurrentTemp},
|
||||
warning => $warn,
|
||||
critical => $crit,
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
|
Loading…
Reference in New Issue