diff --git a/centreon-plugins/apps/monitoring/kadiska/mode/tracerstatistics.pm b/centreon-plugins/apps/monitoring/kadiska/mode/tracerstatistics.pm index f1294f676..55281c058 100644 --- a/centreon-plugins/apps/monitoring/kadiska/mode/tracerstatistics.pm +++ b/centreon-plugins/apps/monitoring/kadiska/mode/tracerstatistics.pm @@ -44,7 +44,7 @@ sub set_counters { key_values => [ { name => 'round_trip' }], output_template => 'Round trip: %.2f ms', perfdatas => [ - { label => 'round_trip', template => '%.2f', unit => 'ms', min => 0, label_extra_instance => 1 }, + { template => '%.2f', unit => 'ms', min => 0, label_extra_instance => 1 }, ], } }, @@ -52,7 +52,7 @@ sub set_counters { key_values => [ { name => 'path_length' } ], output_template => 'Path length: %.2f', perfdatas => [ - { label => 'path_length', template => '%.2f', min => 0, label_extra_instance => 1 }, + { template => '%.2f', min => 0, label_extra_instance => 1 }, ], } }, @@ -60,7 +60,7 @@ sub set_counters { key_values => [ { name => 'packets_loss_prct' } ], output_template => 'Packets Loss: %.2f %%', perfdatas => [ - { label => 'packets_loss_prct', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }, + { template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }, ], } } @@ -132,10 +132,10 @@ sub manage_selection { my $instance = $watcher->{"tracer:group"}; $self->{targets}->{$instance} = { - round_trip => ($watcher->{'rtt_furthest:avg'} / 1000), - packets_loss_prct => $watcher->{'loss_furthest:avg'}, - path_length => $watcher->{'length_furthest:avg'}, - } + round_trip => ($watcher->{'rtt_furthest:avg'} / 1000), + packets_loss_prct => $watcher->{'loss_furthest:avg'}, + path_length => $watcher->{'length_furthest:avg'}, + }; }; if (scalar(keys %{$self->{targets}}) <= 0) { diff --git a/centreon-plugins/apps/monitoring/kadiska/mode/watcherstatistics.pm b/centreon-plugins/apps/monitoring/kadiska/mode/watcherstatistics.pm index 2e3482821..204861a16 100644 --- a/centreon-plugins/apps/monitoring/kadiska/mode/watcherstatistics.pm +++ b/centreon-plugins/apps/monitoring/kadiska/mode/watcherstatistics.pm @@ -44,7 +44,7 @@ sub set_counters { key_values => [ { name => 'errors_prct' } ], output_template => 'errors: %.2f%%', perfdatas => [ - { label => 'errors_prct', template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }, + { template => '%.2f', unit => '%', min => 0, max => 100, label_extra_instance => 1 }, ], } }, @@ -52,7 +52,7 @@ sub set_counters { key_values => [ { name => 'sessions' } ], output_template => 'sessions: %s', perfdatas => [ - { label => 'sessions', template => '%s', min => 0, label_extra_instance => 1 }, + { template => '%s', min => 0, label_extra_instance => 1 }, ], } }, @@ -60,7 +60,7 @@ sub set_counters { key_values => [ { name => 'requests' } ], output_template => 'requests: %s', perfdatas => [ - { label => 'requests', template => '%s', min => 0, label_extra_instance => 1 }, + { template => '%s', min => 0, label_extra_instance => 1 }, ], } }, @@ -68,7 +68,7 @@ sub set_counters { key_values => [ { name => 'pages' } ], output_template => 'pages: %d', perfdatas => [ - { label => 'pages', template => '%d', min => 0, label_extra_instance => 1 }, + { template => '%d', min => 0, label_extra_instance => 1 }, ], } } @@ -136,16 +136,15 @@ sub manage_selection { $self->{watchers} = {}; foreach my $watcher (@{$results->{data}}) { - next if (defined($self->{option_results}->{filter_watcher_name}) && $self->{option_results}->{filter_watcher_name} ne '' - && $watcher->{'watcher_id:group'} !~ /$self->{option_results}->{filter_watcher_name}/); my $instance = $watcher->{'watcher_id:group'}; - $self->{watchers}->{$instance} = { display => $instance, - errors_prct => $watcher->{'%errors:avg|hits'}, - sessions => $watcher->{'session:sum|hits'}, - requests => $watcher->{'item:count|requests'}, - pages => $watcher->{'item:count|pages'} }; + $self->{watchers}->{$instance} = { + errors_prct => $watcher->{'%errors:avg|hits'}, + sessions => $watcher->{'session:sum|hits'}, + requests => $watcher->{'item:count|requests'}, + pages => $watcher->{'item:count|pages'} + }; }; if (scalar(keys %{$self->{watchers}}) <= 0) {