diff options
author | Paul Dugas <paul@dugasenterprises.com> | 2016-04-20 11:36:23 -0400 |
---|---|---|
committer | Paul Dugas <paul@dugasenterprises.com> | 2016-04-20 11:36:23 -0400 |
commit | 9fb9fd53f22fe8b806909b4d5cff83e493e72ab4 (patch) | |
tree | 06d5f6140be3728a509185f4be8393644ed4fbda | |
parent | b63c4b3ff97d5d9cda5cc9847947734e07d2c118 (diff) | |
download | monitoring-plugin-perl-9fb9fd53f22fe8b806909b4d5cff83e493e72ab4.tar.gz |
Update Getopt.pm
Allow hypen or underscore in plugin name.
-rw-r--r-- | lib/Monitoring/Plugin/Getopt.pm | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm index 19ad7fe..9e68301 100644 --- a/lib/Monitoring/Plugin/Getopt.pm +++ b/lib/Monitoring/Plugin/Getopt.pm | |||
@@ -445,7 +445,7 @@ sub getopts | |||
445 | # Setup default alarm handler for alarm($ng->timeout) in plugin | 445 | # Setup default alarm handler for alarm($ng->timeout) in plugin |
446 | $SIG{ALRM} = sub { | 446 | $SIG{ALRM} = sub { |
447 | my $plugin = uc $self->{_attr}->{plugin}; | 447 | my $plugin = uc $self->{_attr}->{plugin}; |
448 | $plugin =~ s/^CHECK_//; | 448 | $plugin =~ s/^CHECK[-_]//; |
449 | $self->_die( | 449 | $self->_die( |
450 | sprintf("%s UNKNOWN - plugin timed out (timeout %ss)", | 450 | sprintf("%s UNKNOWN - plugin timed out (timeout %ss)", |
451 | $plugin, $self->timeout)); | 451 | $plugin, $self->timeout)); |