From 1e04345ed73504c028ee7adc439411ef987e38b9 Mon Sep 17 00:00:00 2001 From: CPbN Date: Thu, 28 Mar 2019 11:25:25 +0100 Subject: [PATCH] Mikrotik, adjust power value --- network/mikrotik/snmp/mode/components/psu.pm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/network/mikrotik/snmp/mode/components/psu.pm b/network/mikrotik/snmp/mode/components/psu.pm index 7ec16fcf0..4ebf45a8d 100644 --- a/network/mikrotik/snmp/mode/components/psu.pm +++ b/network/mikrotik/snmp/mode/components/psu.pm @@ -69,15 +69,15 @@ sub check { check_psu($self, value => $result->{mtxrHlBackupPowerSupplyState}, type => 'backup'); if (defined($result->{mtxrHlPower}) && $result->{mtxrHlPower} =~ /[0-9]+/) { - $self->{output}->output_add(long_msg => sprintf("Power is '%s' W", $result->{mtxrHlPower})); + $self->{output}->output_add(long_msg => sprintf("Power is '%s' W", $result->{mtxrHlPower} / 10)); - ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'psu', instance => $instance, value => $result->{mtxrHlPower}); + ($exit, $warn, $crit, $checked) = $self->get_severity_numeric(section => 'psu', instance => $instance, value => $result->{mtxrHlPower} / 10); if (!$self->{output}->is_status(value => $exit, compare => 'ok', litteral => 1)) { $self->{output}->output_add(severity => $exit, - short_msg => sprintf("Power is '%s' W", $result->{mtxrHlPower})); + short_msg => sprintf("Power is '%s' W", $result->{mtxrHlPower} / 10)); } $self->{output}->perfdata_add(label => 'power', unit => 'W', - value => $result->{mtxrHlPower}, + value => $result->{mtxrHlPower} / 10, warning => $warn, critical => $crit); $self->{components}->{psu}->{total}++;