From d9659fcb32bcf88cea39b306c2e93fac97717943 Mon Sep 17 00:00:00 2001 From: Colin Gagnaire Date: Tue, 30 Oct 2018 16:57:34 +0100 Subject: [PATCH] fix prometheus targetstatus (#1207) --- centreon-plugins/cloud/prometheus/restapi/mode/targetstatus.pm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/centreon-plugins/cloud/prometheus/restapi/mode/targetstatus.pm b/centreon-plugins/cloud/prometheus/restapi/mode/targetstatus.pm index 658090b8b..6f10556a4 100644 --- a/centreon-plugins/cloud/prometheus/restapi/mode/targetstatus.pm +++ b/centreon-plugins/cloud/prometheus/restapi/mode/targetstatus.pm @@ -212,7 +212,7 @@ sub manage_selection { last_error => $active->{lastError}, }; - foreach my $label (keys $active->{labels}) { + foreach my $label (keys %{$active->{labels}}) { $self->{targets}->{$active->{scrapeUrl}}->{labels} .= "[" . $label . " = " . $active->{labels}->{$label} . "]"; } $self->{global}->{$active->{health}}++;