From 9eddd3fb8c4cf0df3c0cd7010660bd38ac57f782 Mon Sep 17 00:00:00 2001 From: AK Date: Sun, 30 Aug 2026 02:20:57 -0700 Subject: [PATCH] fix: make Grafana dashboard portable --- grafana/README.md | 11 +- grafana/dashboard_test.go | 47 +- grafana/gobot-dashboard.json | 2165 +++++++++++++++------------------- 3 files changed, 973 insertions(+), 1250 deletions(-) diff --git a/grafana/README.md b/grafana/README.md index a2f6594..c60b486 100644 --- a/grafana/README.md +++ b/grafana/README.md @@ -1,7 +1,9 @@ # GoBot Grafana dashboard -[`gobot-dashboard.json`](gobot-dashboard.json) is the importable Grafana -dashboard for GoBot's `/metrics` endpoint. It covers: +[`gobot-dashboard.json`](gobot-dashboard.json) is a portable Classic JSON +dashboard for GoBot's `/metrics` endpoint. Grafana maps its Prometheus data +source during import instead of retaining an instance-specific data-source +identifier. It covers: - Prometheus scrape and IRC connection health - process uptime and reliability events @@ -75,6 +77,11 @@ Prometheus host to `10.69.0.22:8082` before importing the dashboard. - **Instance:** `10.69.0.22:8082` - **IRC network:** `All`, or one configured GoBot network +The JSON intentionally uses Grafana's portable Classic import model. It does +not contain API-managed resource fields such as `generation`, +`resourceVersion`, or `creationTimestamp`, so it can be imported through the +normal UI and used to overwrite an earlier copy safely. + The dashboard refreshes every 30 seconds, matching the Prometheus scrape interval. A newly started bot may need two scrapes (about one minute) before rate panels have enough samples to draw a line. diff --git a/grafana/dashboard_test.go b/grafana/dashboard_test.go index 751a634..4219aeb 100644 --- a/grafana/dashboard_test.go +++ b/grafana/dashboard_test.go @@ -7,24 +7,22 @@ import ( "testing" ) -type dashboardResource struct { - APIVersion string `json:"apiVersion"` - Kind string `json:"kind"` - Spec struct { - Title string `json:"title"` - Elements map[string]dashboardElement `json:"elements"` - Variables []struct { - Spec struct { - Name string `json:"name"` - } `json:"spec"` - } `json:"variables"` - } `json:"spec"` -} - -type dashboardElement struct { - Spec struct { +type dashboardModel struct { + SchemaVersion int `json:"schemaVersion"` + Title string `json:"title"` + UID string `json:"uid"` + Inputs []struct { + Name string `json:"name"` + PluginID string `json:"pluginId"` + } `json:"__inputs"` + Panels []struct { Title string `json:"title"` - } `json:"spec"` + } `json:"panels"` + Templating struct { + List []struct { + Name string `json:"name"` + } `json:"list"` + } `json:"templating"` } func TestDashboardJSONUsesExpandedMetrics(t *testing.T) { @@ -32,17 +30,20 @@ func TestDashboardJSONUsesExpandedMetrics(t *testing.T) { if err != nil { t.Fatal(err) } - var dashboard dashboardResource + var dashboard dashboardModel if err := json.Unmarshal(raw, &dashboard); err != nil { t.Fatalf("dashboard JSON is invalid: %v", err) } - if dashboard.APIVersion == "" || dashboard.Kind != "Dashboard" || dashboard.Spec.Title != "GoBot Operations" { + if dashboard.SchemaVersion < 39 || dashboard.Title != "GoBot Operations" || dashboard.UID != "gobot-operations" { t.Fatalf("unexpected dashboard identity: %#v", dashboard) } + if len(dashboard.Inputs) != 1 || dashboard.Inputs[0].Name != "DS_PROMETHEUS" || dashboard.Inputs[0].PluginID != "prometheus" { + t.Fatalf("dashboard Prometheus input is not portable: %#v", dashboard.Inputs) + } panelTitles := make(map[string]bool) - for _, element := range dashboard.Spec.Elements { - panelTitles[element.Spec.Title] = true + for _, panel := range dashboard.Panels { + panelTitles[panel.Title] = true } for _, title := range []string{ "IRC connection", @@ -61,8 +62,8 @@ func TestDashboardJSONUsesExpandedMetrics(t *testing.T) { } variables := make(map[string]bool) - for _, variable := range dashboard.Spec.Variables { - variables[variable.Spec.Name] = true + for _, variable := range dashboard.Templating.List { + variables[variable.Name] = true } for _, name := range []string{"job", "environment", "hostname", "instance", "network"} { if !variables[name] { diff --git a/grafana/gobot-dashboard.json b/grafana/gobot-dashboard.json index cf137b2..b836e5c 100644 --- a/grafana/gobot-dashboard.json +++ b/grafana/gobot-dashboard.json @@ -1,1299 +1,1014 @@ { - "apiVersion": "dashboard.grafana.app/v2", - "kind": "Dashboard", - "metadata": { - "name": "gobot-operations", - "generation": 7, - "creationTimestamp": "2026-08-01T07:11:36Z", - "labels": {}, - "annotations": {} - }, - "spec": { - "annotations": [ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "10.0.0" + }, + { + "type": "datasource", + "id": "prometheus", + "name": "Prometheus", + "version": "1.0.0" + }, + { + "type": "panel", + "id": "stat", + "name": "Stat", + "version": "" + }, + { + "type": "panel", + "id": "timeseries", + "name": "Time series", + "version": "" + } + ], + "annotations": { + "list": [ { - "kind": "AnnotationQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "grafana", - "version": "v0", - "spec": {}, - "labels": { - "grafana.app/export-label": "grafana-1" - } - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "builtIn": true - } + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" } - ], - "cursorSync": "Crosshair", - "editable": true, - "elements": { - "panel-1": { - "kind": "Panel", - "spec": { - "id": 1, - "title": "IRC connection", - "description": "Connected only when every selected IRC network reports an active connection.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "min(bot_network_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.2", - "spec": { + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Connected only when every selected IRC network reports an active connection.", + "fieldConfig": { + "defaults": { + "unit": "short", + "mappings": [ + { + "type": "value", "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + "0": { + "text": "Disconnected", + "color": "red" }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "Disconnected", - "color": "red" - }, - "1": { - "text": "Connected", - "color": "green" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "red" - }, - { - "value": 1, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } - } - }, - "panel-2": { - "kind": "Panel", - "spec": { - "id": 2, - "title": "Prometheus scrape", - "description": "Whether Prometheus can currently scrape every selected GoBot target.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "min(up{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"})" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } + "1": { + "text": "Connected", + "color": "green" } - ], - "transformations": [], - "queryOptions": {} + } } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.2", - "spec": { - "options": { - "colorMode": "background", - "graphMode": "none", - "justifyMode": "center", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "red" }, - "fieldConfig": { - "defaults": { - "unit": "short", - "mappings": [ - { - "type": "value", - "options": { - "0": { - "text": "Down", - "color": "red" - }, - "1": { - "text": "Up", - "color": "green" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "red" - }, - { - "value": 1, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] + { + "value": 1, + "color": "green" } - } + ] + }, + "color": { + "mode": "thresholds" } - } + }, + "overrides": [] }, - "panel-3": { - "kind": "Panel", - "spec": { - "id": 3, - "title": "Reliability events", - "description": "Reconnects, dropped outbound messages, and recovered plugin panics during the selected time range.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "sum(increase(bot_network_reconnects_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__range])) + sum(increase(bot_network_messages_dropped_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__range])) + (sum(increase(bot_plugin_panics_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__range])) or vector(0))" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } + "gridPos": { + "h": 5, + "w": 6, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.2", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true - }, - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 1, - "color": "red" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] - } - } - } + "editorMode": "code", + "expr": "min(bot_network_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" } + ], + "title": "IRC connection", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "panel-4": { - "kind": "Panel", - "spec": { - "id": 4, - "title": "Message throughput by network", - "description": "Per-second IRC message rates by network, calculated over Grafana's safe rate interval.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "sum by (network) (rate(bot_network_messages_received_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__rate_interval]))", - "legendFormat": "{{network}} received" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "sum by (network) (rate(bot_network_messages_sent_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__rate_interval]))", - "legendFormat": "{{network}} sent" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.2", - "spec": { + "description": "Whether Prometheus can currently scrape every selected GoBot target.", + "fieldConfig": { + "defaults": { + "unit": "short", + "mappings": [ + { + "type": "value", "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true + "0": { + "text": "Down", + "color": "red" }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" + "1": { + "text": "Up", + "color": "green" } - }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "decimals": 2, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "messages/sec", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 15, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] } } - } - } - }, - "panel-5": { - "kind": "Panel", - "spec": { - "id": 5, - "title": "Command throughput by plugin", - "description": "Per-second handled-command rate, grouped by plugin.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "sum by (plugin) (rate(bot_plugin_commands_handled_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__rate_interval]))", - "legendFormat": "{{plugin}}" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } - }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.2", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "lastNotNull", - "max" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "red" }, - "fieldConfig": { - "defaults": { - "unit": "ops", - "decimals": 2, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "commands/sec", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 15, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] + { + "value": 1, + "color": "green" } - } + ] + }, + "color": { + "mode": "thresholds" } - } + }, + "overrides": [] }, - "panel-6": { - "kind": "Panel", - "spec": { - "id": 6, - "title": "Outbound queue pressure", - "description": "Current queued messages and queue capacity by IRC network. Sustained depth indicates rate limiting or an unhealthy connection.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "max by (network) (bot_outgoing_queue_depth{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})", - "legendFormat": "{{network}} depth" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - }, - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "max by (network) (bot_outgoing_queue_capacity{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})", - "legendFormat": "{{network}} capacity" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "B", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } + "gridPos": { + "h": 5, + "w": 6, + "x": 6, + "y": 0 + }, + "id": 2, + "options": { + "colorMode": "background", + "graphMode": "none", + "justifyMode": "center", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "vizConfig": { - "kind": "VizConfig", - "group": "timeseries", - "version": "13.0.2", - "spec": { - "options": { - "annotations": { - "clustering": -1, - "multiLane": false - }, - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } + "editorMode": "code", + "expr": "min(up{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Prometheus scrape", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Reconnects, dropped outbound messages, and recovered plugin panics during the selected time range.", + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" }, - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - }, - { - "value": 80, - "color": "red" - } - ] - }, - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - } - }, - "overrides": [] + { + "value": 1, + "color": "red" } - } + ] + }, + "color": { + "mode": "thresholds" } - } + }, + "overrides": [] }, - "panel-7": { - "kind": "Panel", - "spec": { - "id": 7, - "title": "Uptime", - "description": "Uptime of the selected GoBot process. This resets after a rebuild or service restart.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "max(bot_uptime_seconds{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"})" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } + "gridPos": { + "h": 5, + "w": 6, + "x": 12, + "y": 0 + }, + "id": 3, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.2", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "editorMode": "code", + "expr": "sum(increase(bot_network_reconnects_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__range])) + sum(increase(bot_network_messages_dropped_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__range])) + (sum(increase(bot_plugin_panics_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__range])) or vector(0))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Reliability events", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Per-second IRC message rates by network, calculated over Grafana's safe rate interval.", + "fieldConfig": { + "defaults": { + "unit": "ops", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" }, - "fieldConfig": { - "defaults": { - "unit": "s", - "decimals": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - } - }, - "overrides": [] + { + "value": 80, + "color": "red" } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "messages/sec", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 15, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 0, + "y": 5 + }, + "id": 4, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" } }, - "panel-8": { - "kind": "Panel", - "spec": { - "id": 8, - "title": "Most-used plugins", - "description": "Top plugins by commands handled during the current GoBot process lifetime. Counts reset when GoBot restarts.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "topk(10, sum by (plugin) (bot_plugin_commands_handled_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}))", - "legendFormat": "{{plugin}}" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.2", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "editorMode": "code", + "expr": "sum by (network) (rate(bot_network_messages_received_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__rate_interval]))", + "legendFormat": "{{network}} received", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "code", + "expr": "sum by (network) (rate(bot_network_messages_sent_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__rate_interval]))", + "legendFormat": "{{network}} sent", + "range": true, + "refId": "B" + } + ], + "title": "Message throughput by network", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Per-second handled-command rate, grouped by plugin.", + "fieldConfig": { + "defaults": { + "unit": "ops", + "decimals": 2, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" }, - "fieldConfig": { - "defaults": { - "unit": "short", - "decimals": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "green" - } - ] - }, - "color": { - "mode": "palette-classic" - } - }, - "overrides": [] + { + "value": 80, + "color": "red" } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "commands/sec", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 15, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } } + }, + "overrides": [] + }, + "gridPos": { + "h": 9, + "w": 12, + "x": 12, + "y": 5 + }, + "id": 5, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "lastNotNull", + "max" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" } }, - "panel-9": { - "kind": "Panel", - "spec": { - "id": 9, - "title": "Joined networks and channels", - "description": "GoBot's current IRC channel memberships. Only the bot's own network and channel labels are exported.", - "links": [], - "data": { - "kind": "QueryGroup", - "spec": { - "queries": [ - { - "kind": "PanelQuery", - "spec": { - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "expr": "max by (network, channel) (bot_network_channel_joined{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})", - "legendFormat": "{{network}} / {{channel}}" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "refId": "A", - "hidden": false - } - } - ], - "transformations": [], - "queryOptions": {} - } + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "vizConfig": { - "kind": "VizConfig", - "group": "stat", - "version": "13.0.2", - "spec": { - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "textMode": "auto", - "wideLayout": true + "editorMode": "code", + "expr": "sum by (plugin) (rate(bot_plugin_commands_handled_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}[$__rate_interval]))", + "legendFormat": "{{plugin}}", + "range": true, + "refId": "A" + } + ], + "title": "Command throughput by plugin", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Current queued messages and queue capacity by IRC network. Sustained depth indicates rate limiting or an unhealthy connection.", + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" }, - "fieldConfig": { - "defaults": { - "unit": "short", - "mappings": [ - { - "type": "value", - "options": { - "1": { - "text": "Joined", - "color": "green" - } - } - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "value": 0, - "color": "red" - }, - { - "value": 1, - "color": "green" - } - ] - }, - "color": { - "mode": "thresholds" - } - }, - "overrides": [] + { + "value": 80, + "color": "red" } + ] + }, + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" } } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 24, + "x": 0, + "y": 14 + }, + "id": 6, + "options": { + "annotations": { + "clustering": -1, + "multiLane": false + }, + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" } - } - }, - "layout": { - "kind": "GridLayout", - "spec": { - "items": [ - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 0, - "width": 6, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-1" - } - } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 6, - "y": 0, - "width": 6, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-2" - } - } + "editorMode": "code", + "expr": "max by (network) (bot_outgoing_queue_depth{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})", + "legendFormat": "{{network}} depth", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 0, - "width": 6, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-3" + "editorMode": "code", + "expr": "max by (network) (bot_outgoing_queue_capacity{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})", + "legendFormat": "{{network}} capacity", + "range": true, + "refId": "B" + } + ], + "title": "Outbound queue pressure", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Uptime of the selected GoBot process. This resets after a rebuild or service restart.", + "fieldConfig": { + "defaults": { + "unit": "s", + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" } - } + ] }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 18, - "y": 0, - "width": 6, - "height": 5, - "element": { - "kind": "ElementReference", - "name": "panel-7" - } - } + "color": { + "mode": "palette-classic" + } + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 6, + "x": 18, + "y": 0 + }, + "id": 7, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 5, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-4" + "editorMode": "code", + "expr": "max(bot_uptime_seconds{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "Top plugins by commands handled during the current GoBot process lifetime. Counts reset when GoBot restarts.", + "fieldConfig": { + "defaults": { + "unit": "short", + "decimals": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "green" } - } + ] }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 5, - "width": 12, - "height": 9, - "element": { - "kind": "ElementReference", - "name": "panel-5" - } - } + "color": { + "mode": "palette-classic" + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 22 + }, + "id": 8, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 14, - "width": 24, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-6" + "editorMode": "code", + "expr": "topk(10, sum by (plugin) (bot_plugin_commands_handled_total{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"}))", + "legendFormat": "{{plugin}}", + "range": true, + "refId": "A" + } + ], + "title": "Most-used plugins", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "description": "GoBot's current IRC channel memberships. Only the bot's own network and channel labels are exported.", + "fieldConfig": { + "defaults": { + "unit": "short", + "mappings": [ + { + "type": "value", + "options": { + "1": { + "text": "Joined", + "color": "green" + } } } - }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 0, - "y": 22, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-8" + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "value": 0, + "color": "red" + }, + { + "value": 1, + "color": "green" } - } + ] }, - { - "kind": "GridLayoutItem", - "spec": { - "x": 12, - "y": 22, - "width": 12, - "height": 8, - "element": { - "kind": "ElementReference", - "name": "panel-9" - } - } + "color": { + "mode": "thresholds" } - ] - } - }, - "links": [], - "liveNow": false, - "preload": false, - "tags": [ - "gobot", - "irc", - "prometheus" - ], - "timeSettings": { - "timezone": "browser", - "from": "now-6h", - "to": "now", - "autoRefresh": "30s", - "autoRefreshIntervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "hideTimepicker": false, - "fiscalYearStartMonth": 0 - }, - "title": "GoBot Operations", - "description": "Operational health, traffic, plugin activity, reliability, and outbound queue pressure for GoBot.", - "variables": [ - { - "kind": "QueryVariable", - "spec": { - "name": "job", - "current": { - "text": "gobot", - "value": "gobot" - }, - "label": "Job", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "qryType": 5, - "query": "label_values(bot_connected, job)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 22 + }, + "id": 9, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" }, - "regex": "", - "regexApplyTo": "value", - "sort": "disabled", - "definition": "label_values(bot_connected, job)", - "options": [], - "multi": false, - "includeAll": true, - "allowCustomValue": true + "editorMode": "code", + "expr": "max by (network, channel) (bot_network_channel_joined{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\", network=~\"$network\"})", + "legendFormat": "{{network}} / {{channel}}", + "range": true, + "refId": "A" } + ], + "title": "Joined networks and channels", + "type": "stat" + } + ], + "refresh": "30s", + "schemaVersion": 39, + "tags": [ + "gobot", + "irc", + "prometheus" + ], + "templating": { + "list": [ + { + "allValue": ".*", + "current": { + "text": "gobot", + "value": "gobot" + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(bot_connected, job)", + "hide": 0, + "includeAll": true, + "label": "Job", + "multi": false, + "name": "job", + "options": [], + "query": { + "query": "label_values(bot_connected, job)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" }, { - "kind": "QueryVariable", - "spec": { - "name": "environment", - "current": { - "text": "production", - "value": "production" - }, - "label": "Environment", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "qryType": 5, - "query": "label_values(bot_connected{job=~\"$job\"}, environment)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(bot_connected{job=~\"$job\"}, environment)", - "options": [], - "multi": false, - "includeAll": true, - "allowCustomValue": true - } + "allValue": ".*", + "current": { + "text": "production", + "value": "production" + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(bot_connected{job=~\"$job\"}, environment)", + "hide": 0, + "includeAll": true, + "label": "Environment", + "multi": false, + "name": "environment", + "options": [], + "query": { + "query": "label_values(bot_connected{job=~\"$job\"}, environment)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" }, { - "kind": "QueryVariable", - "spec": { - "name": "hostname", - "current": { - "text": "nexus-node", - "value": "nexus-node" - }, - "label": "Host", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "qryType": 5, - "query": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\"}, hostname)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\"}, hostname)", - "options": [], - "multi": false, - "includeAll": true, - "allowCustomValue": true - } + "allValue": ".*", + "current": { + "text": "nexus-node", + "value": "nexus-node" + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\"}, hostname)", + "hide": 0, + "includeAll": true, + "label": "Host", + "multi": false, + "name": "hostname", + "options": [], + "query": { + "query": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\"}, hostname)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" }, { - "kind": "QueryVariable", - "spec": { - "name": "instance", - "current": { - "text": "10.69.0.22:8082", - "value": "10.69.0.22:8082" - }, - "label": "Instance", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "qryType": 5, - "query": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\"}, instance)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "regex": "", - "regexApplyTo": "value", - "sort": "disabled", - "definition": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\"}, instance)", - "options": [], - "multi": false, - "includeAll": true, - "allowCustomValue": true - } + "allValue": ".*", + "current": { + "text": "10.69.0.22:8082", + "value": "10.69.0.22:8082" + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\"}, instance)", + "hide": 0, + "includeAll": true, + "label": "Instance", + "multi": false, + "name": "instance", + "options": [], + "query": { + "query": "label_values(bot_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\"}, instance)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" }, { - "kind": "QueryVariable", - "spec": { - "name": "network", - "current": { - "text": "All", - "value": "$__all" - }, - "label": "IRC network", - "hide": "dontHide", - "refresh": "onDashboardLoad", - "skipUrlSync": false, - "query": { - "kind": "DataQuery", - "group": "prometheus", - "version": "v0", - "spec": { - "qryType": 5, - "query": "label_values(bot_network_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"}, network)", - "refId": "PrometheusVariableQueryEditor-VariableQuery" - }, - "labels": { - "grafana.app/export-label": "prometheus-1" - } - }, - "regex": "", - "regexApplyTo": "value", - "sort": "alphabeticalAsc", - "definition": "label_values(bot_network_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"}, network)", - "options": [], - "multi": true, - "includeAll": true, - "allowCustomValue": true - } + "allValue": ".*", + "current": { + "text": "All", + "value": "$__all" + }, + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "definition": "label_values(bot_network_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"}, network)", + "hide": 0, + "includeAll": true, + "label": "IRC network", + "multi": true, + "name": "network", + "options": [], + "query": { + "query": "label_values(bot_network_connected{job=~\"$job\", environment=~\"$environment\", hostname=~\"$hostname\", instance=~\"$instance\"}, network)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 1, + "type": "query" } ] - } + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": { + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ] + }, + "timezone": "browser", + "title": "GoBot Operations", + "uid": "gobot-operations", + "version": 1, + "weekStart": "" }