206 lines
8.9 KiB
YAML
206 lines
8.9 KiB
YAML
apiVersion: grafana.integreatly.org/v1beta1
|
|
kind: GrafanaDashboard
|
|
metadata:
|
|
name: forgejo
|
|
spec:
|
|
instanceSelector:
|
|
matchLabels:
|
|
dashboards: "grafana"
|
|
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}}"}]
|
|
},
|
|
{
|
|
"collapsed": false,
|
|
"gridPos": {"h": 1, "w": 24, "x": 0, "y": 15},
|
|
"title": "Forgejo Logs",
|
|
"type": "row"
|
|
},
|
|
{
|
|
"datasource": {"type": "victoriametrics-logs-datasource"},
|
|
"gridPos": {"h": 10, "w": 12, "x": 0, "y": 16},
|
|
"title": "Forgejo Server Logs",
|
|
"type": "logs",
|
|
"targets": [{"expr": "{cluster_environment=~\"$cluster_environment\", kubernetes.namespace=\"gitea\"}", "refId": "A"}],
|
|
"options": {"showTime": true, "showLabels": true, "wrapLogMessage": true, "enableLogDetails": true, "sortOrder": "Descending"}
|
|
},
|
|
{
|
|
"datasource": {"type": "victoriametrics-logs-datasource"},
|
|
"gridPos": {"h": 10, "w": 12, "x": 12, "y": 16},
|
|
"title": "Forgejo Errors",
|
|
"type": "logs",
|
|
"targets": [{"expr": "{cluster_environment=~\"$cluster_environment\", kubernetes.namespace=\"gitea\"} error OR Error OR ERROR OR panic", "refId": "A"}],
|
|
"options": {"showTime": true, "showLabels": true, "wrapLogMessage": true, "enableLogDetails": true, "sortOrder": "Descending"}
|
|
}
|
|
],
|
|
"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"
|
|
}
|