diff --git a/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/fan.pm b/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/fan.pm index 1752c8a1f..f9f3c137e 100644 --- a/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/fan.pm +++ b/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/fan.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/temperature.pm index 626a9c0c4..6ce02ee87 100644 --- a/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/adic/tape/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/bluearc/snmp/mode/components/fan.pm b/centreon-plugins/centreon/common/bluearc/snmp/mode/components/fan.pm index eff337ab0..8a5e0c083 100644 --- a/centreon-plugins/centreon/common/bluearc/snmp/mode/components/fan.pm +++ b/centreon-plugins/centreon/common/bluearc/snmp/mode/components/fan.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/bluearc/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/bluearc/snmp/mode/components/temperature.pm index 2d0041987..4b5e75f53 100644 --- a/centreon-plugins/centreon/common/bluearc/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/bluearc/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/fan.pm b/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/fan.pm index b3fad067b..f770bdec9 100644 --- a/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/fan.pm +++ b/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/fan.pm @@ -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 + ); } } diff --git a/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/temperature.pm index 48f65fa36..7e847aac9 100644 --- a/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/broadcom/fastpath/snmp/mode/components/temperature.pm @@ -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, + ); } } diff --git a/centreon-plugins/centreon/common/broadcom/megaraid/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/broadcom/megaraid/snmp/mode/components/temperature.pm index 9939e4fb6..db2696b48 100644 --- a/centreon-plugins/centreon/common/broadcom/megaraid/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/broadcom/megaraid/snmp/mode/components/temperature.pm @@ -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, + ); } } diff --git a/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/sensor.pm b/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/sensor.pm index 8c72b4a64..65a428967 100644 --- a/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/sensor.pm +++ b/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/sensor.pm @@ -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 + ); } } diff --git a/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/temperature.pm index 97ca2dd55..d11131280 100644 --- a/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/voltage.pm b/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/voltage.pm index b782b4615..16d3fa907 100644 --- a/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/voltage.pm +++ b/centreon-plugins/centreon/common/cisco/standard/snmp/mode/components/voltage.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/fan.pm b/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/fan.pm index 30c4eb226..a2fbbdfbc 100644 --- a/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/fan.pm +++ b/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/fan.pm @@ -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 + ); } } diff --git a/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/temperature.pm index 9c8b73c98..2fd177907 100644 --- a/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/dell/fastpath/snmp/mode/components/temperature.pm @@ -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 + ); } } diff --git a/centreon-plugins/centreon/common/force10/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/force10/snmp/mode/components/temperature.pm index 1d5f30ef5..bee81aa1e 100644 --- a/centreon-plugins/centreon/common/force10/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/force10/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/h3c/snmp/mode/components/sensor.pm b/centreon-plugins/centreon/common/h3c/snmp/mode/components/sensor.pm index 4e6c379c0..39c4c3850 100644 --- a/centreon-plugins/centreon/common/h3c/snmp/mode/components/sensor.pm +++ b/centreon-plugins/centreon/common/h3c/snmp/mode/components/sensor.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/sun/snmp/mode/components/entity.pm b/centreon-plugins/centreon/common/sun/snmp/mode/components/entity.pm index cc3cd4b9f..2d1cb47e0 100644 --- a/centreon-plugins/centreon/common/sun/snmp/mode/components/entity.pm +++ b/centreon-plugins/centreon/common/sun/snmp/mode/components/entity.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/centreon/common/violin/snmp/mode/components/temperature.pm b/centreon-plugins/centreon/common/violin/snmp/mode/components/temperature.pm index c55409c10..4ef31563e 100644 --- a/centreon-plugins/centreon/common/violin/snmp/mode/components/temperature.pm +++ b/centreon-plugins/centreon/common/violin/snmp/mode/components/temperature.pm @@ -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)); diff --git a/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlfan.pm b/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlfan.pm index 5ec0aff79..dd4d0213b 100644 --- a/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlfan.pm +++ b/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlfan.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrltemp.pm b/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrltemp.pm index da3dc2e83..da573ae08 100644 --- a/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrltemp.pm +++ b/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrltemp.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlvoltage.pm b/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlvoltage.pm index 3bb137eaa..769eaf54a 100644 --- a/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlvoltage.pm +++ b/centreon-plugins/storage/dell/compellent/snmp/mode/components/ctrlvoltage.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/dell/compellent/snmp/mode/components/encltemp.pm b/centreon-plugins/storage/dell/compellent/snmp/mode/components/encltemp.pm index b528bd6c9..8239a80da 100644 --- a/centreon-plugins/storage/dell/compellent/snmp/mode/components/encltemp.pm +++ b/centreon-plugins/storage/dell/compellent/snmp/mode/components/encltemp.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/dell/equallogic/snmp/mode/components/fan.pm b/centreon-plugins/storage/dell/equallogic/snmp/mode/components/fan.pm index 89c284ad5..cc7b8a818 100644 --- a/centreon-plugins/storage/dell/equallogic/snmp/mode/components/fan.pm +++ b/centreon-plugins/storage/dell/equallogic/snmp/mode/components/fan.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/dell/equallogic/snmp/mode/components/temperature.pm b/centreon-plugins/storage/dell/equallogic/snmp/mode/components/temperature.pm index 8cca1c9d2..6169ccdbd 100644 --- a/centreon-plugins/storage/dell/equallogic/snmp/mode/components/temperature.pm +++ b/centreon-plugins/storage/dell/equallogic/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/emc/DataDomain/mode/components/battery.pm b/centreon-plugins/storage/emc/DataDomain/mode/components/battery.pm index f685ffcd1..128b6e39a 100644 --- a/centreon-plugins/storage/emc/DataDomain/mode/components/battery.pm +++ b/centreon-plugins/storage/emc/DataDomain/mode/components/battery.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/emc/DataDomain/mode/components/temperature.pm b/centreon-plugins/storage/emc/DataDomain/mode/components/temperature.pm index 533f3358f..c36d61dc7 100644 --- a/centreon-plugins/storage/emc/DataDomain/mode/components/temperature.pm +++ b/centreon-plugins/storage/emc/DataDomain/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/emc/isilon/snmp/mode/components/fan.pm b/centreon-plugins/storage/emc/isilon/snmp/mode/components/fan.pm index cc257bfdb..c55c8529f 100644 --- a/centreon-plugins/storage/emc/isilon/snmp/mode/components/fan.pm +++ b/centreon-plugins/storage/emc/isilon/snmp/mode/components/fan.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/emc/isilon/snmp/mode/components/power.pm b/centreon-plugins/storage/emc/isilon/snmp/mode/components/power.pm index c9e81095f..a3d1f78ba 100644 --- a/centreon-plugins/storage/emc/isilon/snmp/mode/components/power.pm +++ b/centreon-plugins/storage/emc/isilon/snmp/mode/components/power.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/emc/isilon/snmp/mode/components/temperature.pm b/centreon-plugins/storage/emc/isilon/snmp/mode/components/temperature.pm index 9d6ecb87d..3835fd488 100644 --- a/centreon-plugins/storage/emc/isilon/snmp/mode/components/temperature.pm +++ b/centreon-plugins/storage/emc/isilon/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/emc/symmetrix/dmx34/local/mode/components/disk.pm b/centreon-plugins/storage/emc/symmetrix/dmx34/local/mode/components/disk.pm index 793e91e07..984e2770b 100644 --- a/centreon-plugins/storage/emc/symmetrix/dmx34/local/mode/components/disk.pm +++ b/centreon-plugins/storage/emc/symmetrix/dmx34/local/mode/components/disk.pm @@ -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; diff --git a/centreon-plugins/storage/emc/symmetrix/vmax/local/mode/components/sparedisk.pm b/centreon-plugins/storage/emc/symmetrix/vmax/local/mode/components/sparedisk.pm index d855b21ad..6cdcad95e 100644 --- a/centreon-plugins/storage/emc/symmetrix/vmax/local/mode/components/sparedisk.pm +++ b/centreon-plugins/storage/emc/symmetrix/vmax/local/mode/components/sparedisk.pm @@ -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; diff --git a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/device.pm b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/device.pm index 28dda79c2..a0e187168 100644 --- a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/device.pm +++ b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/device.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/fan.pm b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/fan.pm index f23a6533a..0c545f3b9 100644 --- a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/fan.pm +++ b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/fan.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/temperature.pm b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/temperature.pm index 4d67e4cbb..3b384f09f 100644 --- a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/temperature.pm +++ b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/voltage.pm b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/voltage.pm index e49dc89cf..b4304abdb 100644 --- a/centreon-plugins/storage/hp/lefthand/snmp/mode/components/voltage.pm +++ b/centreon-plugins/storage/hp/lefthand/snmp/mode/components/voltage.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/battery.pm b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/battery.pm index f2f84e488..193fd9c92 100644 --- a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/battery.pm +++ b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/battery.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/fan.pm b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/fan.pm index c0698d9f8..c4a6bfa1e 100644 --- a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/fan.pm +++ b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/fan.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/flashcard.pm b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/flashcard.pm index 88c5f701d..3f44cea99 100644 --- a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/flashcard.pm +++ b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/flashcard.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/psu.pm b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/psu.pm index dac240b63..dec0ba193 100644 --- a/centreon-plugins/storage/ibm/fs900/snmp/mode/components/psu.pm +++ b/centreon-plugins/storage/ibm/fs900/snmp/mode/components/psu.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/ibm/storwize/ssh/mode/components/systemstats.pm b/centreon-plugins/storage/ibm/storwize/ssh/mode/components/systemstats.pm index eba14f9e0..bb47e1e39 100644 --- a/centreon-plugins/storage/ibm/storwize/ssh/mode/components/systemstats.pm +++ b/centreon-plugins/storage/ibm/storwize/ssh/mode/components/systemstats.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/netapp/snmp/mode/components/fan.pm b/centreon-plugins/storage/netapp/snmp/mode/components/fan.pm index f4a510ec0..7c2110490 100644 --- a/centreon-plugins/storage/netapp/snmp/mode/components/fan.pm +++ b/centreon-plugins/storage/netapp/snmp/mode/components/fan.pm @@ -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 + ); } } } diff --git a/centreon-plugins/storage/netapp/snmp/mode/components/temperature.pm b/centreon-plugins/storage/netapp/snmp/mode/components/temperature.pm index b66a73235..0eac269f2 100644 --- a/centreon-plugins/storage/netapp/snmp/mode/components/temperature.pm +++ b/centreon-plugins/storage/netapp/snmp/mode/components/temperature.pm @@ -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 + ); } } } diff --git a/centreon-plugins/storage/netapp/snmp/mode/components/voltage.pm b/centreon-plugins/storage/netapp/snmp/mode/components/voltage.pm index 149786905..eb1d10474 100644 --- a/centreon-plugins/storage/netapp/snmp/mode/components/voltage.pm +++ b/centreon-plugins/storage/netapp/snmp/mode/components/voltage.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/netgear/readynas/snmp/mode/components/fan.pm b/centreon-plugins/storage/netgear/readynas/snmp/mode/components/fan.pm index 26dbe5cea..ed7719803 100644 --- a/centreon-plugins/storage/netgear/readynas/snmp/mode/components/fan.pm +++ b/centreon-plugins/storage/netgear/readynas/snmp/mode/components/fan.pm @@ -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 + ); } } diff --git a/centreon-plugins/storage/netgear/readynas/snmp/mode/components/temperature.pm b/centreon-plugins/storage/netgear/readynas/snmp/mode/components/temperature.pm index 5dc783626..b5e8f39fc 100644 --- a/centreon-plugins/storage/netgear/readynas/snmp/mode/components/temperature.pm +++ b/centreon-plugins/storage/netgear/readynas/snmp/mode/components/temperature.pm @@ -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 + ); } } diff --git a/centreon-plugins/storage/qsan/nas/snmp/mode/components/disk.pm b/centreon-plugins/storage/qsan/nas/snmp/mode/components/disk.pm index f6b088415..6846aa0a8 100644 --- a/centreon-plugins/storage/qsan/nas/snmp/mode/components/disk.pm +++ b/centreon-plugins/storage/qsan/nas/snmp/mode/components/disk.pm @@ -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; \ No newline at end of file +1; diff --git a/centreon-plugins/storage/qsan/nas/snmp/mode/components/fan.pm b/centreon-plugins/storage/qsan/nas/snmp/mode/components/fan.pm index 28fbec3e2..ccde0f4e3 100644 --- a/centreon-plugins/storage/qsan/nas/snmp/mode/components/fan.pm +++ b/centreon-plugins/storage/qsan/nas/snmp/mode/components/fan.pm @@ -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 + ); } } diff --git a/centreon-plugins/storage/qsan/nas/snmp/mode/components/temperature.pm b/centreon-plugins/storage/qsan/nas/snmp/mode/components/temperature.pm index e0b54047a..5a6e3dcfe 100644 --- a/centreon-plugins/storage/qsan/nas/snmp/mode/components/temperature.pm +++ b/centreon-plugins/storage/qsan/nas/snmp/mode/components/temperature.pm @@ -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 + ); } } diff --git a/centreon-plugins/storage/qsan/nas/snmp/mode/components/voltage.pm b/centreon-plugins/storage/qsan/nas/snmp/mode/components/voltage.pm index 20b5cfea6..0e14e5c49 100644 --- a/centreon-plugins/storage/qsan/nas/snmp/mode/components/voltage.pm +++ b/centreon-plugins/storage/qsan/nas/snmp/mode/components/voltage.pm @@ -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 + ); } } diff --git a/centreon-plugins/storage/storagetek/sl/snmp/mode/components/temperature.pm b/centreon-plugins/storage/storagetek/sl/snmp/mode/components/temperature.pm index 96f440e85..e33a0eef2 100644 --- a/centreon-plugins/storage/storagetek/sl/snmp/mode/components/temperature.pm +++ b/centreon-plugins/storage/storagetek/sl/snmp/mode/components/temperature.pm @@ -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; \ No newline at end of file +1;