This commit is contained in:
garnier-quentin 2019-08-27 10:35:47 +02:00
parent 8a706e8643
commit 4a7066bf19
1 changed files with 25 additions and 26 deletions

View File

@ -89,25 +89,25 @@ sub set_counters {
sub prefix_av_output { sub prefix_av_output {
my ($self, %options) = @_; my ($self, %options) = @_;
return "AV Signature "; return 'AV Signature ';
} }
sub prefix_avet_output { sub prefix_avet_output {
my ($self, %options) = @_; my ($self, %options) = @_;
return "AV Extended Signature "; return 'AV Extended Signature ';
} }
sub prefix_ips_output { sub prefix_ips_output {
my ($self, %options) = @_; my ($self, %options) = @_;
return "IPS Signature "; return 'IPS Signature ';
} }
sub prefix_ipset_output { sub prefix_ipset_output {
my ($self, %options) = @_; my ($self, %options) = @_;
return "IPS Extended Signature "; return 'IPS Extended Signature ';
} }
sub new { sub new {
@ -115,8 +115,7 @@ sub new {
my $self = $class->SUPER::new(package => __PACKAGE__, %options); my $self = $class->SUPER::new(package => __PACKAGE__, %options);
bless $self, $class; bless $self, $class;
$options{options}->add_options(arguments => $options{options}->add_options(arguments => {
{
}); });
return $self; return $self;
@ -152,17 +151,22 @@ sub manage_selection {
my $avet_diff = $now - $avet_epoch; my $avet_diff = $now - $avet_epoch;
my $ipset_diff = $now - $ipset_epoch; my $ipset_diff = $now - $ipset_epoch;
$self->{av} = { human => centreon::plugins::misc::change_seconds(value => $av_diff, start => 'h'), $self->{av} = {
value => $av_diff }; human => centreon::plugins::misc::change_seconds(value => $av_diff, start => 'h'),
value => $av_diff
$self->{ips} = { human => centreon::plugins::misc::change_seconds(value => $ips_diff, start => 'h'), };
value => $ips_diff }; $self->{ips} = {
human => centreon::plugins::misc::change_seconds(value => $ips_diff, start => 'h'),
$self->{avet} = { human => centreon::plugins::misc::change_seconds(value => $avet_diff, start => 'h'), value => $ips_diff
value => $avet_diff }; };
$self->{avet} = {
$self->{ipset} = { human => centreon::plugins::misc::change_seconds(value => $ipset_diff, start => 'h'), human => centreon::plugins::misc::change_seconds(value => $avet_diff, start => 'h'),
value => $ipset_diff }; value => $avet_diff
};
$self->{ipset} = {
human => centreon::plugins::misc::change_seconds(value => $ipset_diff, start => 'h'),
value => $ipset_diff
};
} }
1; 1;
@ -180,15 +184,10 @@ Check last update/refresh of av and ips signatures
Only display some counters (regexp can be used). Only display some counters (regexp can be used).
Example: --filter-counters='^av$' Example: --filter-counters='^av$'
=item B<--warning-*> =item B<--warning-*> B<--critical-*>
Threshold warning (in seconds). Thresholds (in seconds).
Can be: 'av', 'ips' Can be: 'av', 'ips', 'avset', ipset'.
=item B<--critical-*>
Threshold critical (in seconds).
Can be: 'av', 'ips'
=back =back