mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-23 21:55:16 +02:00
+ Fix matching for extra oids
This commit is contained in:
parent
af59e89b64
commit
b5f4a651fc
@ -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