line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Nagios::Passive; |
2
|
5
|
|
|
5
|
|
154171
|
use strict; |
|
5
|
|
|
|
|
16
|
|
|
5
|
|
|
|
|
181
|
|
3
|
5
|
|
|
5
|
|
30
|
use Carp; |
|
5
|
|
|
|
|
11
|
|
|
5
|
|
|
|
|
432
|
|
4
|
5
|
|
|
5
|
|
2631
|
use Class::Load qw/load_class/; |
|
5
|
|
|
|
|
118564
|
|
|
5
|
|
|
|
|
419
|
|
5
|
5
|
|
|
5
|
|
2904
|
use version; our $VERSION = qv('0.4.1'); |
|
5
|
|
|
|
|
10431
|
|
|
5
|
|
|
|
|
33
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub create { |
8
|
9
|
|
|
9
|
1
|
13811
|
my $this = shift; |
9
|
9
|
50
|
|
|
|
112
|
my %opts = ref($_[0]) eq 'HASH' ? %{ $_[0] } : @_; |
|
0
|
|
|
|
|
0
|
|
10
|
9
|
|
|
|
|
29
|
my $class; |
11
|
9
|
100
|
|
|
|
63
|
if(exists $opts{command_file}) { |
|
|
100
|
|
|
|
|
|
|
|
50
|
|
|
|
|
|
12
|
3
|
|
|
|
|
10
|
$class = 'Nagios::Passive::CommandFile'; |
13
|
3
|
|
|
|
|
26
|
load_class($class); |
14
|
|
|
|
|
|
|
} elsif(exists $opts{checkresults_dir}) { |
15
|
4
|
|
|
|
|
12
|
$class = 'Nagios::Passive::ResultPath'; |
16
|
4
|
|
|
|
|
29
|
load_class($class); |
17
|
|
|
|
|
|
|
} elsif(exists $opts{gearman}) { |
18
|
2
|
|
|
|
|
4
|
$class = 'Nagios::Passive::Gearman'; |
19
|
2
|
|
|
|
|
15
|
load_class($class); |
20
|
|
|
|
|
|
|
} else { |
21
|
0
|
|
|
|
|
0
|
croak("no backend specified"); |
22
|
|
|
|
|
|
|
} |
23
|
9
|
|
|
|
|
1028
|
return $class->new(%opts); |
24
|
|
|
|
|
|
|
} |
25
|
|
|
|
|
|
|
1; |
26
|
|
|
|
|
|
|
__END__ |