mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-27 15:44:21 +02:00
+ Fix matching for extra oids
This commit is contained in:
parent
b004b1ee40
commit
88601586ab
@ -126,7 +126,7 @@ sub check_options {
|
|||||||
foreach (@{$self->{option_results}->{add_extra_oid}}) {
|
foreach (@{$self->{option_results}->{add_extra_oid}}) {
|
||||||
next if ($_ eq '');
|
next if ($_ eq '');
|
||||||
my ($name, $oid, $matching) = split /,/;
|
my ($name, $oid, $matching) = split /,/;
|
||||||
$matching = '%{instance}' if (!defined($matching));
|
$matching = '%{instance}$' if (!defined($matching));
|
||||||
if (!defined($oid) || $oid !~ /^(\.\d+){1,}$/ || $name eq '') {
|
if (!defined($oid) || $oid !~ /^(\.\d+){1,}$/ || $name eq '') {
|
||||||
$self->{output}->add_option_msg(short_msg => "Wrong syntax for add-extra-oid '" . $_ . "' option.");
|
$self->{output}->add_option_msg(short_msg => "Wrong syntax for add-extra-oid '" . $_ . "' option.");
|
||||||
$self->{output}->option_exit();
|
$self->{output}->option_exit();
|
||||||
|
Loading…
x
Reference in New Issue
Block a user