feat(observability): ✨ custom ArgoCD dashboard with cluster_environment filter
This commit is contained in:
parent
949529eb5c
commit
91db8038e6
3 changed files with 132 additions and 5 deletions
|
|
@ -11,4 +11,4 @@ spec:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: garm
|
app.kubernetes.io/name: garm
|
||||||
endpoints:
|
endpoints:
|
||||||
- port: metrics
|
- port: http
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,133 @@ spec:
|
||||||
instanceSelector:
|
instanceSelector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
dashboards: "grafana"
|
dashboards: "grafana"
|
||||||
grafanaCom:
|
json: |
|
||||||
id: 19993
|
{
|
||||||
revision: 2
|
"annotations": {"list": []},
|
||||||
|
"editable": true,
|
||||||
|
"graphTooltip": 1,
|
||||||
|
"panels": [
|
||||||
|
{
|
||||||
|
"collapsed": false,
|
||||||
|
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 0},
|
||||||
|
"title": "Application Status",
|
||||||
|
"type": "row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}]}}},
|
||||||
|
"gridPos": {"h": 4, "w": 4, "x": 0, "y": 1},
|
||||||
|
"title": "Total Apps",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{"expr": "count(argocd_app_info{cluster_environment=~\"$cluster_environment\"})", "legendFormat": ""}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}]}}},
|
||||||
|
"gridPos": {"h": 4, "w": 4, "x": 4, "y": 1},
|
||||||
|
"title": "Healthy",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{"expr": "count(argocd_app_info{cluster_environment=~\"$cluster_environment\", health_status=\"Healthy\"})", "legendFormat": ""}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}]}}},
|
||||||
|
"gridPos": {"h": 4, "w": 4, "x": 8, "y": 1},
|
||||||
|
"title": "Degraded",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{"expr": "count(argocd_app_info{cluster_environment=~\"$cluster_environment\", health_status=\"Degraded\"}) or vector(0)", "legendFormat": ""}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "green", "value": null}]}}},
|
||||||
|
"gridPos": {"h": 4, "w": 4, "x": 12, "y": 1},
|
||||||
|
"title": "Synced",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{"expr": "count(argocd_app_info{cluster_environment=~\"$cluster_environment\", sync_status=\"Synced\"})", "legendFormat": ""}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "yellow", "value": null}]}}},
|
||||||
|
"gridPos": {"h": 4, "w": 4, "x": 16, "y": 1},
|
||||||
|
"title": "OutOfSync",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{"expr": "count(argocd_app_info{cluster_environment=~\"$cluster_environment\", sync_status=\"OutOfSync\"}) or vector(0)", "legendFormat": ""}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "short", "thresholds": {"mode": "absolute", "steps": [{"color": "orange", "value": null}]}}},
|
||||||
|
"gridPos": {"h": 4, "w": 4, "x": 20, "y": 1},
|
||||||
|
"title": "Progressing",
|
||||||
|
"type": "stat",
|
||||||
|
"targets": [{"expr": "count(argocd_app_info{cluster_environment=~\"$cluster_environment\", health_status=\"Progressing\"}) or vector(0)", "legendFormat": ""}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collapsed": false,
|
||||||
|
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 5},
|
||||||
|
"title": "Application Details",
|
||||||
|
"type": "row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {
|
||||||
|
"defaults": {"custom": {"filterable": true}},
|
||||||
|
"overrides": [
|
||||||
|
{"matcher": {"id": "byName", "options": "Health"}, "properties": [{"id": "custom.cellOptions", "value": {"type": "color-text"}}, {"id": "mappings", "value": [{"options": {"Healthy": {"color": "green", "text": "Healthy"}, "Degraded": {"color": "red", "text": "Degraded"}, "Progressing": {"color": "yellow", "text": "Progressing"}, "Missing": {"color": "purple", "text": "Missing"}}, "type": "value"}]}]},
|
||||||
|
{"matcher": {"id": "byName", "options": "Sync"}, "properties": [{"id": "custom.cellOptions", "value": {"type": "color-text"}}, {"id": "mappings", "value": [{"options": {"Synced": {"color": "green", "text": "Synced"}, "OutOfSync": {"color": "orange", "text": "OutOfSync"}}, "type": "value"}]}]}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"gridPos": {"h": 12, "w": 24, "x": 0, "y": 6},
|
||||||
|
"title": "All Applications",
|
||||||
|
"type": "table",
|
||||||
|
"targets": [{"expr": "argocd_app_info{cluster_environment=~\"$cluster_environment\"}", "format": "table", "instant": true, "legendFormat": ""}],
|
||||||
|
"transformations": [
|
||||||
|
{"id": "filterFieldsByName", "options": {"include": {"names": ["cluster_environment", "name", "dest_namespace", "health_status", "sync_status", "repo"]}}},
|
||||||
|
{"id": "organize", "options": {"renameByName": {"cluster_environment": "Environment", "name": "Application", "dest_namespace": "Namespace", "health_status": "Health", "sync_status": "Sync", "repo": "Repository"}}}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"collapsed": false,
|
||||||
|
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 18},
|
||||||
|
"title": "Sync Activity",
|
||||||
|
"type": "row"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "ops"}},
|
||||||
|
"gridPos": {"h": 8, "w": 12, "x": 0, "y": 19},
|
||||||
|
"title": "Sync Operations (rate)",
|
||||||
|
"type": "timeseries",
|
||||||
|
"targets": [{"expr": "sum(rate(argocd_app_sync_total{cluster_environment=~\"$cluster_environment\"}[5m])) by (name, phase)", "legendFormat": "{{name}} ({{phase}})"}]
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"fieldConfig": {"defaults": {"unit": "ops"}},
|
||||||
|
"gridPos": {"h": 8, "w": 12, "x": 12, "y": 19},
|
||||||
|
"title": "Reconciliation Rate",
|
||||||
|
"type": "timeseries",
|
||||||
|
"targets": [{"expr": "sum(rate(argocd_app_reconcile_count{cluster_environment=~\"$cluster_environment\"}[5m])) by (namespace)", "legendFormat": "{{namespace}}"}]
|
||||||
|
}
|
||||||
|
],
|
||||||
|
"schemaVersion": 39,
|
||||||
|
"tags": ["edp", "argocd", "gitops"],
|
||||||
|
"templating": {
|
||||||
|
"list": [
|
||||||
|
{
|
||||||
|
"current": {"selected": true, "text": "All", "value": "$__all"},
|
||||||
|
"datasource": {"type": "prometheus"},
|
||||||
|
"definition": "label_values(argocd_app_info, cluster_environment)",
|
||||||
|
"includeAll": true,
|
||||||
|
"multi": true,
|
||||||
|
"name": "cluster_environment",
|
||||||
|
"label": "Environment",
|
||||||
|
"query": "label_values(argocd_app_info, cluster_environment)",
|
||||||
|
"refresh": 2,
|
||||||
|
"sort": 1,
|
||||||
|
"type": "query"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"time": {"from": "now-6h", "to": "now"},
|
||||||
|
"title": "ArgoCD Operations",
|
||||||
|
"uid": "edp-argocd-ops"
|
||||||
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,4 +10,4 @@ spec:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app.kubernetes.io/name: garm
|
app.kubernetes.io/name: garm
|
||||||
endpoints:
|
endpoints:
|
||||||
- port: metrics
|
- port: http
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue