summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPaul Dugas <paul@dugasenterprises.com>2016-04-20 11:36:23 -0400
committerPaul Dugas <paul@dugasenterprises.com>2016-04-20 11:36:23 -0400
commit9fb9fd53f22fe8b806909b4d5cff83e493e72ab4 (patch)
tree06d5f6140be3728a509185f4be8393644ed4fbda
parentb63c4b3ff97d5d9cda5cc9847947734e07d2c118 (diff)
downloadmonitoring-plugin-perl-9fb9fd5.tar.gz
Update Getopt.pm
Allow hypen or underscore in plugin name.
-rw-r--r--lib/Monitoring/Plugin/Getopt.pm2
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));