mirror of
https://github.com/centreon/centreon-plugins.git
synced 2025-07-31 01:24:35 +02:00
+ fix sampling period 20
This commit is contained in:
parent
4d076a4bb0
commit
47b4dbbd6c
@ -208,15 +208,15 @@ sub get_perf_metric_ids {
|
|||||||
|
|
||||||
foreach (@{$options{metrics}}) {
|
foreach (@{$options{metrics}}) {
|
||||||
if (defined($options{connector}->{perfcounter_cache}->{$_->{label}})) {
|
if (defined($options{connector}->{perfcounter_cache}->{$_->{label}})) {
|
||||||
foreach my $instance (@{$_->{instances}}) {
|
if ($options{interval} != 20 && $options{connector}->{perfcounter_cache}->{$_->{label}}{level} > $options{connector}->{sampling_periods}->{$options{interval}}->{level}) {
|
||||||
if ($options{connector}->{perfcounter_cache}->{$_->{label}}{level} > $options{connector}->{sampling_periods}->{$options{interval}}->{level}) {
|
$manager_display->{output}->output_add(severity => 'UNKNOWN',
|
||||||
$manager_display->{output}->output_add(severity => 'UNKNOWN',
|
short_msg => sprintf("Cannot get counter '%s' for the sampling period '%s' (counter level: %s, sampling level: %s)",
|
||||||
short_msg => sprintf("Cannot get counter '%s' for the sampling period '%s' (counter level: %s, sampling level: %s)",
|
$_->{label}, $options{interval},
|
||||||
$_->{label}, $options{interval},
|
$options{connector}->{perfcounter_cache}->{$_->{label}}{level},
|
||||||
$options{connector}->{perfcounter_cache}->{$_->{label}}{level},
|
$options{connector}->{sampling_periods}->{$options{interval}}->{level}));
|
||||||
$options{connector}->{sampling_periods}->{$options{interval}}->{level}));
|
return undef;
|
||||||
return undef;
|
}
|
||||||
}
|
foreach my $instance (@{$_->{instances}}) {
|
||||||
my $metric = PerfMetricId->new(counterId => $options{connector}->{perfcounter_cache}->{$_->{label}}{key},
|
my $metric = PerfMetricId->new(counterId => $options{connector}->{perfcounter_cache}->{$_->{label}}{key},
|
||||||
instance => $instance);
|
instance => $instance);
|
||||||
push @$filtered_list, $metric;
|
push @$filtered_list, $metric;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user