From 11ade8e47af8937cd4286f055b71e7234746c960 Mon Sep 17 00:00:00 2001 From: Colin Adler Date: Mon, 12 Jun 2023 21:55:30 +0000 Subject: [PATCH 1/4] feat: add example grafana dashboard --- .../monitoring/dashboards/grafana/README.md | 1 + .../dashboards/grafana/dashboard.json | 915 ++++++++++++++++++ 2 files changed, 916 insertions(+) create mode 100644 examples/monitoring/dashboards/grafana/README.md create mode 100644 examples/monitoring/dashboards/grafana/dashboard.json diff --git a/examples/monitoring/dashboards/grafana/README.md b/examples/monitoring/dashboards/grafana/README.md new file mode 100644 index 0000000000000..e7de937ecc3d9 --- /dev/null +++ b/examples/monitoring/dashboards/grafana/README.md @@ -0,0 +1 @@ +# Grafana Example Dashboard diff --git a/examples/monitoring/dashboards/grafana/dashboard.json b/examples/monitoring/dashboards/grafana/dashboard.json new file mode 100644 index 0000000000000..683a3ca2918bf --- /dev/null +++ b/examples/monitoring/dashboards/grafana/dashboard.json @@ -0,0 +1,915 @@ +{ + "__inputs": [ + { + "name": "DS_PROMETHEUS", + "label": "Prometheus", + "description": "", + "type": "datasource", + "pluginId": "prometheus", + "pluginName": "Prometheus" + } + ], + "__elements": {}, + "__requires": [ + { + "type": "grafana", + "id": "grafana", + "name": "Grafana", + "version": "9.5.3" + }, + { + "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": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "type": "dashboard" + } + ] + }, + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 0, + "id": null, + "links": [], + "liveNow": false, + "panels": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 0 + }, + "id": 1, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "rate(process_cpu_seconds_total[$__rate_interval])", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 12, + "y": 0 + }, + "id": 2, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "coderd_api_active_users_duration_hour", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Active Users", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 16, + "y": 0 + }, + "id": 5, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "sum(coderd_agents_up)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Running agents", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ms" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 4, + "x": 20, + "y": 0 + }, + "id": 6, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "textMode": "auto" + }, + "pluginVersion": "9.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "avg(coderd_agents_connection_latencies_seconds)", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Avg connection latency", + "type": "stat" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{__name__=\"coderd_provisionerd_num_daemons\", app=\"coderd\", instance=\"coder:2112\", job=\"coderd\"}" + }, + "properties": [ + { + "id": "displayName", + "value": "Running provisioners" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 8 + }, + "id": 3, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "coderd_provisionerd_jobs_current", + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "coderd_provisionerd_num_daemons", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "Concurrent jobs", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "sum(rate(coderd_db_query_latencies_seconds_count[1m0s]))" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "displayName", + "value": "Queries/s" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "histogram_quantile(0.95, sum by(le) (rate(coderd_db_query_latencies_seconds_bucket[1m0s])))" + }, + "properties": [ + { + "id": "displayName", + "value": "P95 latency" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 8 + }, + "id": 7, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "9.5.3", + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "histogram_quantile(0.95, sum by(le) (rate(coderd_db_query_latencies_seconds_bucket[$__rate_interval])))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "sum(rate(coderd_db_query_latencies_seconds_count[$__rate_interval]))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "Query latency and rate", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "{__name__=\"go_memstats_alloc_bytes\", app=\"coderd\", instance=\"coder:2112\", job=\"coderd\"}" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "left" + }, + { + "id": "unit", + "value": "bytes" + }, + { + "id": "displayName", + "value": "Allocated bytes" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "{__name__=\"go_goroutines\", app=\"coderd\", instance=\"coder:2112\", job=\"coderd\"}" + }, + "properties": [ + { + "id": "displayName", + "value": "Goroutines" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 16 + }, + "id": 4, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "go_memstats_alloc_bytes", + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "exemplar": false, + "expr": "go_goroutines", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + } + ], + "title": "Heap and Goroutines", + "type": "timeseries" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "sum(rate(coderd_api_requests_processed_total{code=\"500\"}[1m0s]))" + }, + "properties": [ + { + "id": "displayName", + "value": "Error rate" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "coderd" + }, + "properties": [ + { + "id": "displayName", + "value": "Request rate" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "histogram_quantile(0.95, sum by(le) (rate(coderd_api_request_latencies_seconds_bucket[1m0s])))" + }, + "properties": [ + { + "id": "unit", + "value": "s" + }, + { + "id": "displayName", + "value": "P95 request latency" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 16 + }, + "id": 8, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "mode": "single", + "sort": "none" + } + }, + "targets": [ + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "sum by(job) (rate(coderd_api_requests_processed_total[$__rate_interval]))", + "legendFormat": "__auto", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "sum(rate(coderd_api_requests_processed_total{code=\"500\"}[$__rate_interval]))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "${DS_PROMETHEUS}" + }, + "editorMode": "builder", + "expr": "histogram_quantile(0.95, sum by(le) (rate(coderd_api_request_latencies_seconds_bucket[$__rate_interval])))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "C" + } + ], + "title": "API Requests and Error Rate", + "type": "timeseries" + } + ], + "refresh": "", + "schemaVersion": 38, + "style": "dark", + "tags": [], + "templating": { + "list": [] + }, + "time": { + "from": "now-6h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "Coder Dashboard", + "uid": "cb63c6ac-e392-42a9-a966-ee642b9c997c", + "version": 7, + "weekStart": "" +} From dd68e01376ec88e2b51b3cdb89c234a4b9e3af3e Mon Sep 17 00:00:00 2001 From: Colin Adler Date: Mon, 12 Jun 2023 22:06:18 +0000 Subject: [PATCH 2/4] fixup! feat: add example grafana dashboard --- .../monitoring/dashboards/grafana/README.md | 2 + .../dashboards/grafana/dashboard.json | 88 +++++++++++++++---- 2 files changed, 75 insertions(+), 15 deletions(-) diff --git a/examples/monitoring/dashboards/grafana/README.md b/examples/monitoring/dashboards/grafana/README.md index e7de937ecc3d9..5ce9b653caa50 100644 --- a/examples/monitoring/dashboards/grafana/README.md +++ b/examples/monitoring/dashboards/grafana/README.md @@ -1 +1,3 @@ # Grafana Example Dashboard + +![image](https://github.com/coder/coder/assets/6332295/1dd61c3c-9fa5-4ff4-87ff-6cd840f9f7d6) diff --git a/examples/monitoring/dashboards/grafana/dashboard.json b/examples/monitoring/dashboards/grafana/dashboard.json index 683a3ca2918bf..57a706770745c 100644 --- a/examples/monitoring/dashboards/grafana/dashboard.json +++ b/examples/monitoring/dashboards/grafana/dashboard.json @@ -7,6 +7,20 @@ "type": "datasource", "pluginId": "prometheus", "pluginName": "Prometheus" + }, + { + "name": "VAR_FILTER_KEY", + "type": "constant", + "label": "Filter key", + "value": "app", + "description": "" + }, + { + "name": "VAR_FILTER_VALUE", + "type": "constant", + "label": "Filter value", + "value": "coder", + "description": "" } ], "__elements": {}, @@ -142,7 +156,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "rate(process_cpu_seconds_total[$__rate_interval])", + "expr": "rate(process_cpu_seconds_total{$filter_key=\"$filter_value\"}[$__rate_interval])", "legendFormat": "__auto", "range": true, "refId": "A" @@ -207,7 +221,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "coderd_api_active_users_duration_hour", + "expr": "coderd_api_active_users_duration_hour{$filter_key=\"$filter_value\"}", "legendFormat": "__auto", "range": true, "refId": "A" @@ -272,7 +286,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "sum(coderd_agents_up)", + "expr": "sum(coderd_agents_up{$filter_key=\"$filter_value\"})", "legendFormat": "__auto", "range": true, "refId": "A" @@ -338,7 +352,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "avg(coderd_agents_connection_latencies_seconds)", + "expr": "avg(coderd_agents_connection_latencies_seconds{$filter_key=\"$filter_value\"})", "legendFormat": "__auto", "range": true, "refId": "A" @@ -443,7 +457,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "coderd_provisionerd_jobs_current", + "expr": "coderd_provisionerd_jobs_current{$filter_key=\"$filter_value\"}", "legendFormat": "__auto", "range": true, "refId": "A" @@ -454,7 +468,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "coderd_provisionerd_num_daemons", + "expr": "coderd_provisionerd_num_daemons{$filter_key=\"$filter_value\"}", "hide": false, "legendFormat": "__auto", "range": true, @@ -578,7 +592,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "histogram_quantile(0.95, sum by(le) (rate(coderd_db_query_latencies_seconds_bucket[$__rate_interval])))", + "expr": "histogram_quantile(0.95, sum by(le) (rate(coderd_db_query_latencies_seconds_bucket{$filter_key=\"$filter_value\"}[$__rate_interval])))", "hide": false, "legendFormat": "__auto", "range": true, @@ -590,7 +604,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "sum(rate(coderd_db_query_latencies_seconds_count[$__rate_interval]))", + "expr": "sum(rate(coderd_db_query_latencies_seconds_count{$filter_key=\"$filter_value\"}[$__rate_interval]))", "hide": false, "legendFormat": "__auto", "range": true, @@ -716,7 +730,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "go_memstats_alloc_bytes", + "expr": "go_memstats_alloc_bytes{$filter_key=\"$filter_value\"}", "legendFormat": "__auto", "range": true, "refId": "A" @@ -728,7 +742,7 @@ }, "editorMode": "builder", "exemplar": false, - "expr": "go_goroutines", + "expr": "go_goroutines{$filter_key=\"$filter_value\"}", "hide": false, "legendFormat": "__auto", "range": true, @@ -751,6 +765,7 @@ "custom": { "axisCenteredZero": false, "axisColorMode": "text", + "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", @@ -861,7 +876,7 @@ "uid": "${DS_PROMETHEUS}" }, "editorMode": "builder", - "expr": "sum by(job) (rate(coderd_api_requests_processed_total[$__rate_interval]))", + "expr": "sum by(job) (rate(coderd_api_requests_processed_total{$filter_key=\"$filter_value\"}[$__rate_interval]))", "legendFormat": "__auto", "range": true, "refId": "A" @@ -895,21 +910,64 @@ "type": "timeseries" } ], - "refresh": "", + "refresh": "10s", "schemaVersion": 38, "style": "dark", "tags": [], "templating": { - "list": [] + "list": [ + { + "description": "The key to use for filtering metrics", + "hide": 2, + "label": "Filter key", + "name": "filter_key", + "query": "${VAR_FILTER_KEY}", + "skipUrlSync": false, + "type": "constant", + "current": { + "value": "${VAR_FILTER_KEY}", + "text": "${VAR_FILTER_KEY}", + "selected": false + }, + "options": [ + { + "value": "${VAR_FILTER_KEY}", + "text": "${VAR_FILTER_KEY}", + "selected": false + } + ] + }, + { + "description": "The value to use for filtering metrics", + "hide": 2, + "label": "Filter value", + "name": "filter_value", + "query": "${VAR_FILTER_VALUE}", + "skipUrlSync": false, + "type": "constant", + "current": { + "value": "${VAR_FILTER_VALUE}", + "text": "${VAR_FILTER_VALUE}", + "selected": false + }, + "options": [ + { + "value": "${VAR_FILTER_VALUE}", + "text": "${VAR_FILTER_VALUE}", + "selected": false + } + ] + } + ] }, "time": { - "from": "now-6h", + "from": "now-30m", "to": "now" }, "timepicker": {}, "timezone": "", "title": "Coder Dashboard", "uid": "cb63c6ac-e392-42a9-a966-ee642b9c997c", - "version": 7, + "version": 9, "weekStart": "" } From e62c0eedd0823e5e45afc20f5b9fd07315f3c77a Mon Sep 17 00:00:00 2001 From: Colin Adler Date: Mon, 12 Jun 2023 22:15:43 +0000 Subject: [PATCH 3/4] fixup! feat: add example grafana dashboard --- examples/monitoring/dashboards/grafana/README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/examples/monitoring/dashboards/grafana/README.md b/examples/monitoring/dashboards/grafana/README.md index 5ce9b653caa50..573c9d2443605 100644 --- a/examples/monitoring/dashboards/grafana/README.md +++ b/examples/monitoring/dashboards/grafana/README.md @@ -1,3 +1,5 @@ # Grafana Example Dashboard ![image](https://github.com/coder/coder/assets/6332295/1dd61c3c-9fa5-4ff4-87ff-6cd840f9f7d6) + +Download `dashboard.json` and import it into your Grafana instance. It has two filter variables which can be used to select the label you set for your Coder metrics. From 8796635245ab8377d20bfc4d9075a2e09d4752b5 Mon Sep 17 00:00:00 2001 From: Colin Adler Date: Mon, 12 Jun 2023 22:19:45 +0000 Subject: [PATCH 4/4] fixup! feat: add example grafana dashboard --- examples/monitoring/dashboards/grafana/README.md | 4 +++- .../monitoring/dashboards/grafana/dashboard.json | 12 +++--------- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/examples/monitoring/dashboards/grafana/README.md b/examples/monitoring/dashboards/grafana/README.md index 573c9d2443605..460338914cb07 100644 --- a/examples/monitoring/dashboards/grafana/README.md +++ b/examples/monitoring/dashboards/grafana/README.md @@ -2,4 +2,6 @@ ![image](https://github.com/coder/coder/assets/6332295/1dd61c3c-9fa5-4ff4-87ff-6cd840f9f7d6) -Download `dashboard.json` and import it into your Grafana instance. It has two filter variables which can be used to select the label you set for your Coder metrics. +Download `dashboard.json` and import it into your Grafana instance. It has two +filter variables which can be used to select the label you set for your Coder +metrics. diff --git a/examples/monitoring/dashboards/grafana/dashboard.json b/examples/monitoring/dashboards/grafana/dashboard.json index 57a706770745c..c16ba52534ed9 100644 --- a/examples/monitoring/dashboards/grafana/dashboard.json +++ b/examples/monitoring/dashboards/grafana/dashboard.json @@ -205,9 +205,7 @@ "justifyMode": "auto", "orientation": "auto", "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "", "values": false }, @@ -270,9 +268,7 @@ "justifyMode": "auto", "orientation": "auto", "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "", "values": false }, @@ -336,9 +332,7 @@ "justifyMode": "auto", "orientation": "auto", "reduceOptions": { - "calcs": [ - "lastNotNull" - ], + "calcs": ["lastNotNull"], "fields": "", "values": false }, pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy