|  line  | 
 true  | 
 false  | 
 branch  | 
 
| 
20
 | 
 5  | 
 2  | 
 unless grep /BEGIN/, keys %Monitoring::GLPlugin::Commandline::Getopt::  | 
 
| 
46
 | 
 0  | 
 7  | 
 if $AUTOLOAD =~ /DESTROY/  | 
 
| 
48
 | 
 0  | 
 7  | 
 if $self->{'opts'}->verbose >= 2  | 
 
| 
49
 | 
 7  | 
 0  | 
 if ($AUTOLOAD =~ /^.*::(add_arg|override_opt|create_opt)$/)  | 
 
| 
64
 | 
 0  | 
 0  | 
 -f $tracefile ? :  | 
 
| 
65
 | 
 0  | 
 0  | 
 if ($self->opts->verbose and $self->opts->verbose > 10)  | 
 
| 
70
 | 
 0  | 
 0  | 
 if ($self->{'trace'})  | 
 
| 
73
 | 
 0  | 
 0  | 
 if ($logfh->open($tracefile, 'a'))  | 
 
| 
94
 | 
 0  | 
 0  | 
 if $code =~ /^\d+$/  | 
 
| 
101
 | 
 0  | 
 0  | 
 if ($self->opts->can('selectedperfdata') and $self->opts->selectedperfdata) { }  | 
 
| 
103
 | 
 0  | 
 0  | 
 $label =~ /$pattern/i ? :  | 
 
| 
127
 | 
 0  | 
 0  | 
 if ($self->opts->can('morphperfdata') and $self->opts->morphperfdata)  | 
 
| 
130
 | 
 0  | 
 0  | 
 if ($label =~ /$key/)  | 
 
| 
134
 | 
 0  | 
 0  | 
 if (exists $self->{'thresholds'}{$oldlabel})  | 
 
| 
140
 | 
 0  | 
 0  | 
 if ($value =~ /\./) { }  | 
 
| 
141
 | 
 0  | 
 0  | 
 if (defined $args{'places'}) { }  | 
 
| 
151
 | 
 0  | 
 0  | 
 defined $args{'min'} ? :  | 
 
| 
152
 | 
 0  | 
 0  | 
 defined $args{'max'} ? :  | 
 
| 
153
 | 
 0  | 
 0  | 
 if ($args{'thresholds'} or not exists $args{'warning'} || exists $args{'critical'}) { }  | 
 
| 
154
 | 
 0  | 
 0  | 
 if (exists $self->{'thresholds'}{$label}{'warning'}) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif (exists $self->{'thresholds'}{'default'}{'warning'}) { }  | 
 
| 
159
 | 
 0  | 
 0  | 
 if (exists $self->{'thresholds'}{$label}{'critical'}) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif (exists $self->{'thresholds'}{'default'}{'critical'}) { }  | 
 
| 
165
 | 
 0  | 
 0  | 
 if ($args{'warning'})  | 
 
| 
168
 | 
 0  | 
 0  | 
 if ($args{'critical'})  | 
 
| 
172
 | 
 0  | 
 0  | 
 if ($uom eq '%')  | 
 
| 
176
 | 
 0  | 
 0  | 
 if (defined $args{'places'})  | 
 
| 
179
 | 
 0  | 
 0  | 
 if ($warn ne '')  | 
 
| 
185
 | 
 0  | 
 0  | 
 /[\+\-\d\.]+/ ? :  | 
 
| 
188
 | 
 0  | 
 0  | 
 if ($crit ne '')  | 
 
| 
194
 | 
 0  | 
 0  | 
 /[\+\-\d\.]+/ ? :  | 
 
| 
197
 | 
 0  | 
 0  | 
 if ($min ne '')  | 
 
| 
203
 | 
 0  | 
 0  | 
 /[\+\-\d\.]+/ ? :  | 
 
| 
206
 | 
 0  | 
 0  | 
 if ($max ne '')  | 
 
| 
212
 | 
 0  | 
 0  | 
 /[\+\-\d\.]+/ ? :  | 
 
| 
216
 | 
 0  | 
 0  | 
 if $self->selected_perfdata($label)  | 
 
| 
226
 | 
 0  | 
 0  | 
 if ($args{'help'})  | 
 
| 
229
 | 
 0  | 
 0  | 
 if ($args{'type'})  | 
 
| 
232
 | 
 0  | 
 0  | 
 if ($args{'labels'}) { }  | 
 
| 
255
 | 
 0  | 
 0  | 
 if $code =~ /^\d+$/  | 
 
| 
263
 | 
 0  | 
 0  | 
 if ($self->opts->report and $self->opts->report eq 'short')  | 
 
| 
265
 | 
 0  | 
 0  | 
 if not $self->check_messages  | 
 
| 
273
 | 
 0  | 
 0  | 
 if not $self->check_messages  | 
 
| 
282
 | 
 0  | 
 0  | 
 if ($args{$code}) { }  | 
 
| 
283
 | 
 0  | 
 0  | 
 unless (ref $args{$code} eq 'ARRAY')  | 
 
| 
284
 | 
 0  | 
 0  | 
 if ($code eq 'ok')  | 
 
| 
294
 | 
 0  | 
 0  | 
 unless defined $arg{'join'}  | 
 
| 
298
 | 
 0  | 
 0  | 
 if @{$arg{'critical'};}  | 
 
| 
299
 | 
 0  | 
 0  | 
 if @{$arg{'warning'};}  | 
 
| 
300
 | 
 0  | 
 0  | 
 if @{$arg{'unknown'};}  | 
 
| 
301
 | 
 0  | 
 0  | 
 unless wantarray  | 
 
| 
305
 | 
 0  | 
 0  | 
 if ($arg{'join_all'}) { }  | 
 
| 
307
 | 
 0  | 
 0  | 
 @$_ ? :  | 
 
| 
311
 | 
 0  | 
 0  | 
 ref $arg{'ok'} ? :  | 
 
| 
 | 
 0  | 
 0  | 
 $arg{'ok'} ? :  | 
 
| 
316
 | 
 0  | 
 0  | 
 if $code == 2  | 
 
| 
318
 | 
 0  | 
 0  | 
 if $code == 1  | 
 
| 
320
 | 
 0  | 
 0  | 
 if $code == 3  | 
 
| 
323
 | 
 0  | 
 0  | 
 ref $arg{'ok'} ? :  | 
 
| 
 | 
 0  | 
 0  | 
 if $arg{'ok'}  | 
 
| 
331
 | 
 0  | 
 0  | 
 if $code =~ /^\d+$/  | 
 
| 
333
 | 
 0  | 
 0  | 
 if defined $code and exists $ERRORS{$code}  | 
 
| 
334
 | 
 0  | 
 0  | 
 unless defined $code and exists $STATUS_TEXT{$code}  | 
 
| 
340
 | 
 0  | 
 0  | 
 if (scalar @{$self->{'perfdata'};}) { }  | 
 
| 
349
 | 
 0  | 
 0  | 
 if (scalar @{$self->{'metrics'};}) { }  | 
 
| 
358
 | 
 0  | 
 0  | 
 if (scalar @{$self->{'html'};}) { }  | 
 
| 
367
 | 
 0  | 
 0  | 
 if defined $code and exists $ERRORS{$code}  | 
 
| 
368
 | 
 0  | 
 0  | 
 unless defined $code and exists $STATUS_TEXT{$code}  | 
 
| 
369
 | 
 0  | 
 0  | 
 unless defined $message  | 
 
| 
370
 | 
 0  | 
 0  | 
 if (ref $message and ref $message eq 'ARRAY') { }  | 
 
| 
375
 | 
 0  | 
 0  | 
 if ($self->opts->negate)  | 
 
| 
378
 | 
 0  | 
 0  | 
 if (uc($from) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/ and uc($self->opts->negate->{$from}) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/)  | 
 
| 
380
 | 
 0  | 
 0  | 
 if ($original_code == $ERRORS{uc $from})  | 
 
| 
387
 | 
 0  | 
 0  | 
 if defined $message and $message ne ''  | 
 
| 
388
 | 
 0  | 
 0  | 
 if ($self->opts->can('morphmessage') and $self->opts->morphmessage)  | 
 
| 
392
 | 
 0  | 
 0  | 
 if ($output =~ /$key/)  | 
 
| 
398
 | 
 0  | 
 0  | 
 if ($self->opts->negate)  | 
 
| 
402
 | 
 0  | 
 0  | 
 if (uc($self->opts->negate->{$from}) =~ /^(OK|WARNING|CRITICAL|UNKNOWN)$/)  | 
 
| 
403
 | 
 0  | 
 0  | 
 if ($output =~ /$from/)  | 
 
| 
410
 | 
 0  | 
 0  | 
 if $output  | 
 
| 
411
 | 
 0  | 
 0  | 
 if (scalar @{$self->{'perfdata'};})  | 
 
| 
415
 | 
 0  | 
 0  | 
 if ($self->opts->can('isvalidtime') and not $self->opts->isvalidtime)  | 
 
| 
420
 | 
 0  | 
 0  | 
 unless (exists $self->{'suppress_messages'})  | 
 
| 
428
 | 
 0  | 
 0  | 
 if (exists $params{'metric'}) { }  | 
 
| 
434
 | 
 0  | 
 0  | 
 if (defined $self->opts->warning)  | 
 
| 
437
 | 
 0  | 
 0  | 
 if (defined $self->opts->critical)  | 
 
| 
441
 | 
 0  | 
 0  | 
 if ($self->opts->warningx)  | 
 
| 
449
 | 
 0  | 
 0  | 
 if ($key =~ /\*/) { }  | 
 
| 
456
 | 
 0  | 
 0  | 
 unless $metric =~ /$key/  | 
 
| 
462
 | 
 0  | 
 0  | 
 if $key ne $metric  | 
 
| 
467
 | 
 0  | 
 0  | 
 if ($self->opts->criticalx)  | 
 
| 
472
 | 
 0  | 
 0  | 
 if ($key =~ /\*/) { }  | 
 
| 
479
 | 
 0  | 
 0  | 
 unless $metric =~ /$key/  | 
 
| 
485
 | 
 0  | 
 0  | 
 if $key ne $metric  | 
 
| 
492
 | 
 0  | 
 0  | 
 defined $params{'warning'} ? :  | 
 
| 
 | 
 0  | 
 0  | 
 defined $self->opts->warning ? :  | 
 
| 
494
 | 
 0  | 
 0  | 
 defined $params{'critical'} ? :  | 
 
| 
 | 
 0  | 
 0  | 
 defined $self->opts->critical ? :  | 
 
| 
500
 | 
 0  | 
 0  | 
 if (exists $params{'metric'}) { }  | 
 
| 
512
 | 
 0  | 
 0  | 
 if (scalar @params > 1) { }  | 
 
| 
529
 | 
 0  | 
 0  | 
 if (scalar @params > 1) { }  | 
 
| 
533
 | 
 0  | 
 0  | 
 if ($metric ne 'default') { }  | 
 
| 
536
 | 
 0  | 
 0  | 
 exists $self->{'thresholds'}{$metric}{'warning'} ? :  | 
 
| 
539
 | 
 0  | 
 0  | 
 exists $self->{'thresholds'}{$metric}{'critical'} ? :  | 
 
| 
542
 | 
 0  | 
 0  | 
 defined $params{'warning'} ? :  | 
 
| 
544
 | 
 0  | 
 0  | 
 defined $params{'critical'} ? :  | 
 
| 
551
 | 
 0  | 
 0  | 
 if (not defined $warningrange) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($warningrange =~ /^([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($warningrange =~ /^([-+]?[0-9]*\.?[0-9]+):$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($warningrange =~ /^~:([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($warningrange =~ /^([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($warningrange =~ /^@([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
556
 | 
 0  | 
 0  | 
 if $value > $1 or $value < 0  | 
 
| 
560
 | 
 0  | 
 0  | 
 if $value < $1  | 
 
| 
564
 | 
 0  | 
 0  | 
 if $value > $1  | 
 
| 
568
 | 
 0  | 
 0  | 
 if $value < $1 or $value > $2  | 
 
| 
572
 | 
 0  | 
 0  | 
 if $value >= $1 and $value <= $2  | 
 
| 
574
 | 
 0  | 
 0  | 
 if (not defined $criticalrange) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($criticalrange =~ /^([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($criticalrange =~ /^([-+]?[0-9]*\.?[0-9]+):$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($criticalrange =~ /^~:([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($criticalrange =~ /^([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
 | 
 0  | 
 0  | 
 elsif ($criticalrange =~ /^@([-+]?[0-9]*\.?[0-9]+):([-+]?[0-9]*\.?[0-9]+)$/) { }  | 
 
| 
579
 | 
 0  | 
 0  | 
 if $value > $1 or $value < 0  | 
 
| 
583
 | 
 0  | 
 0  | 
 if $value < $1  | 
 
| 
587
 | 
 0  | 
 0  | 
 if $value > $1  | 
 
| 
591
 | 
 0  | 
 0  | 
 if $value < $1 or $value > $2  | 
 
| 
595
 | 
 0  | 
 0  | 
 if $value >= $1 and $value <= $2  | 
 
| 
602
 | 
 0  | 
 0  | 
 unless defined $str1 or defined $str2  | 
 
| 
603
 | 
 0  | 
 0  | 
 if not defined $str1 and defined $str2  | 
 
| 
604
 | 
 0  | 
 0  | 
 if defined $str1 and not defined $str2  | 
 
| 
605
 | 
 0  | 
 0  | 
 if $str1 eq $str2  |