From 3a0637ae2f39e67de882ad3e62426768ccb152ae Mon Sep 17 00:00:00 2001 From: Antonio Escalera Date: Tue, 12 Jul 2022 17:26:58 -0400 Subject: [PATCH] fix(internal/circonus): Init/Container status MetricFilters are modified for k8s v1.20+ Fix MetricFilters for v1.20+ to not have ^(kube)? issue #CIRC-8497 Fix default metric filters for k8s v1.20+ to search for the correct metric names. * Tags: v1.20+ init container metricfilter --- internal/circonus/metric_filters.go | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/internal/circonus/metric_filters.go b/internal/circonus/metric_filters.go index 9b337dd2..7a6d8f3b 100644 --- a/internal/circonus/metric_filters.go +++ b/internal/circonus/metric_filters.go @@ -33,7 +33,7 @@ const ( ["allow", "^(kube_)?pod_container_status_(running|terminated|waiting|ready)(_count)?$", "containers"], ["allow", "^pod_container_status$", "containers"], ["allow", "^(kube_)?pod_container_status_(terminated|waiting)_reason(_count)?$", "containers health"], - ["allow", "^(kube_)?pod_init_container_status_(terminated|waiting)_reason(_count)?$", "containers health"], + ["allow", "^(kube_)?pod_init_container_status_(terminated|waiting)_reason(_count)?$", "init containers health"], ["allow", "^kube_deployment_(created|spec_replicas)$", "deployments"], ["allow", "^kube_deployment_status_(replicas|replicas_updated|replicas_available|replicas_unavailable)$", "deployments"], ["allow", "^kube_job_status_failed$", "health"], @@ -78,8 +78,8 @@ const ( ["allow", "^(pod|node)_cpu_usage_seconds_total$", "utilization"], ["allow", "^(pod|node)_memory_working_set_bytes$", utilization"], ["allow", "^(kube_)?pod_container_status_(running|terminated|waiting|ready)(_count)?$", "containers"], - ["allow", "^(kube_)?pod_container_status_(terminated|waiting)_reason(_count)?$", "containers health"], - ["allow", "^(kube_)?pod_init_container_status_(terminated|waiting)_reason(_count)?$", "init containers health"], + ["allow", "^pod_container_status_(terminated|waiting)_reason(_count)?$", "containers health"], + ["allow", "^pod_init_container_status_(terminated|waiting)_reason(_count)?$", "init containers health"], ["allow", "^kube_deployment_(created|spec_replicas)$", "deployments"], ["allow", "^kube_deployment_status_(replicas|replicas_updated|replicas_available|replicas_unavailable)$", "deployments"], ["allow", "^kube_job_status_failed$", "health"],