diff --git a/hardware/devices/camera/hikvision/snmp/mode/disk.pm b/hardware/devices/camera/hikvision/snmp/mode/disk.pm index 83b790e20..3c5cff379 100644 --- a/hardware/devices/camera/hikvision/snmp/mode/disk.pm +++ b/hardware/devices/camera/hikvision/snmp/mode/disk.pm @@ -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(); } diff --git a/hardware/devices/camera/hikvision/snmp/mode/memory.pm b/hardware/devices/camera/hikvision/snmp/mode/memory.pm index 7e04f4ba0..4719b2f87 100644 --- a/hardware/devices/camera/hikvision/snmp/mode/memory.pm +++ b/hardware/devices/camera/hikvision/snmp/mode/memory.pm @@ -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(); }