line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Monitoring::GLPlugin::Item; |
2
|
|
|
|
|
|
|
our @ISA = qw(Monitoring::GLPlugin); |
3
|
|
|
|
|
|
|
|
4
|
2
|
|
|
2
|
|
8
|
use strict; |
|
2
|
|
|
|
|
2
|
|
|
2
|
|
|
|
|
354
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub new { |
7
|
0
|
|
|
0
|
0
|
|
my ($class, %params) = @_; |
8
|
0
|
|
|
|
|
|
my $self = { |
9
|
|
|
|
|
|
|
blacklisted => 0, |
10
|
|
|
|
|
|
|
info => undef, |
11
|
|
|
|
|
|
|
extendedinfo => undef, |
12
|
|
|
|
|
|
|
}; |
13
|
0
|
|
|
|
|
|
bless $self, $class; |
14
|
0
|
|
|
|
|
|
$self->init(%params); |
15
|
0
|
|
|
|
|
|
return $self; |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
sub check { |
19
|
0
|
|
|
0
|
0
|
|
my ($self, $lists) = @_; |
20
|
0
|
0
|
|
|
|
|
my @lists = $lists ? @{$lists} : grep { ref($self->{$_}) eq "ARRAY" } keys %{$self}; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
21
|
0
|
|
|
|
|
|
foreach my $list (@lists) { |
22
|
0
|
|
|
|
|
|
$self->add_info('checking '.$list); |
23
|
0
|
|
|
|
|
|
foreach my $element (@{$self->{$list}}) { |
|
0
|
|
|
|
|
|
|
24
|
0
|
0
|
|
|
|
|
$element->blacklist() if $self->is_blacklisted(); |
25
|
0
|
|
|
|
|
|
$element->check(); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
1; |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
__END__ |