fix hikvision camera
This commit is contained in:
parent
51749d83f4
commit
c03971376e
|
@ -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();
|
||||
}
|
||||
|
|
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue