From cfdb9c126fb0be6a20bd9f56f273dc5315a4c6c8 Mon Sep 17 00:00:00 2001 From: matias-portainer <104775949+matias-portainer@users.noreply.github.com> Date: Wed, 25 Jan 2023 10:29:11 -0300 Subject: [PATCH] fix(endpoints): check environment type before start metrics detection EE-4944 (#8391) --- api/http/handler/endpoints/endpoint_inspect.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/api/http/handler/endpoints/endpoint_inspect.go b/api/http/handler/endpoints/endpoint_inspect.go index 00a4b4e90..ecd6057cb 100644 --- a/api/http/handler/endpoints/endpoint_inspect.go +++ b/api/http/handler/endpoints/endpoint_inspect.go @@ -53,7 +53,7 @@ func (handler *Handler) endpointInspect(w http.ResponseWriter, r *http.Request) } isServerMetricsDetected := endpoint.Kubernetes.Flags.IsServerMetricsDetected - if !isServerMetricsDetected && handler.K8sClientFactory != nil { + if endpointutils.IsKubernetesEndpoint(endpoint) && !isServerMetricsDetected && handler.K8sClientFactory != nil { endpointutils.InitialMetricsDetection( endpoint, handler.DataStore.Endpoint(),