line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Armadito::Agent::Antivirus::Kaspersky::Task::Alerts; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
18947631
|
use strict; |
|
1
|
|
|
|
|
5
|
|
|
1
|
|
|
|
|
46
|
|
4
|
1
|
|
|
1
|
|
6
|
use warnings; |
|
1
|
|
|
|
|
7
|
|
|
1
|
|
|
|
|
66
|
|
5
|
1
|
|
|
1
|
|
5
|
use base 'Armadito::Agent::Task::Alerts'; |
|
1
|
|
|
|
|
24
|
|
|
1
|
|
|
|
|
457
|
|
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
sub run { |
8
|
0
|
|
|
0
|
1
|
|
my ( $self, %params ) = @_; |
9
|
|
|
|
|
|
|
|
10
|
0
|
|
|
|
|
|
$self = $self->SUPER::run(%params); |
11
|
|
|
|
|
|
|
|
12
|
0
|
|
|
|
|
|
my $osclass = $self->{agent}->{antivirus}->getOSClass(); |
13
|
0
|
|
|
|
|
|
my $alerts = { alerts => $osclass->getAlerts() }; |
14
|
|
|
|
|
|
|
|
15
|
0
|
|
|
|
|
|
my $n_alerts = @{ $alerts->{alerts} }; |
|
0
|
|
|
|
|
|
|
16
|
0
|
|
|
|
|
|
$self->{logger}->info( $n_alerts . " alert(s) found." ); |
17
|
|
|
|
|
|
|
|
18
|
0
|
|
|
|
|
|
$self->_sendAlerts($alerts); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
1; |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
__END__ |
24
|
|
|
|
|
|
|
|
25
|
|
|
|
|
|
|
=head1 NAME |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
Armadito::Agent::Antivirus::Kaspersky::Task::Alerts - Alerts Task for Kaspersky Antivirus. |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
=head1 DESCRIPTION |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
This task inherits from L<Armadito::Agent::Task:Alerts>. Get Antivirus' alerts and send them as json messages to armadito glpi plugin. |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
=head1 FUNCTIONS |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head2 run ( $self, %params ) |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
Run the task. |