line |
true |
false |
branch |
20
|
2 |
1 |
unless grep /BEGIN/, keys %Monitoring::GLPlugin::Commandline::Getopt:: |
46
|
0 |
6 |
if $AUTOLOAD =~ /DESTROY/ |
48
|
0 |
6 |
if $self->{'opts'}->verbose >= 2 |
49
|
6 |
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 $output |
399
|
0 |
0 |
if (scalar @{$self->{'perfdata'};}) |
403
|
0 |
0 |
if ($self->opts->can('isvalidtime') and not $self->opts->isvalidtime) |
408
|
0 |
0 |
unless (exists $self->{'suppress_messages'}) |
416
|
0 |
0 |
if (exists $params{'metric'}) { } |
422
|
0 |
0 |
if (defined $self->opts->warning) |
425
|
0 |
0 |
if (defined $self->opts->critical) |
429
|
0 |
0 |
if ($self->opts->warningx) |
437
|
0 |
0 |
if ($key =~ /\*/) { } |
444
|
0 |
0 |
unless $metric =~ /$key/ |
450
|
0 |
0 |
if $key ne $metric |
455
|
0 |
0 |
if ($self->opts->criticalx) |
460
|
0 |
0 |
if ($key =~ /\*/) { } |
467
|
0 |
0 |
unless $metric =~ /$key/ |
473
|
0 |
0 |
if $key ne $metric |
480
|
0 |
0 |
defined $params{'warning'} ? : |
|
0 |
0 |
defined $self->opts->warning ? : |
482
|
0 |
0 |
defined $params{'critical'} ? : |
|
0 |
0 |
defined $self->opts->critical ? : |
488
|
0 |
0 |
if (exists $params{'metric'}) { } |
500
|
0 |
0 |
if (scalar @params > 1) { } |
517
|
0 |
0 |
if (scalar @params > 1) { } |
521
|
0 |
0 |
if ($metric ne 'default') { } |
524
|
0 |
0 |
exists $self->{'thresholds'}{$metric}{'warning'} ? : |
527
|
0 |
0 |
exists $self->{'thresholds'}{$metric}{'critical'} ? : |
530
|
0 |
0 |
defined $params{'warning'} ? : |
532
|
0 |
0 |
defined $params{'critical'} ? : |
539
|
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]+)$/) { } |
544
|
0 |
0 |
if $value > $1 or $value < 0 |
548
|
0 |
0 |
if $value < $1 |
552
|
0 |
0 |
if $value > $1 |
556
|
0 |
0 |
if $value < $1 or $value > $2 |
560
|
0 |
0 |
if $value >= $1 and $value <= $2 |
562
|
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]+)$/) { } |
567
|
0 |
0 |
if $value > $1 or $value < 0 |
571
|
0 |
0 |
if $value < $1 |
575
|
0 |
0 |
if $value > $1 |
579
|
0 |
0 |
if $value < $1 or $value > $2 |
583
|
0 |
0 |
if $value >= $1 and $value <= $2 |