From c83c4c6a7afe83614c1897dfe9c3a3b05dd62e3f Mon Sep 17 00:00:00 2001 From: brettj-newrelic <142850040+brettj-newrelic@users.noreply.github.com> Date: Tue, 12 Mar 2024 02:38:29 -0700 Subject: [PATCH] feat: Golden metrics for OS k8s statefulset (#1484) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Golden metrics for OS k8s statefulset * fix: Update otel podsMissing golden metric as it cannot be handled as written --------- Co-authored-by: Javi Imbernón --- .../golden_metrics.yml | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/entity-types/infra-kubernetes_statefulset/golden_metrics.yml b/entity-types/infra-kubernetes_statefulset/golden_metrics.yml index 0b6467ab5..96c77be80 100644 --- a/entity-types/infra-kubernetes_statefulset/golden_metrics.yml +++ b/entity-types/infra-kubernetes_statefulset/golden_metrics.yml @@ -7,6 +7,12 @@ podsDesired: from: K8sStatefulsetSample eventId: entityGuid eventName: entityName + opentelemetry: + select: latest(kube_statefulset_replicas) + where: metricName = 'kube_statefulset_replicas' + from: Metric + eventId: entity.guid + eventName: entity.name podsReady: title: Pods ready over time unit: COUNT @@ -16,6 +22,12 @@ podsReady: from: K8sStatefulsetSample eventId: entityGuid eventName: entityName + opentelemetry: + select: latest(kube_statefulset_status_replicas_ready) + where: metricName = 'kube_statefulset_status_replicas_ready' + from: Metric + eventId: entity.guid + eventName: entity.name podsMissing: title: Pods missing over time unit: COUNT @@ -25,4 +37,8 @@ podsMissing: from: K8sStatefulsetSample eventId: entityGuid eventName: entityName - + opentelemetry: + select: latest(kube_statefulset_replicas - kube_statefulset_status_replicas_ready) + from: Metric + eventId: entity.guid + eventName: entity.name