Merge pull request #1752 from tanguyvda/master
fix compilation when fatpacked and date regex issue
This commit is contained in:
commit
0b99a9a6ad
|
@ -48,10 +48,10 @@ sub custom_status_calc {
|
|||
|
||||
my ($start, $end);
|
||||
my %months = ("Jan" => 1, "Feb" => 2, "Mar" => 3, "Apr" => 4, "May" => 5, "Jun" => 6, "Jul" => 7, "Aug" => 8, "Sep" => 9, "Oct" => 10, "Nov" => 11, "Dec" => 12);
|
||||
if (defined($self->{result_values}->{start_time}) && $self->{result_values}->{start_time} =~ /^(\w+)\s(\w+)\s(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) { # Mon Jan 01 13:01:23 2018
|
||||
if (defined($self->{result_values}->{start_time}) && $self->{result_values}->{start_time} =~ /^(\w+)\s(\w+)\s+(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) { # Mon Jan 1 13:01:23 2018 or Mon Jan 15 13:01:23
|
||||
$start = DateTime->new(year => $7, month => $months{$2}, day => $3, hour => $4, minute => $5, second => $6);
|
||||
}
|
||||
if (defined($self->{result_values}->{completion_time}) && $self->{result_values}->{completion_time} =~ /^(\w+)\s(\w+)\s(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) {
|
||||
if (defined($self->{result_values}->{completion_time}) && $self->{result_values}->{completion_time} =~ /^(\w+)\s(\w+)\s+(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) {
|
||||
$end = DateTime->new(year => $7, month => $months{$2}, day => $3, hour => $4, minute => $5, second => $6);
|
||||
}
|
||||
|
||||
|
|
|
@ -48,10 +48,10 @@
|
|||
|
||||
my ($start, $end);
|
||||
my %months = ("Jan" => 1, "Feb" => 2, "Mar" => 3, "Apr" => 4, "May" => 5, "Jun" => 6, "Jul" => 7, "Aug" => 8, "Sep" => 9, "Oct" => 10, "Nov" => 11, "Dec" => 12);
|
||||
if (defined($self->{result_values}->{start_time}) && $self->{result_values}->{start_time} =~ /^(\w+)\s(\w+)\s(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) { # Mon Jan 01 13:01:23 2018
|
||||
if (defined($self->{result_values}->{start_time}) && $self->{result_values}->{start_time} =~ /^(\w+)\s(\w+)\s+(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) { # Mon Jan 1 13:01:23 2018 or Mon Jan 15 13:01:23
|
||||
$start = DateTime->new(year => $7, month => $months{$2}, day => $3, hour => $4, minute => $5, second => $6);
|
||||
}
|
||||
if (defined($self->{result_values}->{completion_time}) && $self->{result_values}->{completion_time} =~ /^(\w+)\s(\w+)\s(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) {
|
||||
if (defined($self->{result_values}->{completion_time}) && $self->{result_values}->{completion_time} =~ /^(\w+)\s(\w+)\s+(\d+)\s(\d+):(\d+):(\d+)\s(\d+)$/) {
|
||||
$end = DateTime->new(year => $7, month => $months{$2}, day => $3, hour => $4, minute => $5, second => $6);
|
||||
}
|
||||
|
||||
|
@ -203,77 +203,77 @@
|
|||
}
|
||||
}
|
||||
|
||||
1;
|
||||
1;
|
||||
|
||||
__END__
|
||||
__END__
|
||||
|
||||
=head1 MODE
|
||||
=head1 MODE
|
||||
|
||||
Check deduped VTL on source.
|
||||
Check deduped VTL on source.
|
||||
|
||||
=over 8
|
||||
=over 8
|
||||
|
||||
=item B<--hostname>
|
||||
=item B<--hostname>
|
||||
|
||||
Hostname to query.
|
||||
Hostname to query.
|
||||
|
||||
=item B<--filter-counters>
|
||||
=item B<--filter-counters>
|
||||
|
||||
Only display some counters (regexp can be used).
|
||||
Example: --filter-counters='status'
|
||||
Only display some counters (regexp can be used).
|
||||
Example: --filter-counters='status'
|
||||
|
||||
=item B<--warning-status>
|
||||
=item B<--warning-status>
|
||||
|
||||
Set warning threshold for status (Default: '%{state} !~ /Enabled/i').
|
||||
Can used special variables like: %{status}, %{state}, %{duration}, %{percent_complete}.
|
||||
Set warning threshold for status (Default: '%{state} !~ /Enabled/i').
|
||||
Can used special variables like: %{status}, %{state}, %{duration}, %{percent_complete}.
|
||||
|
||||
=item B<--critical-status>
|
||||
=item B<--critical-status>
|
||||
|
||||
Set critical threshold for status (Default: '').
|
||||
Can used special variables like: %{status}, %{state}, %{duration}, %{percent_complete}.
|
||||
Set critical threshold for status (Default: '').
|
||||
Can used special variables like: %{status}, %{state}, %{duration}, %{percent_complete}.
|
||||
|
||||
=item B<--warning-*>
|
||||
=item B<--warning-*>
|
||||
|
||||
Threshold warning.
|
||||
Can be: 'original-data-size', 'sent-data-size'.
|
||||
Threshold warning.
|
||||
Can be: 'original-data-size', 'sent-data-size'.
|
||||
|
||||
=item B<--critical-*>
|
||||
=item B<--critical-*>
|
||||
|
||||
Threshold critical.
|
||||
Can be: 'original-data-size', 'sent-data-size'.
|
||||
Threshold critical.
|
||||
Can be: 'original-data-size', 'sent-data-size'.
|
||||
|
||||
=item B<--ssh-option>
|
||||
=item B<--ssh-option>
|
||||
|
||||
Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
|
||||
Specify multiple options like the user (example: --ssh-option='-l=centreon-engine' --ssh-option='-p=52').
|
||||
|
||||
=item B<--ssh-path>
|
||||
=item B<--ssh-path>
|
||||
|
||||
Specify ssh command path (default: none)
|
||||
Specify ssh command path (default: none)
|
||||
|
||||
=item B<--ssh-command>
|
||||
=item B<--ssh-command>
|
||||
|
||||
Specify ssh command (default: 'ssh'). Useful to use 'plink'.
|
||||
Specify ssh command (default: 'ssh'). Useful to use 'plink'.
|
||||
|
||||
=item B<--timeout>
|
||||
=item B<--timeout>
|
||||
|
||||
Timeout in seconds for the command (Default: 30).
|
||||
Timeout in seconds for the command (Default: 30).
|
||||
|
||||
=item B<--sudo>
|
||||
=item B<--sudo>
|
||||
|
||||
Use 'sudo' to execute the command.
|
||||
Use 'sudo' to execute the command.
|
||||
|
||||
=item B<--command>
|
||||
=item B<--command>
|
||||
|
||||
Command to get information (Default: 'syscli').
|
||||
Command to get information (Default: 'syscli').
|
||||
|
||||
=item B<--command-path>
|
||||
=item B<--command-path>
|
||||
|
||||
Command path.
|
||||
Command path.
|
||||
|
||||
=item B<--command-options>
|
||||
=item B<--command-options>
|
||||
|
||||
Command options (Default: '--list dedupvtl').
|
||||
Command options (Default: '--list dedupvtl').
|
||||
|
||||
=back
|
||||
=back
|
||||
|
||||
=cut
|
||||
=cut
|
||||
|
|
Loading…
Reference in New Issue