From b63c4b3ff97d5d9cda5cc9847947734e07d2c118 Mon Sep 17 00:00:00 2001 From: Paul Dugas Date: Wed, 20 Apr 2016 11:34:04 -0400 Subject: Update Getopt.pm Wrong case in ALRM regex. --- lib/Monitoring/Plugin/Getopt.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Monitoring/Plugin/Getopt.pm b/lib/Monitoring/Plugin/Getopt.pm index 1740830..19ad7fe 100644 --- a/lib/Monitoring/Plugin/Getopt.pm +++ b/lib/Monitoring/Plugin/Getopt.pm @@ -445,7 +445,7 @@ sub getopts # Setup default alarm handler for alarm($ng->timeout) in plugin $SIG{ALRM} = sub { my $plugin = uc $self->{_attr}->{plugin}; - $plugin =~ s/^check_//; + $plugin =~ s/^CHECK_//; $self->_die( sprintf("%s UNKNOWN - plugin timed out (timeout %ss)", $plugin, $self->timeout)); -- cgit v1.2.3-74-g34f1 From 9fb9fd53f22fe8b806909b4d5cff83e493e72ab4 Mon Sep 17 00:00:00 2001 From: Paul Dugas Date: Wed, 20 Apr 2016 11:36:23 -0400 Subject: Update Getopt.pm Allow hypen or underscore in plugin name. --- lib/Monitoring/Plugin/Getopt.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 # Setup default alarm handler for alarm($ng->timeout) in plugin $SIG{ALRM} = sub { my $plugin = uc $self->{_attr}->{plugin}; - $plugin =~ s/^CHECK_//; + $plugin =~ s/^CHECK[-_]//; $self->_die( sprintf("%s UNKNOWN - plugin timed out (timeout %ss)", $plugin, $self->timeout)); -- cgit v1.2.3-74-g34f1