From bc5c36dba6238dc74b1aef7b49167b1b92af1a75 Mon Sep 17 00:00:00 2001 From: iris Date: Wed, 4 Nov 2026 22:19:28 +0100 Subject: [PATCH] swarm-grafana: the forge and CI runs boards become one forge board with content, runtime and CI runs tabs --- docs/swarm/ci-metrics.md | 2 +- docs/swarm/services.md | 2 +- nix/host-modules/swarm-grafana.nix | 1 - .../swarm-grafana/dashboards/ci.json | 410 -- .../swarm-grafana/dashboards/forge.json | 3387 ++++++++++++----- 5 files changed, 2443 insertions(+), 1359 deletions(-) delete mode 100644 nix/host-modules/swarm-grafana/dashboards/ci.json diff --git a/docs/swarm/ci-metrics.md b/docs/swarm/ci-metrics.md index f282a926..3a13abf5 100644 --- a/docs/swarm/ci-metrics.md +++ b/docs/swarm/ci-metrics.md @@ -93,7 +93,7 @@ timer runs it again 5 minutes later. ## The board -`nix/host-modules/swarm-grafana/dashboards/ci.json`, with a repo and a workflow +The **CI runs** tab of the `forge` board (`nix/host-modules/swarm-grafana/dashboards/forge.json`), with a repo and a workflow variable: - mean and 90th percentile run time of successful runs, over time; diff --git a/docs/swarm/services.md b/docs/swarm/services.md index a05f8c6a..1ef6fa80 100644 --- a/docs/swarm/services.md +++ b/docs/swarm/services.md @@ -208,7 +208,7 @@ kept. - `builds`: the container builds hive-c0re ran on every hive, in two tabs. **builds** has the count, the failures and the longest, builds over time by outcome, and a table of each build with its id, agent, kind, outcome and runtime. **output** shows every line of the build picked in the **Build** filter, with its start and finish lines. It reads the lines hive-c0re logs for each build, so a hive-c0re that doesn't log them leaves it empty. Filter by agent. - `controller`: the swarm controller's job graph by state, and the push and commit rates it sees on the forge. - `review-classifier`: review requests by outcome, the verdict mix, results per check, retried asks, and run duration p50 and p95. -- `forge`: what the forge holds, and the forge process's CPU, memory and descriptors. +- `forge`: the forge, in three tabs. **content** has what the forge holds (repositories, users, issues, releases, discussion volume and the issues by label). **runtime** has the forge process's CPU, memory, goroutines and descriptors. **CI runs** has Actions run time and queue wait per repo and workflow, with a per-PR table; the Repo and Workflow filters apply to that tab. - `gateway`: the gateway nginx on each hive's host: requests per second, connections by state, and accepted against handled connections. - `collector`: what the hive and swarm OTEL collectors accept, refuse, export and queue, with queue depth against capacity. - `logstore`, `metricstore`: health of the log store and the metrics store. diff --git a/nix/host-modules/swarm-grafana.nix b/nix/host-modules/swarm-grafana.nix index daa9ebf8..ca17fd04 100644 --- a/nix/host-modules/swarm-grafana.nix +++ b/nix/host-modules/swarm-grafana.nix @@ -273,7 +273,6 @@ let "authelia.json" "bao.json" "builds.json" - "ci.json" "claude-usage.json" "collector.json" "controller.json" diff --git a/nix/host-modules/swarm-grafana/dashboards/ci.json b/nix/host-modules/swarm-grafana/dashboards/ci.json deleted file mode 100644 index 98d121a2..00000000 --- a/nix/host-modules/swarm-grafana/dashboards/ci.json +++ /dev/null @@ -1,410 +0,0 @@ -{ - "uid": "hyperhive-swarm-ci", - "title": "hyperhive · CI runs", - "description": "Forge Actions run time and queue wait, one sample per finished run, per repo and workflow.", - "tags": ["hyperhive", "ci"], - "timezone": "utc", - "schemaVersion": 39, - "version": 1, - "editable": true, - "refresh": "5m", - "time": { - "from": "now-30d", - "to": "now" - }, - "templating": { - "list": [ - { - "name": "repo", - "label": "Repo", - "type": "query", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "query": "label_values({__name__=\"hyperhive.ci.run.duration\"}, repo)", - "refresh": 2, - "includeAll": true, - "allValue": ".*", - "multi": true, - "current": { - "text": "All", - "value": "$__all" - }, - "sort": 1 - }, - { - "name": "workflow", - "label": "Workflow", - "type": "query", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "query": "label_values({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\"}, workflow)", - "refresh": 2, - "includeAll": true, - "allValue": ".*", - "multi": true, - "current": { - "text": "All", - "value": "$__all" - }, - "sort": 1 - } - ] - }, - "panels": [ - { - "id": 1, - "type": "timeseries", - "title": "Run duration, successful runs", - "description": "Mean and 90th percentile of stopped minus started, over the runs that ended in each interval.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "interval": "1h", - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 0 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "avg(last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__interval]))", - "legendFormat": "mean" - }, - { - "refId": "B", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "quantile(0.9, last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__interval]))", - "legendFormat": "p90" - } - ], - "fieldConfig": { - "defaults": { - "unit": "s", - "color": { - "mode": "palette-classic" - }, - "custom": { - "drawStyle": "line", - "lineWidth": 2, - "fillOpacity": 0, - "showPoints": "auto", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - } - }, - { - "id": 2, - "type": "timeseries", - "title": "Queue wait", - "description": "Started minus created: how long each run waited for a runner, mean and longest per interval.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "interval": "1h", - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 0 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "avg(last_over_time({__name__=\"hyperhive.ci.run.queue_wait\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__interval]))", - "legendFormat": "mean" - }, - { - "refId": "B", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "max(last_over_time({__name__=\"hyperhive.ci.run.queue_wait\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__interval]))", - "legendFormat": "longest" - } - ], - "fieldConfig": { - "defaults": { - "unit": "s", - "color": { - "mode": "palette-classic" - }, - "custom": { - "drawStyle": "line", - "lineWidth": 2, - "fillOpacity": 0, - "showPoints": "auto", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - } - }, - { - "id": 3, - "type": "timeseries", - "title": "Runs per day by outcome", - "description": "Finished runs per UTC day. Cancelled runs are not counted.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "interval": "1d", - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 9 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "count by (outcome) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__interval]))", - "legendFormat": "{{outcome}}" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { - "mode": "palette-classic" - }, - "custom": { - "drawStyle": "bars", - "lineWidth": 1, - "fillOpacity": 80, - "showPoints": "never", - "stacking": { - "mode": "normal", - "group": "A" - }, - "axisSoftMin": 0 - } - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "success" - }, - "properties": [ - { - "id": "color", - "value": { - "mode": "fixed", - "fixedColor": "green" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "failure" - }, - "properties": [ - { - "id": "color", - "value": { - "mode": "fixed", - "fixedColor": "red" - } - } - ] - } - ] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": ["sum"] - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - } - }, - { - "id": 4, - "type": "table", - "title": "Duration per PR", - "description": "Per PR (or ref, for runs not on a PR) over the time range: run time of its successful runs.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 9 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "avg by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__range]))", - "format": "table", - "instant": true - }, - { - "refId": "B", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "max by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__range]))", - "format": "table", - "instant": true - }, - { - "refId": "C", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "count by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__range]))", - "format": "table", - "instant": true - }, - { - "refId": "D", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "count by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"failure\"}[$__range]))", - "format": "table", - "instant": true - } - ], - "transformations": [ - { - "id": "merge", - "options": {} - }, - { - "id": "organize", - "options": { - "excludeByName": { - "Time": true - }, - "renameByName": { - "pr": "PR", - "Value #A": "Mean (success)", - "Value #B": "Longest (success)", - "Value #C": "Runs", - "Value #D": "Failed runs" - } - } - }, - { - "id": "sortBy", - "options": { - "sort": [ - { - "field": "PR", - "desc": true - } - ] - } - } - ], - "fieldConfig": { - "defaults": { - "custom": { - "align": "auto" - } - }, - "overrides": [ - { - "matcher": { - "id": "byRegexp", - "options": "^(Mean|Longest).*" - }, - "properties": [ - { - "id": "unit", - "value": "s" - } - ] - }, - { - "matcher": { - "id": "byRegexp", - "options": "^(Runs|Failed runs)$" - }, - "properties": [ - { - "id": "decimals", - "value": 0 - } - ] - } - ] - }, - "options": { - "showHeader": true, - "cellHeight": "sm" - } - } - ] -} diff --git a/nix/host-modules/swarm-grafana/dashboards/forge.json b/nix/host-modules/swarm-grafana/dashboards/forge.json index 40f90859..60ef1abd 100644 --- a/nix/host-modules/swarm-grafana/dashboards/forge.json +++ b/nix/host-modules/swarm-grafana/dashboards/forge.json @@ -1,971 +1,2466 @@ { - "title": "hyperhive · forge (content)", - "uid": "hyperhive-swarm-forge", - "description": "An inventory of what the forge holds.", - "editable": true, - "refresh": "5m", - "schemaVersion": 39, - "tags": ["hyperhive", "swarm", "forge", "content"], - "time": { "from": "now-7d", "to": "now" }, - "timezone": "utc", - "version": 1, - "templating": { "list": [] }, - "panels": [ - { - "id": 1, - "type": "stat", - "title": "Repositories", - "description": "Total repositories on the forge.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 4, "w": 4, "x": 0, "y": 0 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_repositories", - "instant": true, - "legendFormat": "repos" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "fixed", "fixedColor": "text" }, - "mappings": [] - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } - }, - { - "id": 2, - "type": "stat", - "title": "Users", - "description": "Total forge accounts.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 4, "w": 4, "x": 4, "y": 0 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_users", - "instant": true, - "legendFormat": "users" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "fixed", "fixedColor": "text" }, - "mappings": [] - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } - }, - { - "id": 3, - "type": "stat", - "title": "Organizations", - "description": "Total forge organizations.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 4, "w": 4, "x": 8, "y": 0 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_organizations", - "instant": true, - "legendFormat": "orgs" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "fixed", "fixedColor": "text" }, - "mappings": [] - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } - }, - { - "id": 4, - "type": "stat", - "title": "Issues open", - "description": "Currently open issues, across every repo.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 4, "w": 4, "x": 12, "y": 0 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_issues_open", - "instant": true, - "legendFormat": "open" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "fixed", "fixedColor": "text" }, - "mappings": [] - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } - }, - { - "id": 5, - "type": "stat", - "title": "Issues closed", - "description": "Cumulative closed issues, across every repo.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 4, "w": 4, "x": 16, "y": 0 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_issues_closed", - "instant": true, - "legendFormat": "closed" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "fixed", "fixedColor": "text" }, - "mappings": [] - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } - }, - { - "id": 6, - "type": "stat", - "title": "Releases", - "description": "Cumulative tagged releases, across every repo.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 4, "w": 4, "x": 20, "y": 0 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_releases", - "instant": true, - "legendFormat": "releases" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "fixed", "fixedColor": "text" }, - "mappings": [] - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } - }, - { - "id": 10, - "type": "timeseries", - "title": "Issues: open vs closed", - "description": "Open and closed issue counts, over time.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 8, "w": 12, "x": 0, "y": 4 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_issues_open", - "legendFormat": "open" - }, - { - "refId": "B", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_issues_closed", - "legendFormat": "closed" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "palette-classic" }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 10, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 + "apiVersion": "dashboard.grafana.app/v2beta1", + "kind": "Dashboard", + "metadata": { + "name": "hyperhive-forge" + }, + "spec": { + "title": "hyperhive · forge", + "description": "What the forge holds and how it runs, in tabs: content, the Forgejo process, and Actions (CI) runs. The Repo and Workflow filters apply to the CI runs tab.", + "editable": true, + "cursorSync": "Off", + "liveNow": false, + "preload": false, + "tags": ["hyperhive", "swarm", "forge", "ci"], + "links": [], + "annotations": [ + { + "kind": "AnnotationQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "grafana", + "version": "v0", + "datasource": { + "name": "-- Grafana --" + }, + "spec": {} + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "builtIn": true, + "legacyOptions": { + "type": "dashboard" } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { "mode": "multi", "sort": "desc" } - } - }, - { - "id": 11, - "type": "timeseries", - "title": "Repositories and users", - "description": "Repository and user counts, over time.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 8, "w": 12, "x": 12, "y": 4 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_repositories", - "legendFormat": "repos" - }, - { - "refId": "B", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_users", - "legendFormat": "users" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "palette-classic" }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 0, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { "mode": "multi", "sort": "desc" } - } - }, - { - "id": 20, - "type": "timeseries", - "title": "Discussion volume", - "description": "Comments and review comments, over time.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 7, "w": 12, "x": 0, "y": 12 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_comments", - "legendFormat": "comments" - }, - { - "refId": "B", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_attachments", - "legendFormat": "attachments" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "palette-classic" }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 10, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { "mode": "multi", "sort": "desc" } - } - }, - { - "id": 21, - "type": "timeseries", - "title": "Automation surface", - "description": "Webhooks and their queued delivery tasks.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 7, "w": 12, "x": 12, "y": 12 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_webhooks", - "legendFormat": "webhooks" - }, - { - "refId": "B", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "gitea_hooktasks", - "legendFormat": "hooktasks" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { "mode": "palette-classic" }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 0, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { "mode": "multi", "sort": "desc" } - } - }, - { - "id": 30, - "type": "bargauge", - "title": "Issues by label — every issue ever, ranked", - "description": "Every issue, grouped by label.", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "gridPos": { "h": 16, "w": 24, "x": 0, "y": 19 }, - "targets": [ - { - "refId": "A", - "datasource": { "type": "prometheus", "uid": "@datasourceUid@" }, - "expr": "sort_desc(gitea_issues_by_label)", - "legendFormat": "{{label}}", - "instant": true - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "min": 0, - "color": { "mode": "fixed", "fixedColor": "semi-dark-blue" }, - "noValue": "no series — check whether the forgejo process restarted since [metrics] last changed; an absent series never says why it is absent" - }, - "overrides": [] - }, - "options": { - "orientation": "horizontal", - "displayMode": "basic", - "showUnfilled": true, - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false } } - }, - { - "id": 39, - "type": "row", - "title": "Forgejo runtime", - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 35 - }, - "panels": [] - }, - { - "id": 41, - "type": "stat", - "title": "Uptime", - "description": "Time since the forge process started.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 0, - "y": 36 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" + ], + "variables": [ + { + "kind": "QueryVariable", + "spec": { + "name": "repo", + "current": { + "text": "All", + "value": "$__all" }, - "expr": "time() - process_start_time_seconds{\"service.name\"=\"forgejo\"}", - "instant": true, - "legendFormat": "uptime" + "label": "Repo", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "label_values({__name__=\"hyperhive.ci.run.duration\"}, repo)", + "refId": "StandardVariableQuery" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allValue": ".*", + "allowCustomValue": true } - ], - "fieldConfig": { - "defaults": { - "unit": "s", - "decimals": 0, - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": null - } - ] - } - }, - "overrides": [] }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false + { + "kind": "QueryVariable", + "spec": { + "name": "workflow", + "current": { + "text": "All", + "value": "$__all" + }, + "label": "Workflow", + "hide": "dontHide", + "refresh": "onTimeRangeChanged", + "skipUrlSync": false, + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "label_values({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\"}, workflow)", + "refId": "StandardVariableQuery" + } + }, + "regex": "", + "sort": "alphabeticalAsc", + "options": [], + "multi": true, + "includeAll": true, + "allValue": ".*", + "allowCustomValue": true } } - }, - { - "id": 42, - "type": "stat", - "title": "Memory (RSS)", - "description": "Resident memory of the forge process.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 6, - "y": 36 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "process_resident_memory_bytes{\"service.name\"=\"forgejo\"}", - "instant": true, - "legendFormat": "rss" - } + ], + "timeSettings": { + "timezone": "utc", + "from": "now-24h", + "to": "now", + "autoRefresh": "1m", + "autoRefreshIntervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" ], - "fieldConfig": { - "defaults": { - "unit": "bytes", - "decimals": 1, - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": null - } - ] - } - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } + "hideTimepicker": false, + "fiscalYearStartMonth": 0 }, - { - "id": 43, - "type": "stat", - "title": "Goroutines", - "description": "Goroutines running in the forge process.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 12, - "y": 36 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" + "elements": { + "panel-1": { + "kind": "Panel", + "spec": { + "id": 1, + "title": "Repositories", + "description": "Total repositories on the forge.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_repositories", + "instant": true, + "legendFormat": "repos" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } }, - "expr": "go_goroutines{\"service.name\"=\"forgejo\"}", - "instant": true, - "legendFormat": "goroutines" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "text", - "value": null - } - ] - } - }, - "overrides": [] - }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false - } - } - }, - { - "id": 44, - "type": "stat", - "title": "Open descriptors", - "description": "File descriptors held against the process limit.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 4, - "w": 6, - "x": 18, - "y": 36 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "process_open_fds{\"service.name\"=\"forgejo\"} / process_max_fds{\"service.name\"=\"forgejo\"}", - "instant": true, - "legendFormat": "used" - } - ], - "fieldConfig": { - "defaults": { - "unit": "percentunit", - "decimals": 1, - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } }, - { - "color": "orange", - "value": 0.7 - }, - { - "color": "red", - "value": 0.9 + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "fixed", + "fixedColor": "text" + }, + "mappings": [] + }, + "overrides": [] } - ] + } } - }, - "overrides": [] + } }, - "options": { - "graphMode": "none", - "colorMode": "value", - "textMode": "value", - "justifyMode": "auto", - "reduceOptions": { - "calcs": ["lastNotNull"], - "fields": "", - "values": false + "panel-2": { + "kind": "Panel", + "spec": { + "id": 2, + "title": "Users", + "description": "Total forge accounts.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_users", + "instant": true, + "legendFormat": "users" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "fixed", + "fixedColor": "text" + }, + "mappings": [] + }, + "overrides": [] + } + } + } + } + }, + "panel-3": { + "kind": "Panel", + "spec": { + "id": 3, + "title": "Organizations", + "description": "Total forge organizations.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_organizations", + "instant": true, + "legendFormat": "orgs" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "fixed", + "fixedColor": "text" + }, + "mappings": [] + }, + "overrides": [] + } + } + } + } + }, + "panel-4": { + "kind": "Panel", + "spec": { + "id": 4, + "title": "Issues open", + "description": "Currently open issues, across every repo.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_issues_open", + "instant": true, + "legendFormat": "open" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "fixed", + "fixedColor": "text" + }, + "mappings": [] + }, + "overrides": [] + } + } + } + } + }, + "panel-5": { + "kind": "Panel", + "spec": { + "id": 5, + "title": "Issues closed", + "description": "Cumulative closed issues, across every repo.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_issues_closed", + "instant": true, + "legendFormat": "closed" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "fixed", + "fixedColor": "text" + }, + "mappings": [] + }, + "overrides": [] + } + } + } + } + }, + "panel-6": { + "kind": "Panel", + "spec": { + "id": 6, + "title": "Releases", + "description": "Cumulative tagged releases, across every repo.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_releases", + "instant": true, + "legendFormat": "releases" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "fixed", + "fixedColor": "text" + }, + "mappings": [] + }, + "overrides": [] + } + } + } + } + }, + "panel-7": { + "kind": "Panel", + "spec": { + "id": 7, + "title": "Issues: open vs closed", + "description": "Open and closed issue counts, over time.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_issues_open", + "legendFormat": "open" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_issues_closed", + "legendFormat": "closed" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 10, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-8": { + "kind": "Panel", + "spec": { + "id": 8, + "title": "Repositories and users", + "description": "Repository and user counts, over time.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_repositories", + "legendFormat": "repos" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_users", + "legendFormat": "users" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 0, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-9": { + "kind": "Panel", + "spec": { + "id": 9, + "title": "Discussion volume", + "description": "Comments and review comments, over time.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_comments", + "legendFormat": "comments" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_attachments", + "legendFormat": "attachments" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 10, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-10": { + "kind": "Panel", + "spec": { + "id": 10, + "title": "Automation surface", + "description": "Webhooks and their queued delivery tasks.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_webhooks", + "legendFormat": "webhooks" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "gitea_hooktasks", + "legendFormat": "hooktasks" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 0, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-11": { + "kind": "Panel", + "spec": { + "id": 11, + "title": "Issues by label — every issue ever, ranked", + "description": "Every issue, grouped by label.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "sort_desc(gitea_issues_by_label)", + "legendFormat": "{{label}}", + "instant": true + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "bargauge", + "version": "", + "spec": { + "options": { + "orientation": "horizontal", + "displayMode": "basic", + "showUnfilled": true, + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "min": 0, + "color": { + "mode": "fixed", + "fixedColor": "semi-dark-blue" + }, + "noValue": "no series — check whether the forgejo process restarted since [metrics] last changed; an absent series never says why it is absent" + }, + "overrides": [] + } + } + } + } + }, + "panel-12": { + "kind": "Panel", + "spec": { + "id": 12, + "title": "Uptime", + "description": "Time since the forge process started.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "time() - process_start_time_seconds{\"service.name\"=\"forgejo\"}", + "instant": true, + "legendFormat": "uptime" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "s", + "decimals": 0, + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-13": { + "kind": "Panel", + "spec": { + "id": 13, + "title": "Memory (RSS)", + "description": "Resident memory of the forge process.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "process_resident_memory_bytes{\"service.name\"=\"forgejo\"}", + "instant": true, + "legendFormat": "rss" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "bytes", + "decimals": 1, + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-14": { + "kind": "Panel", + "spec": { + "id": 14, + "title": "Goroutines", + "description": "Goroutines running in the forge process.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "go_goroutines{\"service.name\"=\"forgejo\"}", + "instant": true, + "legendFormat": "goroutines" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "text", + "value": null + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-15": { + "kind": "Panel", + "spec": { + "id": 15, + "title": "Open descriptors", + "description": "File descriptors held against the process limit.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "process_open_fds{\"service.name\"=\"forgejo\"} / process_max_fds{\"service.name\"=\"forgejo\"}", + "instant": true, + "legendFormat": "used" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "stat", + "version": "", + "spec": { + "options": { + "graphMode": "none", + "colorMode": "value", + "textMode": "value", + "justifyMode": "auto", + "reduceOptions": { + "calcs": ["lastNotNull"], + "fields": "", + "values": false + } + }, + "fieldConfig": { + "defaults": { + "unit": "percentunit", + "decimals": 1, + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "orange", + "value": 0.7 + }, + { + "color": "red", + "value": 0.9 + } + ] + } + }, + "overrides": [] + } + } + } + } + }, + "panel-16": { + "kind": "Panel", + "spec": { + "id": 16, + "title": "CPU", + "description": "CPU seconds used per second.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "rate({__name__=~\"process_cpu_seconds(_total)?\", \"service.name\"=\"forgejo\"}[$__rate_interval])", + "legendFormat": "cpu" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 10, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-17": { + "kind": "Panel", + "spec": { + "id": 17, + "title": "Memory", + "description": "Resident memory and live Go heap.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "process_resident_memory_bytes{\"service.name\"=\"forgejo\"}", + "legendFormat": "rss" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "go_memstats_heap_alloc_bytes{\"service.name\"=\"forgejo\"}", + "legendFormat": "heap" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "bytes", + "decimals": 1, + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 10, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-18": { + "kind": "Panel", + "spec": { + "id": 18, + "title": "Goroutines and threads", + "description": "Goroutines and OS threads in the process.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "go_goroutines{\"service.name\"=\"forgejo\"}", + "legendFormat": "goroutines" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "go_threads{\"service.name\"=\"forgejo\"}", + "legendFormat": "threads" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 10, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-19": { + "kind": "Panel", + "spec": { + "id": 19, + "title": "Open descriptors", + "description": "File descriptors held, against the limit.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "process_open_fds{\"service.name\"=\"forgejo\"}", + "legendFormat": "open" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "process_max_fds{\"service.name\"=\"forgejo\"}", + "legendFormat": "limit" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 1, + "fillOpacity": 10, + "showPoints": "never", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-20": { + "kind": "Panel", + "spec": { + "id": 20, + "title": "Run duration, successful runs", + "description": "Mean and 90th percentile of stopped minus started, over the runs that ended in each interval.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "avg(last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__interval]))", + "legendFormat": "mean" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "quantile(0.9, last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__interval]))", + "legendFormat": "p90" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "interval": "1h" + } + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "s", + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 2, + "fillOpacity": 0, + "showPoints": "auto", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-21": { + "kind": "Panel", + "spec": { + "id": 21, + "title": "Queue wait", + "description": "Started minus created: how long each run waited for a runner, mean and longest per interval.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "avg(last_over_time({__name__=\"hyperhive.ci.run.queue_wait\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__interval]))", + "legendFormat": "mean" + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "max(last_over_time({__name__=\"hyperhive.ci.run.queue_wait\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__interval]))", + "legendFormat": "longest" + } + }, + "refId": "B", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "interval": "1h" + } + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": [] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "s", + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "line", + "lineWidth": 2, + "fillOpacity": 0, + "showPoints": "auto", + "spanNulls": false, + "axisSoftMin": 0 + } + }, + "overrides": [] + } + } + } + } + }, + "panel-22": { + "kind": "Panel", + "spec": { + "id": 22, + "title": "Runs per day by outcome", + "description": "Finished runs per UTC day. Cancelled runs are not counted.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "count by (outcome) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__interval]))", + "legendFormat": "{{outcome}}" + } + }, + "refId": "A", + "hidden": false + } + } + ], + "transformations": [], + "queryOptions": { + "interval": "1d" + } + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "timeseries", + "version": "", + "spec": { + "options": { + "legend": { + "displayMode": "list", + "placement": "bottom", + "showLegend": true, + "calcs": ["sum"] + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "color": { + "mode": "palette-classic" + }, + "custom": { + "drawStyle": "bars", + "lineWidth": 1, + "fillOpacity": 80, + "showPoints": "never", + "stacking": { + "mode": "normal", + "group": "A" + }, + "axisSoftMin": 0 + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "success" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed", + "fixedColor": "green" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "failure" + }, + "properties": [ + { + "id": "color", + "value": { + "mode": "fixed", + "fixedColor": "red" + } + } + ] + } + ] + } + } + } + } + }, + "panel-23": { + "kind": "Panel", + "spec": { + "id": 23, + "title": "Duration per PR", + "description": "Per PR (or ref, for runs not on a PR) over the time range: run time of its successful runs.", + "links": [], + "data": { + "kind": "QueryGroup", + "spec": { + "queries": [ + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "avg by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__range]))", + "format": "table", + "instant": true + } + }, + "refId": "A", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "max by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"success\"}[$__range]))", + "format": "table", + "instant": true + } + }, + "refId": "B", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "count by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\"}[$__range]))", + "format": "table", + "instant": true + } + }, + "refId": "C", + "hidden": false + } + }, + { + "kind": "PanelQuery", + "spec": { + "query": { + "kind": "DataQuery", + "group": "prometheus", + "version": "v0", + "datasource": { + "name": "@datasourceUid@" + }, + "spec": { + "expr": "count by (pr) (last_over_time({__name__=\"hyperhive.ci.run.duration\", repo=~\"$repo\", workflow=~\"$workflow\", outcome=\"failure\"}[$__range]))", + "format": "table", + "instant": true + } + }, + "refId": "D", + "hidden": false + } + } + ], + "transformations": [ + { + "kind": "merge", + "spec": { + "id": "merge", + "options": {} + } + }, + { + "kind": "organize", + "spec": { + "id": "organize", + "options": { + "excludeByName": { + "Time": true + }, + "renameByName": { + "pr": "PR", + "Value #A": "Mean (success)", + "Value #B": "Longest (success)", + "Value #C": "Runs", + "Value #D": "Failed runs" + } + } + } + }, + { + "kind": "sortBy", + "spec": { + "id": "sortBy", + "options": { + "sort": [ + { + "field": "PR", + "desc": true + } + ] + } + } + } + ], + "queryOptions": {} + } + }, + "vizConfig": { + "kind": "VizConfig", + "group": "table", + "version": "", + "spec": { + "options": { + "showHeader": true, + "cellHeight": "sm" + }, + "fieldConfig": { + "defaults": { + "custom": { + "align": "auto" + } + }, + "overrides": [ + { + "matcher": { + "id": "byRegexp", + "options": "^(Mean|Longest).*" + }, + "properties": [ + { + "id": "unit", + "value": "s" + } + ] + }, + { + "matcher": { + "id": "byRegexp", + "options": "^(Runs|Failed runs)$" + }, + "properties": [ + { + "id": "decimals", + "value": 0 + } + ] + } + ] + } + } + } } } }, - { - "id": 45, - "type": "timeseries", - "title": "CPU", - "description": "CPU seconds used per second.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 40 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" + "layout": { + "kind": "TabsLayout", + "spec": { + "tabs": [ + { + "kind": "TabsLayoutTab", + "spec": { + "title": "content", + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-1" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 4, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-2" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 8, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-3" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-4" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 16, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-5" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 20, + "y": 0, + "width": 4, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-6" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-7" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-8" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 12, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-9" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 12, + "width": 12, + "height": 7, + "element": { + "kind": "ElementReference", + "name": "panel-10" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 19, + "width": 24, + "height": 16, + "element": { + "kind": "ElementReference", + "name": "panel-11" + } + } + } + ] + } + } + } }, - "expr": "rate({__name__=~\"process_cpu_seconds(_total)?\", \"service.name\"=\"forgejo\"}[$__rate_interval])", - "legendFormat": "cpu" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "color": { - "mode": "palette-classic" + { + "kind": "TabsLayoutTab", + "spec": { + "title": "runtime", + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 6, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-12" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 6, + "y": 0, + "width": 6, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-13" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 6, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-14" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 18, + "y": 0, + "width": 6, + "height": 4, + "element": { + "kind": "ElementReference", + "name": "panel-15" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 4, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-16" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 4, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-17" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 12, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-18" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 12, + "width": 12, + "height": 8, + "element": { + "kind": "ElementReference", + "name": "panel-19" + } + } + } + ] + } + } + } }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 10, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 + { + "kind": "TabsLayoutTab", + "spec": { + "title": "CI runs", + "layout": { + "kind": "GridLayout", + "spec": { + "items": [ + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 0, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-20" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 0, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-21" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 0, + "y": 9, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-22" + } + } + }, + { + "kind": "GridLayoutItem", + "spec": { + "x": 12, + "y": 9, + "width": 12, + "height": 9, + "element": { + "kind": "ElementReference", + "name": "panel-23" + } + } + } + ] + } + } + } } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - } - }, - { - "id": 46, - "type": "timeseries", - "title": "Memory", - "description": "Resident memory and live Go heap.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 40 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "process_resident_memory_bytes{\"service.name\"=\"forgejo\"}", - "legendFormat": "rss" - }, - { - "refId": "B", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "go_memstats_heap_alloc_bytes{\"service.name\"=\"forgejo\"}", - "legendFormat": "heap" - } - ], - "fieldConfig": { - "defaults": { - "unit": "bytes", - "decimals": 1, - "color": { - "mode": "palette-classic" - }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 10, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - } - }, - { - "id": 47, - "type": "timeseries", - "title": "Goroutines and threads", - "description": "Goroutines and OS threads in the process.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 48 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "go_goroutines{\"service.name\"=\"forgejo\"}", - "legendFormat": "goroutines" - }, - { - "refId": "B", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "go_threads{\"service.name\"=\"forgejo\"}", - "legendFormat": "threads" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "color": { - "mode": "palette-classic" - }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 10, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - } - }, - { - "id": 48, - "type": "timeseries", - "title": "Open descriptors", - "description": "File descriptors held, against the limit.", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 48 - }, - "targets": [ - { - "refId": "A", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "process_open_fds{\"service.name\"=\"forgejo\"}", - "legendFormat": "open" - }, - { - "refId": "B", - "datasource": { - "type": "prometheus", - "uid": "@datasourceUid@" - }, - "expr": "process_max_fds{\"service.name\"=\"forgejo\"}", - "legendFormat": "limit" - } - ], - "fieldConfig": { - "defaults": { - "unit": "short", - "color": { - "mode": "palette-classic" - }, - "custom": { - "drawStyle": "line", - "lineWidth": 1, - "fillOpacity": 10, - "showPoints": "never", - "spanNulls": false, - "axisSoftMin": 0 - } - }, - "overrides": [] - }, - "options": { - "legend": { - "displayMode": "list", - "placement": "bottom", - "showLegend": true, - "calcs": [] - }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } + ] } } - ] + } }