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. 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 v0.10-9-g596f