feat(observability): ✨ add cluster_environment dropdown to Forgejo and platform-overview dashboards
- Replace grafanaCom import (17802) with custom inline Forgejo dashboard containing cluster_environment query variable (refresh=2, label=Environment) - Add label, refresh=2, sort=1 to platform-overview cluster_environment variable - ArgoCD (19993) and CronJob (14279) remain grafanaCom imports (acceptable)
This commit is contained in:
parent
c2528f6f69
commit
949529eb5c
2 changed files with 179 additions and 3 deletions
|
|
@ -6,6 +6,179 @@ spec:
|
|||
instanceSelector:
|
||||
matchLabels:
|
||||
dashboards: "grafana"
|
||||
grafanaCom:
|
||||
id: 17802
|
||||
revision: 1
|
||||
json: |
|
||||
{
|
||||
"annotations": {"list": []},
|
||||
"editable": true,
|
||||
"graphTooltip": 1,
|
||||
"panels": [
|
||||
{
|
||||
"collapsed": false,
|
||||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 0},
|
||||
"title": "Forgejo Health",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"mappings": [{"options": {"0": {"text": "DOWN", "color": "red"}, "1": {"text": "UP", "color": "green"}}, "type": "value"}], "thresholds": {"mode": "absolute", "steps": [{"color": "red", "value": null}, {"color": "green", "value": 1}]}}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 0, "y": 1},
|
||||
"title": "Status",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "up{job=\"forgejo-server-http\", cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 4, "y": 1},
|
||||
"title": "Version",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_build_info{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{version}}"}],
|
||||
"options": {"reduceOptions": {"calcs": ["lastNotNull"]}, "textMode": "name"}
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 8, "y": 1},
|
||||
"title": "Repositories",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_repositories{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 12, "y": 1},
|
||||
"title": "Users",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_users{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 16, "y": 1},
|
||||
"title": "Organizations",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_organizations{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 20, "y": 1},
|
||||
"title": "Teams",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_teams{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 5},
|
||||
"title": "Activity",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 0, "y": 6},
|
||||
"title": "Open Issues",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_issues_open{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 6, "y": 6},
|
||||
"title": "Closed Issues",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_issues_closed{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 12, "y": 6},
|
||||
"title": "Webhooks",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_webhooks{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 6, "x": 18, "y": 6},
|
||||
"title": "Hook Tasks",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_hooktasks{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"collapsed": false,
|
||||
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 10},
|
||||
"title": "Content & Auth",
|
||||
"type": "row"
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 0, "y": 11},
|
||||
"title": "Stars",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_stars{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 4, "y": 11},
|
||||
"title": "Watches",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_watches{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 8, "y": 11},
|
||||
"title": "Releases",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_releases{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 12, "y": 11},
|
||||
"title": "Mirrors",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_mirrors{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 16, "y": 11},
|
||||
"title": "Public Keys",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_publickeys{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
},
|
||||
{
|
||||
"datasource": {"type": "prometheus"},
|
||||
"fieldConfig": {"defaults": {"unit": "short"}},
|
||||
"gridPos": {"h": 4, "w": 4, "x": 20, "y": 11},
|
||||
"title": "OAuth Apps",
|
||||
"type": "stat",
|
||||
"targets": [{"expr": "gitea_oauths{cluster_environment=~\"$cluster_environment\"}", "legendFormat": "{{cluster_environment}}"}]
|
||||
}
|
||||
],
|
||||
"schemaVersion": 39,
|
||||
"tags": ["edp", "forgejo", "gitea"],
|
||||
"templating": {
|
||||
"list": [
|
||||
{
|
||||
"current": {"selected": true, "text": "All", "value": "$__all"},
|
||||
"datasource": {"type": "prometheus"},
|
||||
"definition": "label_values(gitea_repositories, cluster_environment)",
|
||||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "cluster_environment",
|
||||
"label": "Environment",
|
||||
"query": "label_values(gitea_repositories, cluster_environment)",
|
||||
"refresh": 2,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
},
|
||||
"time": {"from": "now-6h", "to": "now"},
|
||||
"title": "Forgejo",
|
||||
"uid": "edp-forgejo"
|
||||
}
|
||||
|
|
|
|||
|
|
@ -216,7 +216,10 @@ spec:
|
|||
"includeAll": true,
|
||||
"multi": true,
|
||||
"name": "cluster_environment",
|
||||
"label": "Environment",
|
||||
"query": "label_values(up, cluster_environment)",
|
||||
"refresh": 2,
|
||||
"sort": 1,
|
||||
"type": "query"
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue