fix some indent
This commit is contained in:
parent
a14e725908
commit
eaa0f0a0ec
|
@ -47,7 +47,8 @@ sub custom_maindb_status_output {
|
|||
$self->{result_values}->{current_maindb_version},
|
||||
$self->{result_values}->{last_maindb_version},
|
||||
centreon::plugins::misc::change_seconds(
|
||||
value => $self->{result_values}->{current_maindb_timediff})
|
||||
value => $self->{result_values}->{current_maindb_timediff}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -59,7 +60,8 @@ sub custom_dailydb_status_output {
|
|||
$self->{result_values}->{current_dailydb_version};
|
||||
$self->{result_values}->{last_dailydb_version},
|
||||
centreon::plugins::misc::change_seconds(
|
||||
value => $self->{result_values}->{current_dailydb_timediff})
|
||||
value => $self->{result_values}->{current_dailydb_timediff}
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -75,21 +77,21 @@ sub set_counters {
|
|||
key_values => [ { name => 'last_engine_version' }, { name => 'current_engine_version' } ],
|
||||
closure_custom_output => $self->can('custom_engine_status_output'),
|
||||
closure_custom_perfdata => sub { return 0; },
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng,
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng
|
||||
}
|
||||
},
|
||||
{ label => 'maindb-status', typed => 2, critical_default => '%{last_maindb_version} ne %{current_maindb_version}', set => {
|
||||
key_values => [ { name => 'last_maindb_version' }, { name => 'current_maindb_version' }, { name => 'current_maindb_timediff' } ],
|
||||
closure_custom_output => $self->can('custom_maindb_status_output'),
|
||||
closure_custom_perfdata => sub { return 0; },
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng,
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng
|
||||
}
|
||||
},
|
||||
{ label => 'dailydb-status', type => 2, critical_default => '%{last_dailydb_version} ne %{current_dailydb_version} || %{current_dailydb_timediff} > 432000', set => {
|
||||
key_values => [ { name => 'last_dailydb_version' }, { name => 'current_dailydb_version' }, { name => 'current_dailydb_timediff' } ],
|
||||
closure_custom_output => $self->can('custom_dailydb_status_output'),
|
||||
closure_custom_perfdata => sub { return 0; },
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng,
|
||||
closure_custom_threshold_check => \&catalog_status_threshold_ng
|
||||
}
|
||||
}
|
||||
];
|
||||
|
@ -113,7 +115,7 @@ sub new {
|
|||
'command-options:s' => { name => 'command_options' },
|
||||
'nameservers:s@' => { name => 'nameservers' },
|
||||
'maindb-file:s' => { name => 'maindb_file', default => '/var/lib/clamav/main.cvd' },
|
||||
'dailydb-file:s' => { name => 'dailydb_file', default => '/var/lib/clamav/daily.cvd' },
|
||||
'dailydb-file:s' => { name => 'dailydb_file', default => '/var/lib/clamav/daily.cvd' }
|
||||
});
|
||||
|
||||
return $self;
|
||||
|
@ -179,12 +181,14 @@ sub manage_selection {
|
|||
my ($self, %options) = @_;
|
||||
|
||||
$self->get_clamav_last_update();
|
||||
my ($stdout) = centreon::plugins::misc::execute(output => $self->{output},
|
||||
my ($stdout) = centreon::plugins::misc::execute(
|
||||
output => $self->{output},
|
||||
options => $self->{option_results},
|
||||
sudo => $self->{option_results}->{sudo},
|
||||
command => defined($self->{option_results}->{command}) && $self->{option_results}->{command} ne '' ? $self->{option_results}->{command} : $self->{clamav_command},
|
||||
command_path => $self->{option_results}->{command_path},
|
||||
command_options => defined($self->{option_results}->{command_options}) && $self->{option_results}->{command_options} ne '' ? $self->{option_results}->{command_options} : undef);
|
||||
command_options => defined($self->{option_results}->{command_options}) && $self->{option_results}->{command_options} ne '' ? $self->{option_results}->{command_options} : undef
|
||||
);
|
||||
#==== CLAMD ===
|
||||
#ClamAV 0.99.2/21723/Mon Jun 13 14:53:00 2016
|
||||
#==== DAILY ====
|
||||
|
@ -212,7 +216,6 @@ sub manage_selection {
|
|||
#Digital signature: AIzk/LYbX8K9OEbR5GMyJ6LWTqSu9ffa5bONcA0FN3+onMlZ2BMRzuyvVURBvAZvOaGPdtMBcgDJSl7fGxDfcxRWhIrQ98f8FPdAQaFPgWu3EX46ufw+IRZnM4irKKYuh1GdCIbsGs6jejWo9iNErsbDqkFSobVBkUJYxBgvqfd
|
||||
#Verification OK.
|
||||
|
||||
|
||||
$self->get_clamav_current_signature_info(label => 'daily', content => $stdout);
|
||||
$self->get_clamav_current_signature_info(label => 'main', content => $stdout);
|
||||
if ($stdout =~ /==== CLAMD.*?ClamAV (.*?)\//msi) {
|
||||
|
|
Loading…
Reference in New Issue