Skip to content

Commit

Permalink
Use Gauge metric for resource_status
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Prodan <stefan.prodan@gmail.com>
  • Loading branch information
stefanprodan committed Aug 18, 2023
1 parent 0c0352a commit f0c34b4
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions monitoring/controllers/kube-prometheus-stack/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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 ]
Expand Down

0 comments on commit f0c34b4

Please sign in to comment.