Fix #2188
This commit is contained in:
parent
3f640e0515
commit
b7b4f6c88c
|
@ -24,8 +24,7 @@ use base qw(centreon::plugins::templates::counter);
|
|||
|
||||
use strict;
|
||||
use warnings;
|
||||
use DateTime;
|
||||
use POSIX qw(strftime);
|
||||
use POSIX;
|
||||
|
||||
use base qw(centreon::plugins::templates::counter);
|
||||
|
||||
|
@ -45,7 +44,7 @@ sub set_counters {
|
|||
$self->{maps_counters}->{queues} = [
|
||||
{ label => 'total', nlabel => 'mulesoft.mq.messages.total.count', set => {
|
||||
key_values => [ { name => 'total' }, { name => 'display' } ],
|
||||
output_template => 'Total : %s',
|
||||
output_template => 'total: %s',
|
||||
perfdatas => [ { template => '%d', min => 0, cast_int => 1, label_extra_instance => 1, instance_use => 'display' } ]
|
||||
}
|
||||
},
|
||||
|
@ -110,9 +109,10 @@ sub check_options {
|
|||
sub manage_selection {
|
||||
my ($self, %options) = @_;
|
||||
|
||||
POSIX::setlocale(LC_ALL, "C");
|
||||
my $time = time();
|
||||
my $end_time = strftime('%a, %d %b %Y %H:%M:%S', gmtime()) . ' GMT';
|
||||
my $start_time = strftime('%a, %d %b %Y %H:%M:%S', gmtime($time - $self->{option_results}->{timeframe})) . ' GMT';
|
||||
my $end_time = POSIX::strftime('%a, %d %b %Y %H:%M:%S', gmtime()) . ' GMT';
|
||||
my $start_time = POSIX::strftime('%a, %d %b %Y %H:%M:%S', gmtime($time - $self->{option_results}->{timeframe})) . ' GMT';
|
||||
|
||||
my $destinations = $options{custom}->list_objects(
|
||||
api_type => 'mq',
|
||||
|
|
Loading…
Reference in New Issue