diff --git a/hardware/ups/apc/snmp/mode/sensors.pm b/hardware/ups/apc/snmp/mode/sensors.pm index 556cb5039..7d141d4ac 100644 --- a/hardware/ups/apc/snmp/mode/sensors.pm +++ b/hardware/ups/apc/snmp/mode/sensors.pm @@ -141,8 +141,10 @@ sub check { next if ($self->check_filter(section => 'sensor', instance => $instance)); $self->{components}->{sensor}->{total}++; - $self->{output}->output_add(long_msg => sprintf("sensor '%s' status is '%s' [instance = %s]", - $result->{uioSensorStatusSensorName}, $result->{uioSensorStatusAlarmStatus}, $instance)); + $self->{output}->output_add(long_msg => sprintf("sensor '%s' status is '%s' [instance = %s] [temperature = %s C] [humidity = %s %%]", + $result->{uioSensorStatusSensorName}, $result->{uioSensorStatusAlarmStatus}, $instance, + $result->{uioSensorStatusTemperatureDegC} != -1 ? $result->{uioSensorStatusTemperatureDegC} : '-', + $result->{uioSensorStatusHumidity} != -1 ? $result->{uioSensorStatusHumidity} : '-')); $exit = $self->get_severity(section => 'sensor', value => $result->{uioSensorStatusAlarmStatus}); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit,