| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Nagios::Passive; |
|
2
|
4
|
|
|
4
|
|
119941
|
use strict; |
|
|
4
|
|
|
|
|
8
|
|
|
|
4
|
|
|
|
|
154
|
|
|
3
|
4
|
|
|
4
|
|
21
|
use Carp; |
|
|
4
|
|
|
|
|
9
|
|
|
|
4
|
|
|
|
|
356
|
|
|
4
|
4
|
|
|
4
|
|
2636
|
use Class::Load qw/load_class/; |
|
|
4
|
|
|
|
|
97376
|
|
|
|
4
|
|
|
|
|
335
|
|
|
5
|
4
|
|
|
4
|
|
3478
|
use version; our $VERSION = qv('0.4.0'); |
|
|
4
|
|
|
|
|
8249
|
|
|
|
4
|
|
|
|
|
31
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub create { |
|
8
|
5
|
|
|
5
|
1
|
499035
|
my $this = shift; |
|
9
|
5
|
50
|
|
|
|
69
|
my %opts = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_; |
|
|
0
|
|
|
|
|
0
|
|
|
10
|
5
|
|
|
|
|
11
|
my $class; |
|
11
|
5
|
100
|
|
|
|
28
|
if(exists $opts{command_file}) { |
|
|
|
50
|
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
12
|
2
|
|
|
|
|
5
|
$class = 'Nagios::Passive::CommandFile'; |
|
13
|
2
|
|
|
|
|
9
|
load_class($class); |
|
14
|
|
|
|
|
|
|
} elsif(exists $opts{checkresults_dir}) { |
|
15
|
3
|
|
|
|
|
5
|
$class = 'Nagios::Passive::ResultPath'; |
|
16
|
3
|
|
|
|
|
21
|
load_class($class); |
|
17
|
|
|
|
|
|
|
} elsif(exists $opts{gearman}) { |
|
18
|
0
|
|
|
|
|
0
|
$class = 'Nagios::Passive::Gearman'; |
|
19
|
0
|
|
|
|
|
0
|
load_class($class); |
|
20
|
|
|
|
|
|
|
} else { |
|
21
|
0
|
|
|
|
|
0
|
croak("no backend specified"); |
|
22
|
|
|
|
|
|
|
} |
|
23
|
2
|
|
|
|
|
233
|
return $class->new(%opts); |
|
24
|
|
|
|
|
|
|
} |
|
25
|
|
|
|
|
|
|
1; |
|
26
|
|
|
|
|
|
|
__END__ |