diff options
author | Sven Nierlein <sven@nierlein.org> | 2016-06-22 16:06:59 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2016-06-22 16:06:59 +0200 |
commit | aa86ee05fc2e7c29c89206c2ee1bbc3ef575eb83 (patch) | |
tree | 0652515b431c380bc4067f591bae013e29855b59 /lib/Monitoring/Plugin | |
parent | 7e95a42817dd33bec6c820b4c29d090c44edc588 (diff) | |
parent | 9fb9fd53f22fe8b806909b4d5cff83e493e72ab4 (diff) | |
download | monitoring-plugin-perl-aa86ee05fc2e7c29c89206c2ee1bbc3ef575eb83.tar.gz |
Merge pull request #12 from pdugas/master
Fix plugin-name processing in ALRM handler.
Diffstat (limited to 'lib/Monitoring/Plugin')
-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 1740830..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)); |