From f839c376af5da9454ff7c1c0bfe7d02b2850fb45 Mon Sep 17 00:00:00 2001 From: Thomas Draebing Date: Mon, 14 Sep 2020 15:22:58 +0200 Subject: [PATCH] Convert overview dashboard to grafonnet In addition this updates Grafonnet to include bar gauges. Change-Id: I538bd965d52f841b24c9607fc97d5ac748b9d68b --- dashboards/gerrit-overview.json | 1310 ----------------- .../gerrit/overview/gerrit-overview.jsonnet | 115 ++ .../panels/availability-time.libsonnet | 19 + .../overview/panels/availability.libsonnet | 24 + .../overview/panels/cpu-usage.libsonnet | 30 + .../gerrit/overview/panels/events.libsonnet | 37 + .../overview/panels/git-fetch-clone.libsonnet | 26 + .../overview/panels/heap-usage.libsonnet | 30 + .../overview/panels/http-responses.libsonnet | 92 ++ .../overview/panels/request-errors.libsonnet | 33 + .../overview/panels/rest-latency.libsonnet | 29 + .../gerrit/overview/panels/threads.libsonnet | 36 + .../overview/panels/version-table.libsonnet | 59 + dashboards/globals/bar-graph.libsonnet | 6 + dashboards/globals/grid_pos.libsonnet | 5 +- dashboards/globals/line-graph.libsonnet | 2 + jsonnetfile.lock.json | 4 +- 17 files changed, 543 insertions(+), 1314 deletions(-) delete mode 100644 dashboards/gerrit-overview.json create mode 100644 dashboards/gerrit/overview/gerrit-overview.jsonnet create mode 100644 dashboards/gerrit/overview/panels/availability-time.libsonnet create mode 100644 dashboards/gerrit/overview/panels/availability.libsonnet create mode 100644 dashboards/gerrit/overview/panels/cpu-usage.libsonnet create mode 100644 dashboards/gerrit/overview/panels/events.libsonnet create mode 100644 dashboards/gerrit/overview/panels/git-fetch-clone.libsonnet create mode 100644 dashboards/gerrit/overview/panels/heap-usage.libsonnet create mode 100644 dashboards/gerrit/overview/panels/http-responses.libsonnet create mode 100644 dashboards/gerrit/overview/panels/request-errors.libsonnet create mode 100644 dashboards/gerrit/overview/panels/rest-latency.libsonnet create mode 100644 dashboards/gerrit/overview/panels/threads.libsonnet create mode 100644 dashboards/gerrit/overview/panels/version-table.libsonnet diff --git a/dashboards/gerrit-overview.json b/dashboards/gerrit-overview.json deleted file mode 100644 index c4784fc..0000000 --- a/dashboards/gerrit-overview.json +++ /dev/null @@ -1,1310 +0,0 @@ -{ - "__inputs": [ - { - "name": "DS_PROMETHEUS", - "label": "Prometheus", - "description": "", - "type": "datasource", - "pluginId": "prometheus", - "pluginName": "Prometheus" - } - ], - "__requires": [ - { - "type": "grafana", - "id": "grafana", - "name": "Grafana", - "version": "7.1.5" - }, - { - "type": "panel", - "id": "graph", - "name": "Graph", - "version": "" - }, - { - "type": "datasource", - "id": "prometheus", - "name": "Prometheus", - "version": "1.0.0" - } - ], - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": "-- Grafana --", - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "type": "dashboard" - } - ] - }, - "editable": true, - "gnetId": null, - "graphTooltip": 0, - "links": [], - "panels": [ - { - "columns": [], - "datasource": "${DS_PROMETHEUS}", - "fontSize": "100%", - "gridPos": { - "h": 4, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 48, - "pageSize": null, - "showHeader": true, - "sort": { - "col": 1, - "desc": true - }, - "styles": [ - { - "$$hashKey": "object:289", - "alias": "Time", - "align": "auto", - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "pattern": "Time", - "type": "hidden" - }, - { - "$$hashKey": "object:557", - "alias": "Gerrit version", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "version", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:955", - "alias": "Java version", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "javaversion", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:976", - "alias": "Gerrit revision", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTargetBlank": true, - "linkUrl": "https://gerrit.googlesource.com/gerrit/+/${__cell:raw}", - "mappingType": 1, - "pattern": "revision", - "thresholds": [], - "type": "string", - "unit": "short" - }, - { - "$$hashKey": "object:1249", - "alias": "", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "mappingType": 1, - "pattern": "Value", - "thresholds": [], - "type": "hidden", - "unit": "short" - }, - { - "$$hashKey": "object:1278", - "alias": "Gerrit instance", - "align": "auto", - "colorMode": null, - "colors": [ - "rgba(245, 54, 54, 0.9)", - "rgba(237, 129, 40, 0.89)", - "rgba(50, 172, 45, 0.97)" - ], - "dateFormat": "YYYY-MM-DD HH:mm:ss", - "decimals": 2, - "link": true, - "linkTargetBlank": true, - "linkTooltip": "Link to the gerrit instance", - "linkUrl": "https://${__cell:raw}", - "mappingType": 1, - "pattern": "instance", - "thresholds": [], - "type": "string", - "unit": "short" - } - ], - "targets": [ - { - "expr": "max(gerrit_build_info{instance=\"$instance\",replica=\"$replica\"}) by (instance, version, revision, javaversion)", - "format": "table", - "instant": true, - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Gerrit Version", - "transform": "table", - "type": "table" - }, - { - "collapsed": false, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 46, - "panels": [], - "title": "", - "type": "row" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 5 - }, - "id": 19, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 60 - }, - { - "color": "#d44a3a", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "6.7.1", - "targets": [ - { - "expr": "(rate(proc_cpu_usage{instance=\"$instance\",replica=\"$replica\"}[5m])/proc_cpu_num_cores{instance=\"$instance\",replica=\"$replica\"})*100", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "CPU Usage", - "type": "gauge" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 5 - }, - "id": 20, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": null - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 60 - }, - { - "color": "#d44a3a", - "value": 90 - } - ] - }, - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "6.7.1", - "targets": [ - { - "expr": "(proc_jvm_memory_heap_used{instance=\"$instance\",replica=\"$replica\"}/proc_jvm_memory_heap_committed{instance=\"$instance\",replica=\"$replica\"})*100", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Heap Memory Usage", - "type": "gauge" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 6, - "w": 8, - "x": 16, - "y": 5 - }, - "id": 40, - "links": [], - "options": { - "displayMode": "basic", - "fieldOptions": { - "calcs": [ - "lastNotNull" - ], - "defaults": { - "mappings": [], - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "none" - }, - "overrides": [], - "values": false - }, - "orientation": "vertical", - "showUnfilled": true - }, - "pluginVersion": "6.7.1", - "targets": [ - { - "expr": "proc_jvm_thread_num_daemon_live{instance=\"$instance\",replica=\"$replica\"}", - "legendFormat": "current live threads (daemon)", - "refId": "A" - }, - { - "expr": "proc_jvm_thread_num_live{instance=\"$instance\",replica=\"$replica\"}", - "legendFormat": "current live threads", - "refId": "B" - }, - { - "expr": "proc_jvm_thread_num_peak_live{instance=\"$instance\",replica=\"$replica\"}", - "legendFormat": "peak of live threads", - "refId": "C" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "Live Threads", - "type": "bargauge" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 6, - "w": 8, - "x": 0, - "y": 11 - }, - "id": 11, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "last" - ], - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "max": 50, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "red", - "value": 30 - } - ] - }, - "unit": "ms" - }, - "overrides": [], - "values": false - }, - "orientation": "auto", - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "6.7.1", - "targets": [ - { - "expr": "http_server_rest_api_server_latency_total{quantile=\"0.99\", instance=\"$instance\",replica=\"$replica\"}", - "intervalFactor": 4, - "legendFormat": "quantile {{quantile}}", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "REST API latency (0.99 quantile)", - "type": "gauge" - }, - { - "cacheTimeout": null, - "datasource": "${DS_PROMETHEUS}", - "description": "Excludes 404 and 401, since these error codes are caused by client behaviour and are overrepresented in the data.", - "gridPos": { - "h": 6, - "w": 8, - "x": 8, - "y": 11 - }, - "id": 13, - "links": [], - "options": { - "fieldOptions": { - "calcs": [ - "mean" - ], - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "id": 0, - "op": "=", - "text": "N/A", - "type": 1, - "value": "null" - } - ], - "max": 100, - "min": 0, - "nullValueMode": "connected", - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - }, - { - "color": "#EAB839", - "value": 5 - }, - { - "color": "red", - "value": 10 - } - ] - }, - "unit": "percent" - }, - "overrides": [], - "values": false - }, - "orientation": "horizontal", - "showThresholdLabels": false, - "showThresholdMarkers": true - }, - "pluginVersion": "6.7.1", - "targets": [ - { - "expr": "(increase(http_server_error_count_total_total{instance=\"$instance\",replica=\"$replica\"}[5m]) - increase(http_server_error_count_404_total{instance=\"$instance\",replica=\"$replica\"}[5m]) - increase(http_server_error_count_401_total{instance=\"$instance\",replica=\"$replica\"}[5m])) / (increase(http_server_success_count_total_total{instance=\"$instance\",replica=\"$replica\"}[5m]) + increase(http_server_error_count_total_total{instance=\"$instance\",replica=\"$replica\"}[5m]) - increase(http_server_error_count_404_total{instance=\"$instance\",replica=\"$replica\"}[5m]) - increase(http_server_error_count_401_total{instance=\"$instance\",replica=\"$replica\"}[5m]))*100", - "refId": "A" - } - ], - "timeFrom": null, - "timeShift": null, - "title": "HTTP Request Error Rate (last 5 min)", - "type": "gauge" - }, - { - "datasource": "${DS_PROMETHEUS}", - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 17 - }, - "id": 44, - "title": "", - "type": "row" - }, - { - "aliasColors": {}, - "bars": false, - "cacheTimeout": null, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 18, - "x": 0, - "y": 18 - }, - "hiddenSeries": false, - "id": 39, - "legend": { - "avg": false, - "current": false, - "max": false, - "min": false, - "show": false, - "total": false, - "values": false - }, - "lines": true, - "linewidth": 1, - "links": [], - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": true, - "targets": [ - { - "expr": "up{instance=\"$instance\",replica=\"$replica\"}", - "format": "time_series", - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Gerrit Availability", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "decimals": 0, - "format": "short", - "label": "", - "logBase": 1, - "max": "1", - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "cacheTimeout": null, - "colorBackground": true, - "colorValue": false, - "colors": [ - "#d44a3a", - "rgba(237, 129, 40, 0.89)", - "#299c46" - ], - "datasource": "${DS_PROMETHEUS}", - "decimals": 2, - "format": "percent", - "gauge": { - "maxValue": 100, - "minValue": 0, - "show": false, - "thresholdLabels": false, - "thresholdMarkers": true - }, - "gridPos": { - "h": 9, - "w": 6, - "x": 18, - "y": 18 - }, - "id": 42, - "interval": null, - "links": [], - "mappingType": 1, - "mappingTypes": [ - { - "name": "value to text", - "value": 1 - }, - { - "name": "range to text", - "value": 2 - } - ], - "maxDataPoints": 100, - "nullPointMode": "connected", - "nullText": null, - "postfix": "", - "postfixFontSize": "50%", - "prefix": "", - "prefixFontSize": "50%", - "rangeMaps": [ - { - "from": "null", - "text": "N/A", - "to": "null" - } - ], - "sparkline": { - "fillColor": "rgba(31, 118, 189, 0.18)", - "full": false, - "lineColor": "rgb(31, 120, 193)", - "show": false, - "ymax": null, - "ymin": null - }, - "tableColumn": "", - "targets": [ - { - "expr": "avg_over_time(up{instance=\"$instance\",replica=\"$replica\"}[1d])*100", - "format": "time_series", - "legendFormat": "{{instance}}", - "refId": "A" - } - ], - "thresholds": "98, 99", - "timeFrom": null, - "timeShift": null, - "title": "Gerrit availability [last 24h]", - "type": "singlestat", - "valueFontSize": "150%", - "valueMaps": [ - { - "op": "=", - "text": "N/A", - "value": "null" - } - ], - "valueName": "current" - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "description": "This excludes response code 404, since it is caused by an issue with the Gerrit Trigger plugin.", - "fill": 1, - "fillGradient": 0, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 27 - }, - "hiddenSeries": false, - "id": 2, - "interval": "1m", - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": true, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [ - { - "alias": "200", - "color": "#37872D" - }, - { - "alias": "201", - "color": "#56A64B" - }, - { - "alias": "204", - "color": "#73BF69" - }, - { - "alias": "301", - "color": "rgb(110, 210, 110)" - }, - { - "alias": "304", - "color": "rgb(150, 225, 150)" - }, - { - "alias": "400", - "color": "#FA6400" - }, - { - "alias": "401", - "color": "#FF780A", - "hiddenSeries": true - }, - { - "alias": "403", - "color": "#FF9830" - }, - { - "alias": "404", - "color": "#FFB357", - "hiddenSeries": true - }, - { - "alias": "409", - "color": "#FFCB7D" - }, - { - "alias": "412", - "color": "#E0B400" - }, - { - "alias": "422", - "color": "#F2CC0C" - }, - { - "alias": "500", - "color": "#C4162A" - }, - { - "alias": "501", - "color": "#E02F44" - }, - { - "alias": "503", - "color": "#F2495C" - } - ], - "spaceLength": 10, - "stack": true, - "steppedLine": false, - "targets": [ - { - "expr": "(increase(http_server_success_count_200_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "200", - "refId": "A" - }, - { - "expr": "(increase(http_server_success_count_201_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "201", - "refId": "C" - }, - { - "expr": "(increase(http_server_success_count_204_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "204", - "refId": "D" - }, - { - "expr": "(increase(http_server_success_count_301_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "301", - "refId": "E" - }, - { - "expr": "(increase(http_server_success_count_304_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "304", - "refId": "F" - }, - { - "expr": "(increase(http_server_error_count_400_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "400", - "refId": "B" - }, - { - "expr": "(increase(http_server_error_count_401_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "401", - "refId": "G" - }, - { - "expr": "(increase(http_server_error_count_403_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "403", - "refId": "H" - }, - { - "expr": "(increase(http_server_error_count_404_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "instant": false, - "intervalFactor": 1, - "legendFormat": "404", - "refId": "I" - }, - { - "expr": "(increase(http_server_error_count_405_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "405", - "refId": "J" - }, - { - "expr": "(increase(http_server_error_count_409_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "409", - "refId": "K" - }, - { - "expr": "(increase(http_server_error_count_412_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "412", - "refId": "L" - }, - { - "expr": "(increase(http_server_error_count_422_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "422", - "refId": "M" - }, - { - "expr": "(increase(http_server_error_count_500_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "500", - "refId": "N" - }, - { - "expr": "(increase(http_server_error_count_501_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "501", - "refId": "O" - }, - { - "expr": "(increase(http_server_error_count_503_total{instance=\"$instance\",replica=\"$replica\"}[5m]))/5", - "intervalFactor": 1, - "legendFormat": "503", - "refId": "P" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "HTTP response status", - "tooltip": { - "shared": true, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "time", - "name": null, - "show": true, - "values": [] - }, - "yaxes": [ - { - "format": "short", - "label": "Count", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "decimals": null, - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 0, - "y": 37 - }, - "hiddenSeries": false, - "id": 9, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.5.2", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "increase(events_assignee_changed_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "assignee changed", - "refId": "A" - }, - { - "expr": "increase(events_change_abandoned_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "change abandoned", - "refId": "B" - }, - { - "expr": "increase(events_change_merged_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "change merged", - "refId": "C" - }, - { - "expr": "increase(events_comment_added_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "comment added", - "refId": "D" - }, - { - "expr": "increase(events_patchset_created_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "patchset created", - "refId": "E" - }, - { - "expr": "increase(events_ref_replicated_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "ref replicated", - "refId": "F" - }, - { - "expr": "increase(events_ref_updated_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "ref updated", - "refId": "G" - }, - { - "expr": "increase(events_reviewer_added_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "reviewer added", - "refId": "H" - }, - { - "expr": "increase(events_reviewer_deleted_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "reviewer deleted", - "refId": "I" - }, - { - "expr": "increase(events_topic_changed_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "topic changed", - "refId": "J" - }, - { - "expr": "increase(events_vote_deleted_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "vote deleted", - "refId": "K" - }, - { - "expr": "increase(events_wip_state_changed_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 1, - "legendFormat": "wip state changed", - "refId": "L" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Gerrit Events (last 5 min)", - "tooltip": { - "shared": false, - "sort": 2, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "series", - "name": null, - "show": true, - "values": [ - "current" - ] - }, - "yaxes": [ - { - "format": "short", - "label": "Count [5 min]", - "logBase": 1, - "max": null, - "min": null, - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - }, - { - "aliasColors": {}, - "bars": true, - "dashLength": 10, - "dashes": false, - "datasource": "${DS_PROMETHEUS}", - "fill": 0, - "fillGradient": 0, - "gridPos": { - "h": 9, - "w": 12, - "x": 12, - "y": 37 - }, - "hiddenSeries": false, - "id": 41, - "legend": { - "alignAsTable": true, - "avg": false, - "current": false, - "max": false, - "min": false, - "rightSide": true, - "show": false, - "total": false, - "values": false - }, - "lines": false, - "linewidth": 1, - "nullPointMode": "null", - "options": { - "dataLinks": [] - }, - "percentage": false, - "pluginVersion": "6.5.2", - "pointradius": 2, - "points": false, - "renderer": "flot", - "seriesOverrides": [], - "spaceLength": 10, - "stack": false, - "steppedLine": false, - "targets": [ - { - "expr": "increase(git_upload_pack_request_count_FETCH_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 4, - "legendFormat": "Fetch", - "refId": "B" - }, - { - "expr": "increase(git_upload_pack_request_count_CLONE_total{instance=\"$instance\",replica=\"$replica\"}[5m])", - "intervalFactor": 4, - "legendFormat": "Clone", - "refId": "A" - } - ], - "thresholds": [], - "timeFrom": null, - "timeRegions": [], - "timeShift": null, - "title": "Git Fetch/Clone upload-pack requests (last 5 min)", - "tooltip": { - "shared": false, - "sort": 0, - "value_type": "individual" - }, - "type": "graph", - "xaxis": { - "buckets": null, - "mode": "series", - "name": null, - "show": true, - "values": [ - "current" - ] - }, - "yaxes": [ - { - "format": "short", - "label": "Count [5 min]", - "logBase": 1, - "max": null, - "min": "0", - "show": true - }, - { - "format": "short", - "label": null, - "logBase": 1, - "max": null, - "min": null, - "show": true - } - ], - "yaxis": { - "align": false, - "alignLevel": null - } - } - ], - "refresh": "1m", - "schemaVersion": 22, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allValue": null, - "current": { - "tags": [], - "text": "", - "value": "" - }, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(git_upload_pack_phase_writing_total, instance)", - "hide": 0, - "includeAll": false, - "label": "Gerrit Instance", - "multi": false, - "name": "instance", - "options": [], - "query": "label_values(git_upload_pack_phase_writing_total, instance)", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - }, - { - "allValue": null, - "current": { - "text": "", - "value": "" - }, - "datasource": "${DS_PROMETHEUS}", - "definition": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", - "hide": 0, - "includeAll": false, - "label": "Replica", - "multi": false, - "name": "replica", - "options": [], - "query": "label_values(git_upload_pack_phase_writing_total{instance=\"$instance\"}, replica)", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "tagValuesQuery": "", - "tags": [], - "tagsQuery": "", - "type": "query", - "useTags": false - } - ] - }, - "time": { - "from": "now-24h", - "to": "now" - }, - "timepicker": { - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ] - }, - "timezone": "", - "title": "Gerrit Overview", - "uid": "uXZMn9PWz", - "version": 15 -} diff --git a/dashboards/gerrit/overview/gerrit-overview.jsonnet b/dashboards/gerrit/overview/gerrit-overview.jsonnet new file mode 100644 index 0000000..ba44202 --- /dev/null +++ b/dashboards/gerrit/overview/gerrit-overview.jsonnet @@ -0,0 +1,115 @@ +local grafana = import '../../../vendor/grafonnet/grafana.libsonnet'; +local dashboard = grafana.dashboard; +local template = grafana.template; +local row = grafana.row; +local graphPanel = grafana.graphPanel; +local prometheus = grafana.prometheus; + +local defaults = import '../../globals/defaults.libsonnet'; +local gridPos = import '../../globals/grid_pos.libsonnet'; +local publishVariables = import '../../globals/publish.libsonnet'; +local variables = import '../globals/variables.libsonnet'; + +local availability_panel = import './panels/availability.libsonnet'; +local availability_time_panel = import './panels/availability-time.libsonnet'; +local cpu_usage_panel = import './panels/cpu-usage.libsonnet'; +local events_panel = import './panels/events.libsonnet'; +local git_panel = import './panels/git-fetch-clone.libsonnet'; +local heap_usage_panel = import './panels/heap-usage.libsonnet'; +local http_responses_panel = import './panels/http-responses.libsonnet'; +local request_errors_panel = import './panels/request-errors.libsonnet'; +local rest_latency_panel = import './panels/rest-latency.libsonnet'; +local threads_panel = import './panels/threads.libsonnet'; +local version_table_panel = import './panels/version-table.libsonnet'; + +dashboard.new( + 'Gerrit - Overview', + tags=['gerrit'], + schemaVersion=defaults.dashboards.schemaVersion, + editable=defaults.dashboards.editable, + time_from=defaults.dashboards.timeFrom, + time_to=defaults.dashboards.timeTo, + refresh=defaults.dashboards.refresh, + graphTooltip='shared_tooltip', +) +.addTemplate(variables.instance) +.addTemplate(variables.replica) +.addPanel( + version_table_panel, + gridPos={ + w: 24, + h: 3, + x: 0, + y: 0, + }, +) +.addPanel( + cpu_usage_panel, + gridPos=gridPos.new(1,0,3,height=6), +) +.addPanel( + heap_usage_panel, + gridPos=gridPos.new(1,1,3,height=6), +) +.addPanel( + threads_panel, + gridPos=gridPos.new(1,2,3,height=6), +) +.addPanel( + rest_latency_panel, + gridPos=gridPos.new(2,0,3,height=6), +) +.addPanel( + request_errors_panel, + gridPos=gridPos.new(2,1,3,height=6), +) +.addPanel( + row.new(title=''), + gridPos={ + w: 24, + h: 1, + x: 0, + y: 15, + }, +) +.addPanel( + availability_time_panel, + gridPos={ + w: 18, + h: 11, + x: 0, + y: 15, + }, +) +.addPanel( + availability_panel, + gridPos={ + w: 6, + h: 11, + x: 18, + y: 15, + }, +) +.addPanel( + events_panel, + gridPos={ + w: 18, + h: 11, + x: 0, + y: 30, + }, +) +.addPanel( + git_panel, + gridPos={ + w: 6, + h: 11, + x: 18, + y: 30, + }, +) +.addPanel( + http_responses_panel, + gridPos=gridPos.new(4,0,1, height=22), +) ++ if std.extVar('publish') then publishVariables else {} diff --git a/dashboards/gerrit/overview/panels/availability-time.libsonnet b/dashboards/gerrit/overview/panels/availability-time.libsonnet new file mode 100644 index 0000000..fb1389e --- /dev/null +++ b/dashboards/gerrit/overview/panels/availability-time.libsonnet @@ -0,0 +1,19 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; + +local lineGraph = import '../../../globals/line-graph.libsonnet'; +local yAxis = import '../../../globals/yaxis.libsonnet'; + +lineGraph.new( + title='Gerrit Availability', + yAxis1=yAxis.new(label='Count'), + legend=false, + min=0, + max=1, +) +.addTarget( + prometheus.target( + 'up{instance="$instance",replica="$replica"}', + legendFormat='{{instance}}', + ) +) diff --git a/dashboards/gerrit/overview/panels/availability.libsonnet b/dashboards/gerrit/overview/panels/availability.libsonnet new file mode 100644 index 0000000..58c16a2 --- /dev/null +++ b/dashboards/gerrit/overview/panels/availability.libsonnet @@ -0,0 +1,24 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; +local stat = grafana.singlestat; + +stat.new( + title='Gerrit Availability [last 24h]', + datasource='Prometheus', + colorBackground=true, + colors=[ + "red", + "orange", + "darkgreen", + ], + format='percent', + thresholds='98, 99', + valueFontSize='150%', + valueName='current', +) +.addTarget( + prometheus.target( + 'avg_over_time(up{instance="$instance",replica="$replica"}[1d])*100', + legendFormat='{{instance}}', + ) +) diff --git a/dashboards/gerrit/overview/panels/cpu-usage.libsonnet b/dashboards/gerrit/overview/panels/cpu-usage.libsonnet new file mode 100644 index 0000000..5d2efa9 --- /dev/null +++ b/dashboards/gerrit/overview/panels/cpu-usage.libsonnet @@ -0,0 +1,30 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; +local gauge = grafana.gaugePanel; + +gauge.new( + title='CPU Usage', + datasource='Prometheus', +) +.addTarget( + target=prometheus.target( + '(rate(proc_cpu_usage{instance="$instance",replica="$replica"}[2m])/proc_cpu_num_cores{instance="$instance",replica="$replica"})*100', + legendFormat=' ', + intervalFactor=1, + instant=true, + ), +) +.addThresholds([ + { + color: 'green', + value: null + }, + { + color: 'orange', + value: 60 + }, + { + color: 'red', + value: 90 + } +]) diff --git a/dashboards/gerrit/overview/panels/events.libsonnet b/dashboards/gerrit/overview/panels/events.libsonnet new file mode 100644 index 0000000..0c6982c --- /dev/null +++ b/dashboards/gerrit/overview/panels/events.libsonnet @@ -0,0 +1,37 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; + +local barGraph = import '../../../globals/bar-graph.libsonnet'; +local yAxis = import '../../../globals/yaxis.libsonnet'; + +local events = [ + 'assignee_changed', + 'change_abandoned', + 'change_merged', + 'comment_added', + 'patchset_created', + 'change_abandoned', + 'ref_replicated', + 'ref_updated', + 'reviewer_added', + 'reviewer_deleted', + 'topic_changed', + 'vote_deleted', + 'wip_state_changed', +]; + +barGraph.new( + title='Gerrit Events (last 5 min)', + yAxis1=yAxis.new(label='Count [5 min]'), + x_axis_mode='series', + x_axis_values='current', + legend=false, +) +.addTargets([ + prometheus.target( + std.format('increase(events_%s_total{instance="$instance",replica="$replica"}[5m])', event), + legendFormat=std.strReplace(event, '_', ' '), + intervalFactor=1, + instant=true, + ) for event in events +]) diff --git a/dashboards/gerrit/overview/panels/git-fetch-clone.libsonnet b/dashboards/gerrit/overview/panels/git-fetch-clone.libsonnet new file mode 100644 index 0000000..26cf592 --- /dev/null +++ b/dashboards/gerrit/overview/panels/git-fetch-clone.libsonnet @@ -0,0 +1,26 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; + +local barGraph = import '../../../globals/bar-graph.libsonnet'; +local yAxis = import '../../../globals/yaxis.libsonnet'; + +local actions = [ + 'FETCH', + 'CLONE' +]; + +barGraph.new( + title='Git Fetch/Clone upload-pack requests (last 5 min)', + yAxis1=yAxis.new(label='Count [5 min]'), + x_axis_mode='series', + x_axis_values='current', + legend=false, +) +.addTargets([ + prometheus.target( + std.format('increase(git_upload_pack_request_count_%s_total{instance="$instance",replica="$replica"}[5m])', action), + legendFormat=action, + intervalFactor=1, + instant=true, + ) for action in actions +]) diff --git a/dashboards/gerrit/overview/panels/heap-usage.libsonnet b/dashboards/gerrit/overview/panels/heap-usage.libsonnet new file mode 100644 index 0000000..1ec6a64 --- /dev/null +++ b/dashboards/gerrit/overview/panels/heap-usage.libsonnet @@ -0,0 +1,30 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; +local gauge = grafana.gaugePanel; + +gauge.new( + title='Heap Memory Usage', + datasource='Prometheus', +) +.addTarget( + target=prometheus.target( + '(proc_jvm_memory_heap_used{instance="$instance",replica="$replica"}/proc_jvm_memory_heap_committed{instance="$instance",replica="$replica"})*100', + legendFormat=' ', + intervalFactor=1, + instant=true, + ), +) +.addThresholds([ + { + color: 'green', + value: null + }, + { + color: 'orange', + value: 60 + }, + { + color: 'red', + value: 90 + } +]) diff --git a/dashboards/gerrit/overview/panels/http-responses.libsonnet b/dashboards/gerrit/overview/panels/http-responses.libsonnet new file mode 100644 index 0000000..cd3486f --- /dev/null +++ b/dashboards/gerrit/overview/panels/http-responses.libsonnet @@ -0,0 +1,92 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; + +local barGraph = import '../../../globals/bar-graph.libsonnet'; +local yAxis = import '../../../globals/yaxis.libsonnet'; + +local responses = { + success: [200, 201, 204, 301, 304], + err: [400, 401, 403, 404, 405, 409, 412, 422, 500, 501, 503], +}; + +barGraph.new( + title='HTTP response status', + yAxis1=yAxis.new(label='Count'), + stack=true, +) +.addTargets([ + prometheus.target( + std.format('(increase(http_server_success_count_%d_total{instance="$instance",replica="$replica"}[2m]))/2', response), + legendFormat=std.format('%d', response), + intervalFactor=1, + ) for response in responses.success +]) +.addTargets([ + prometheus.target( + std.format('(increase(http_server_error_count_%d_total{instance="$instance",replica="$replica"}[2m]))/2', response), + legendFormat=std.format('%d', response), + intervalFactor=1, + ) for response in responses.err +]) +.addSeriesOverride({ + alias: '200', + color: '#37872D' +}) +.addSeriesOverride({ + alias: '201', + color: '#56A64B' +}) +.addSeriesOverride({ + alias: '204', + color: '#73BF69' +}) +.addSeriesOverride({ + alias: '301', + color: 'rgb(110, 210, 110)' +}) +.addSeriesOverride({ + alias: '304', + color: 'rgb(150, 225, 150)' +}) +.addSeriesOverride({ + alias: '400', + color: '#FA6400' +}) +.addSeriesOverride({ + alias: '401', + color: '#FF780A', + hiddenSeries: true +}) +.addSeriesOverride({ + alias: '403', + color: '#FF9830' +}) +.addSeriesOverride({ + alias: '404', + color: '#FFB357', + hiddenSeries: true +}) +.addSeriesOverride({ + alias: '409', + color: '#FFCB7D' +}) +.addSeriesOverride({ + alias: '412', + color: '#E0B400' +}) +.addSeriesOverride({ + alias: '422', + color: '#F2CC0C' +}) +.addSeriesOverride({ + alias: '500', + color: '#C4162A' +}) +.addSeriesOverride({ + alias: '501', + color: '#E02F44' +}) +.addSeriesOverride({ + alias: '503', + color: '#F2495C' +}) diff --git a/dashboards/gerrit/overview/panels/request-errors.libsonnet b/dashboards/gerrit/overview/panels/request-errors.libsonnet new file mode 100644 index 0000000..dfef6e3 --- /dev/null +++ b/dashboards/gerrit/overview/panels/request-errors.libsonnet @@ -0,0 +1,33 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; +local gauge = grafana.gaugePanel; + +gauge.new( + title='HTTP Request Error Rate (last 5 min)', + datasource='Prometheus', + description='Excludes 404 and 401, since these error codes are caused by client behaviour and are overrepresented in the data.', + min=0, + max=100, +) +.addTarget( + target=prometheus.target( + '(increase(http_server_error_count_total_total{instance="$instance",replica="$replica"}[5m]) - increase(http_server_error_count_404_total{instance=\"$instance\",replica=\"$replica\"}[5m]) - increase(http_server_error_count_401_total{instance=\"$instance\",replica=\"$replica\"}[5m])) / (increase(http_server_success_count_total_total{instance=\"$instance\",replica=\"$replica\"}[5m]) + increase(http_server_error_count_total_total{instance=\"$instance\",replica=\"$replica\"}[5m]) - increase(http_server_error_count_404_total{instance=\"$instance\",replica=\"$replica\"}[5m]) - increase(http_server_error_count_401_total{instance="$instance",replica="$replica"}[5m]))*100', + legendFormat=' ', + intervalFactor=1, + instant=true, + ), +) +.addThresholds([ + { + color: 'green', + value: null + }, + { + color: 'orange', + value: 5 + }, + { + color: 'red', + value: 10 + } +]) diff --git a/dashboards/gerrit/overview/panels/rest-latency.libsonnet b/dashboards/gerrit/overview/panels/rest-latency.libsonnet new file mode 100644 index 0000000..c10caf2 --- /dev/null +++ b/dashboards/gerrit/overview/panels/rest-latency.libsonnet @@ -0,0 +1,29 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; +local gauge = grafana.gaugePanel; + +gauge.new( + title='REST API latency (0.99 quantile)', + datasource='Prometheus', + unit='ms', + min=0, + max=50, +) +.addTarget( + target=prometheus.target( + 'http_server_rest_api_server_latency_total{quantile="0.99", instance="$instance",replica="$replica"}', + legendFormat=' ', + intervalFactor=1, + instant=true, + ), +) +.addThresholds([ + { + color: 'green', + value: null + }, + { + color: 'red', + value: 30 + } +]) diff --git a/dashboards/gerrit/overview/panels/threads.libsonnet b/dashboards/gerrit/overview/panels/threads.libsonnet new file mode 100644 index 0000000..b8671c3 --- /dev/null +++ b/dashboards/gerrit/overview/panels/threads.libsonnet @@ -0,0 +1,36 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; +local gauge = grafana.barGaugePanel; + +gauge.new( + title='Live Threads', + datasource='Prometheus', + thresholds=[{ + color: 'green', + value: null, + }], +) +.addTarget( + target=prometheus.target( + 'proc_jvm_thread_num_daemon_live{instance="$instance",replica="$replica"}', + legendFormat='current (daemon)', + intervalFactor=1, + instant=true, + ), +) +.addTarget( + target=prometheus.target( + 'proc_jvm_thread_num_live{instance="$instance",replica="$replica"}', + legendFormat='current (total)', + intervalFactor=1, + instant=true, + ), +) +.addTarget( + target=prometheus.target( + 'proc_jvm_thread_num_peak_live{instance="$instance",replica="$replica"}', + legendFormat='peak', + intervalFactor=1, + instant=true, + ), +) diff --git a/dashboards/gerrit/overview/panels/version-table.libsonnet b/dashboards/gerrit/overview/panels/version-table.libsonnet new file mode 100644 index 0000000..4980980 --- /dev/null +++ b/dashboards/gerrit/overview/panels/version-table.libsonnet @@ -0,0 +1,59 @@ +local grafana = import '../../../../vendor/grafonnet/grafana.libsonnet'; +local prometheus = grafana.prometheus; +local table = grafana.tablePanel; + +table.new( + title='Gerrit Version', + datasource='Prometheus', + transform='table', + transparent=false, +) +.addTarget( + prometheus.target( + 'max(gerrit_build_info{instance="$instance",replica="$replica"}) by (instance, version, revision, javaversion)', + instant=true, + format='table', + ) +) +.addColumn( + field='instance', + style={ + alias: 'Gerrit instance', + pattern: 'instance', + type: 'string', + link: true, + linkTargetBlank: true, + linkUrl: 'https://${__cell:raw}', + linkTooltip: 'Link to the Gerrit instance', + }, +) +.addColumn( + field='version', + style={ + alias: 'Gerrit version', + pattern: 'version', + type: 'string', + }, +) +.addColumn( + field='revision', + style={ + alias: 'Gerrit revision', + pattern: 'revision', + type: 'string', + link: true, + linkTargetBlank: true, + linkUrl: 'https://gerrit.googlesource.com/gerrit/+/${__cell:raw}', + linkTooltip: 'Browse Gerrit repository at revision', + }, +) +.addColumn( + field='javaversion', + style={ + alias: 'Java version', + pattern: 'javaversion', + type: 'string', + }, +) +.hideColumn('Time') +.hideColumn('Value') diff --git a/dashboards/globals/bar-graph.libsonnet b/dashboards/globals/bar-graph.libsonnet index 4cd7b65..d02143f 100644 --- a/dashboards/globals/bar-graph.libsonnet +++ b/dashboards/globals/bar-graph.libsonnet @@ -9,6 +9,9 @@ local yAxis = import './yaxis.libsonnet'; title, yAxis1, yAxis2=yAxis.new(), + x_axis_mode='time', + x_axis_values='total', + legend=true, min=null, max=null, stack=false, @@ -20,11 +23,14 @@ local yAxis = import './yaxis.libsonnet'; labelY2=yAxis2.label, formatY2=yAxis2.format, logBase2Y=yAxis2.logBase, + x_axis_mode=x_axis_mode, + x_axis_values=x_axis_values, min=min, max=max, stack=stack, datasource=defaults.datasource, fill=1, + legend_show=legend, legend_alignAsTable=true, legend_avg=true, legend_current=true, diff --git a/dashboards/globals/grid_pos.libsonnet b/dashboards/globals/grid_pos.libsonnet index dcc0cd0..d374cc8 100644 --- a/dashboards/globals/grid_pos.libsonnet +++ b/dashboards/globals/grid_pos.libsonnet @@ -8,12 +8,13 @@ local DEFAULT_HEIGHT = 11; row, column, total_columns=2, + height=DEFAULT_HEIGHT ):: { local width = TOTAL_WIDTH / total_columns, x: column * width, - y: row * DEFAULT_HEIGHT, + y: row * height, w: width, - h: DEFAULT_HEIGHT, + h: height, }, } diff --git a/dashboards/globals/line-graph.libsonnet b/dashboards/globals/line-graph.libsonnet index eb531f3..295152f 100644 --- a/dashboards/globals/line-graph.libsonnet +++ b/dashboards/globals/line-graph.libsonnet @@ -9,6 +9,7 @@ local yAxis = import './yaxis.libsonnet'; title, yAxis1, yAxis2=yAxis.new(), + legend=true, min=null, max=null, stack=false, @@ -26,6 +27,7 @@ local yAxis = import './yaxis.libsonnet'; stack=stack, datasource=defaults.datasource, fill=fill, + legend_show=legend, legend_alignAsTable=true, legend_avg=true, legend_current=true, diff --git a/jsonnetfile.lock.json b/jsonnetfile.lock.json index b754ac2..0012766 100644 --- a/jsonnetfile.lock.json +++ b/jsonnetfile.lock.json @@ -8,8 +8,8 @@ "subdir": "grafonnet" } }, - "version": "3336c69715f8f7a4d637582504c9fabd9d9ca081", - "sum": "w6zS28Rjs9EzRN/WoLLIdi028BvumxDTyLefYVoql2k=" + "version": "cc1626a1b4dee45c99b78ddd9714dfd5f5d7816e", + "sum": "nkgrtMYPCq/YB4r3mKyToepaLhicwWnxDdGIodPpzz0=" } ], "legacyImports": false