From f0c34b49c7801404d32fab36dfbe10b3661d88fb Mon Sep 17 00:00:00 2001 From: Stefan Prodan Date: Fri, 18 Aug 2023 20:06:43 +0300 Subject: [PATCH] Use Gauge metric for resource_status Signed-off-by: Stefan Prodan --- .../controllers/kube-prometheus-stack/release.yaml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/monitoring/controllers/kube-prometheus-stack/release.yaml b/monitoring/controllers/kube-prometheus-stack/release.yaml index 604458f..1a90fe9 100644 --- a/monitoring/controllers/kube-prometheus-stack/release.yaml +++ b/monitoring/controllers/kube-prometheus-stack/release.yaml @@ -72,16 +72,18 @@ spec: kind: Kustomization metricNamePrefix: gotk metrics: - - name: "resource_info" + - name: "resource_status" help: "The current state of a GitOps Toolkit resource." each: - type: Info - info: + type: Gauge + gauge: + path: [status, conditions] labelsFromPath: - name: [ metadata, name ] + type: ["type"] + valueFrom: ["status"] labelsFromPath: exported_namespace: [ metadata, namespace ] - ready: [ status, conditions, "[type=Ready]", status ] + #ready: [ status, conditions, "[type=Ready]", status ] suspended: [ spec, suspend ] revision: [ status, lastAppliedRevision ] source_name: [ spec, sourceRef, name ]