Incorporate name and metric changes in Grafana cfg

Signed-off-by: Hidde Beydals <hello@hidde.co>

Signed-off-by: Hidde Beydals <hello@hidde.co>
pull/393/head
Hidde Beydals 4 years ago
parent e2752e4508
commit 345707e6cc

@ -74,9 +74,9 @@ gotk_reconcile_condition{kind, name, namespace, type="Ready", status="Deleted"}
Time spent reconciling: Time spent reconciling:
``` ```
gotk_reconcile_duration_bucket{kind, name, namespace, le} gotk_reconcile_duration_seconds_bucket{kind, name, namespace, le}
gotk_reconcile_duration_sum{kind, name, namespace} gotk_reconcile_duration_seconds_sum{kind, name, namespace}
gotk_reconcile_duration_count{kind, name, namespace} gotk_reconcile_duration_seconds_count{kind, name, namespace}
``` ```
Alert manager example: Alert manager example:

@ -300,7 +300,7 @@
"pluginVersion": "7.2.1", "pluginVersion": "7.2.1",
"targets": [ "targets": [
{ {
"expr": " sum(rate(gotk_reconcile_duration_sum{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_count{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)", "expr": " sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind)",
"interval": "", "interval": "",
"legendFormat": "{{kind}}", "legendFormat": "{{kind}}",
"refId": "A" "refId": "A"
@ -361,7 +361,7 @@
"pluginVersion": "7.2.1", "pluginVersion": "7.2.1",
"targets": [ "targets": [
{ {
"expr": " sum(rate(gotk_reconcile_duration_sum{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_count{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)", "expr": " sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind)",
"interval": "", "interval": "",
"legendFormat": "{{kind}}", "legendFormat": "{{kind}}",
"refId": "A" "refId": "A"
@ -677,7 +677,7 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": " sum(rate(gotk_reconcile_duration_sum{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_count{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)", "expr": " sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"Kustomization|HelmRelease\"}[5m])) by (kind, name)",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "{{kind}}/{{name}}", "legendFormat": "{{kind}}/{{name}}",
@ -778,7 +778,7 @@
"steppedLine": false, "steppedLine": false,
"targets": [ "targets": [
{ {
"expr": " sum(rate(gotk_reconcile_duration_sum{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_count{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)", "expr": " sum(rate(gotk_reconcile_duration_seconds_sum{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)\n/\n sum(rate(gotk_reconcile_duration_seconds_count{namespace=~\"$namespace\",kind=~\"GitRepository|HelmRepository|Bucket\"}[5m])) by (kind, name)",
"hide": false, "hide": false,
"interval": "", "interval": "",
"legendFormat": "{{kind}}/{{name}}", "legendFormat": "{{kind}}/{{name}}",
@ -899,7 +899,7 @@
] ]
}, },
"timezone": "", "timezone": "",
"title": "GitOps Toolkit Cluster Stats", "title": "Flux Cluster Stats",
"uid": "gitops-toolkit-cluster", "uid": "flux-cluster",
"version": 1 "version": 1
} }

Loading…
Cancel
Save