Skip to content

Commit

Permalink
Fixed single quoted check_multi labels
Browse files Browse the repository at this point in the history
Not only standard, also check_multi labels might be enclosed with
single quotes: 'service::plugin::perfdata'=123
parse_perfstring now supports these single quoted labels.
  • Loading branch information
flackem authored and Joerg Linge committed Sep 26, 2011
1 parent 779f2d3 commit 4d5d58e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions ChangeLog
@@ -1,4 +1,5 @@
**pnp-0.6.16 ??/??/2011**
* Bugfix: Fixed single quoted check_multi labels (reported by Matthias Flacke)

**pnp-0.6.15 09/15/2011**
* Bugfix: Fixed Overview link (reported by Stefan Triep)
Expand Down
4 changes: 2 additions & 2 deletions scripts/process_perfdata.pl.in
Expand Up @@ -986,7 +986,7 @@ sub parse_perfstring {
#
# check_multi
#
if ( $perfstring =~ /^([a-zA-Z0-9\.\-_\s\/\#]+)::([a-zA-Z0-9\.\-_\s]+)::([^=]+)=/ ) {
if ( $perfstring =~ /^[']?([a-zA-Z0-9\.\-_\s\/\#]+)::([a-zA-Z0-9\.\-_\s]+)::([^=]+)[']?=/ ) {
$is_multi = 1;
print_log( "check_multi Perfdata start", 3 );
my $count = 0;
Expand All @@ -1001,7 +1001,7 @@ sub parse_perfstring {
@perfs = ();
last;
}
if ( $p{label} =~ /^([a-zA-Z0-9\.\-_\s\/\#]+)::([a-zA-Z0-9\.\-_\s]+)::([^=]+)$/ ) {
if ( $p{label} =~ /^[']?([a-zA-Z0-9\.\-_\s\/\#]+)::([a-zA-Z0-9\.\-_\s]+)::([^=]+)[']?$/ ) {
@multi = ( $1, $2, $3 );
if ( $count == 0 ) {
print_log( "DEBUG: First check_multi block", 3 );
Expand Down

0 comments on commit 4d5d58e

Please sign in to comment.