fix hikvision camera

This commit is contained in:
garnier-quentin 2019-11-25 14:34:09 +01:00
parent 51749d83f4
commit c03971376e
2 changed files with 4 additions and 4 deletions

View File

@ -97,14 +97,14 @@ sub manage_selection {
nothing_quit => 1
);
if ($snmp_result->{$oid_diskSize} !~ /(\d+)\s+(\S+)/) {
if ($snmp_result->{$oid_diskSize} !~ /([0-9\.]+)\s+(\S+)/) {
$self->{output}->add_option_msg(short_msg => 'cannot parse disk size: ' . $snmp_result->{$oid_diskSize});
$self->{output}->option_exit();
}
my ($total, $unit) = ($1, $2);
$total = centreon::plugins::misc::convert_bytes(value => $total, unit => $unit);
if ($snmp_result->{$oid_diskPercent} !~ /(\d+)/) {
if ($snmp_result->{$oid_diskPercent} !~ /([0-9\.]+)/) {
$self->{output}->add_option_msg(short_msg => 'cannot parse disk used: ' . $snmp_result->{$oid_diskPercent});
$self->{output}->option_exit();
}

View File

@ -97,14 +97,14 @@ sub manage_selection {
nothing_quit => 1
);
if ($snmp_result->{$oid_memSize} !~ /(\d+)\s+(\S+)/) {
if ($snmp_result->{$oid_memSize} !~ /([0-9\.]+)\s+(\S+)/) {
$self->{output}->add_option_msg(short_msg => 'cannot parse memory size: ' . $snmp_result->{$oid_memSize});
$self->{output}->option_exit();
}
my ($total, $unit) = ($1, $2);
$total = centreon::plugins::misc::convert_bytes(value => $total, unit => $unit);
if ($snmp_result->{$oid_memUsed} !~ /(\d+)/) {
if ($snmp_result->{$oid_memUsed} !~ /([0-9\.]+)/) {
$self->{output}->add_option_msg(short_msg => 'cannot parse memory used: ' . $snmp_result->{$oid_memUsed});
$self->{output}->option_exit();
}