From 8745b453a0222411a57d5da351daa90cd5df4b52 Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Tue, 10 Sep 2019 09:50:47 +0200 Subject: [PATCH] fix elasticsearch nodestatistics filter-name Fixes #1631 --- .../database/elasticsearch/restapi/mode/nodestatistics.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/centreon-plugins/database/elasticsearch/restapi/mode/nodestatistics.pm b/centreon-plugins/database/elasticsearch/restapi/mode/nodestatistics.pm index 14dc382c3..ee0b9deed 100644 --- a/centreon-plugins/database/elasticsearch/restapi/mode/nodestatistics.pm +++ b/centreon-plugins/database/elasticsearch/restapi/mode/nodestatistics.pm @@ -115,8 +115,8 @@ sub manage_selection { foreach my $node (keys %{$nodes_stats->{nodes}}) { if (defined($self->{option_results}->{filter_name}) && $self->{option_results}->{filter_name} ne '' && - $node !~ /$self->{option_results}->{filter_name}/) { - $self->{output}->output_add(long_msg => "skipping '" . $node . "': no matching filter.", debug => 1); + $nodes_stats->{nodes}->{$node}->{name} !~ /$self->{option_results}->{filter_name}/) { + $self->{output}->output_add(long_msg => "skipping '" . $nodes_stats->{nodes}->{$node}->{name} . "': no matching filter.", debug => 1); next; }