diff --git a/dashboards/Experimental/databases_overview.json b/dashboards/Experimental/databases_overview.json index 73c1c1f1dd..d46fe76b10 100644 --- a/dashboards/Experimental/databases_overview.json +++ b/dashboards/Experimental/databases_overview.json @@ -1,247 +1,189 @@ { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "grafana", - "uid": "-- Grafana --" - }, - "enable": true, - "hide": true, - "iconColor": "rgba(0, 211, 255, 1)", - "name": "Annotations & Alerts", - "target": { - "limit": 100, - "matchAny": false, - "tags": [], + "annotations": { + "list": [ + { + "builtIn": 1, + "datasource": { + "type": "grafana", + "uid": "-- Grafana --" + }, + "enable": true, + "hide": true, + "iconColor": "rgba(0, 211, 255, 1)", + "name": "Annotations & Alerts", + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": true, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "id": 78, - "links": [ - { - "asDropdown": false, - "icon": "doc", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": false, - "title": "Home", - "tooltip": "", - "type": "link", - "url": "/graph/d/pmm-home/home-dashboard" - }, - { - "asDropdown": false, - "icon": "dashboard", - "includeVars": true, - "keepTime": true, - "tags": [], - "targetBlank": false, - "title": "Query Analytics", - "tooltip": "", - "type": "link", - "url": "/graph/d/pmm-qan/pmm-query-analytics" - }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": true, - "tags": [ - "Services" - ], - "targetBlank": false, - "title": "Services", - "tooltip": "", - "type": "dashboards", - "url": "" + } + ] }, - { - "asDropdown": true, - "icon": "external link", - "includeVars": false, - "keepTime": true, - "tags": [ - "PMM" - ], - "targetBlank": false, - "title": "PMM", - "tooltip": "", - "type": "dashboards", - "url": "" - } - ], - "liveNow": false, - "panels": [ - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" + "editable": true, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "id": 78, + "links": [ + { + "asDropdown": false, + "icon": "doc", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": false, + "title": "Home", + "tooltip": "", + "type": "link", + "url": "/graph/d/pmm-home/home-dashboard" }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 0 + { + "asDropdown": false, + "icon": "dashboard", + "includeVars": true, + "keepTime": true, + "tags": [], + "targetBlank": false, + "title": "Query Analytics", + "tooltip": "", + "type": "link", + "url": "/graph/d/pmm-qan/pmm-query-analytics" }, - "id": 1083, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "
${srvcnt} ${service_type}
Databases monitored
", - "mode": "html" + { + "asDropdown": true, + "icon": "external link", + "includeVars": false, + "keepTime": true, + "tags": [ + "Services" + ], + "targetBlank": false, + "title": "Services", + "tooltip": "", + "type": "dashboards", + "url": "" }, - "pluginVersion": "9.2.20", - "transparent": true, - "type": "text" - }, - { - "datasource": { - "type": "grafana-clickhouse-datasource", - "uid": "PDEE91DDB90597936" + { + "asDropdown": true, + "icon": "external link", + "includeVars": false, + "keepTime": true, + "tags": [ + "PMM" + ], + "targetBlank": false, + "title": "PMM", + "tooltip": "", + "type": "dashboards", + "url": "" + } + ], + "liveNow": false, + "panels": [ + { + "gridPos": { + "h": 3, + "w": 5, + "x": 0, + "y": 0 + }, + "id": 1083, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "
${srvcnt} ${service_type}
Databases monitored
", + "mode": "html" + }, + "pluginVersion": "9.2.20", + "transparent": true, + "type": "text" }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "super-light-yellow", - "mode": "palette-classic" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 31, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "lineInterpolation": "smooth", - "lineStyle": { - "fill": "solid" + { + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "super-light-yellow", + "mode": "palette-classic" }, - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 31, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": true, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, - "showPoints": "auto", - "spanNulls": true, - "stacking": { - "group": "A", - "mode": "none" + "decimals": 2, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] + "unit": "s" }, - "unit": "s" + "overrides": [] }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 10, - "x": 5, - "y": 0 - }, - "id": 1077, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Last *", - "sortDesc": true + "gridPos": { + "h": 10, + "w": 10, + "x": 5, + "y": 0 }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "9.2.20", - "targets": [ - { - "builderOptions": { - "database": "pmm", - "fields": [], - "filters": [ - { - "condition": "AND", - "filterType": "custom", - "key": "period_start", - "operator": "WITH IN DASHBOARD TIME RANGE", - "restrictToFields": [ - { - "label": "period_start", - "name": "period_start", - "picklistValues": [], - "type": "DateTime" - } - ], - "type": "datetime" - } - ], - "groupBy": [ - "period_start", - "service_name" + "id": 1077, + "options": { + "legend": { + "calcs": [ + "lastNotNull" ], - "limit": 10000, - "metrics": [ - { - "aggregation": "avg", - "alias": "\"Execution time\"", - "field": "m_query_time_sum" - } - ], - "mode": "aggregate", - "orderBy": [ - { - "dir": "ASC", - "name": "period_start" - } - ], - "table": "metrics", - "timeField": "period_start", - "timeFieldType": "DateTime" - }, - "datasource": { - "type": "grafana-clickhouse-datasource", - "uid": "PDEE91DDB90597936" - }, - "format": 0, - "hide": true, - "meta": { + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "9.2.20", + "targets": [ + { "builderOptions": { "database": "pmm", "fields": [], @@ -284,495 +226,434 @@ "table": "metrics", "timeField": "period_start", "timeFieldType": "DateTime" - } - }, - "queryType": "sql", - "rawSql": "SELECT period_start, service_name, avg(m_query_time_sum) \"Execution_time\" FROM pmm.\"metrics\" WHERE ( period_start >= $__fromTime AND period_start <= $__toTime ) and service_type like '%$service_type%' GROUP BY period_start, service_name ORDER BY period_start ASC LIMIT 10000", - "refId": "A", - "selectedFormat": 0 - }, - { - "datasource": { - "type": "grafana-clickhouse-datasource", - "uid": "PDEE91DDB90597936" - }, - "hide": false, - "meta": { - "builderOptions": { - "fields": [], - "limit": 100, - "mode": "list" - } + }, + "format": 0, + "hide": true, + "meta": { + "builderOptions": { + "database": "pmm", + "fields": [], + "filters": [ + { + "condition": "AND", + "filterType": "custom", + "key": "period_start", + "operator": "WITH IN DASHBOARD TIME RANGE", + "restrictToFields": [ + { + "label": "period_start", + "name": "period_start", + "picklistValues": [], + "type": "DateTime" + } + ], + "type": "datetime" + } + ], + "groupBy": [ + "period_start", + "service_name" + ], + "limit": 10000, + "metrics": [ + { + "aggregation": "avg", + "alias": "\"Execution time\"", + "field": "m_query_time_sum" + } + ], + "mode": "aggregate", + "orderBy": [ + { + "dir": "ASC", + "name": "period_start" + } + ], + "table": "metrics", + "timeField": "period_start", + "timeFieldType": "DateTime" + } + }, + "queryType": "sql", + "rawSql": "SELECT period_start, service_name, avg(m_query_time_sum) \"Execution_time\" FROM pmm.\"metrics\" WHERE ( period_start >= $__fromTime AND period_start <= $__toTime ) and service_type like '%$service_type%' GROUP BY period_start, service_name ORDER BY period_start ASC LIMIT 10000", + "refId": "A", + "selectedFormat": 0 }, - "queryType": "sql", - "rawSql": "SELECT period_start, service_name, avg(m_query_time_sum/m_query_time_cnt) \"Execution_time\"\nFROM pmm.\"metrics\" WHERE ( period_start >= $__fromTime AND period_start <= $__toTime ) and service_type like '%$service_type%' GROUP BY period_start, service_name ORDER BY period_start ASC ", - "refId": "B" - } - ], - "title": "Execution time", - "transformations": [], - "transparent": true, - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" + { + "hide": false, + "meta": { + "builderOptions": { + "fields": [], + "limit": 100, + "mode": "list" + } + }, + "queryType": "sql", + "rawSql": "SELECT period_start, service_name, avg(m_query_time_sum/m_query_time_cnt) \"Execution_time\"\nFROM pmm.\"metrics\" WHERE ( period_start >= $__fromTime AND period_start <= $__toTime ) and service_type like '%$service_type%' GROUP BY period_start, service_name ORDER BY period_start ASC ", + "refId": "B" + } + ], + "title": "Execution time", + "transformations": [], + "transparent": true, + "type": "timeseries" }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "purple", - "mode": "continuous-BlYlRd" - }, - "custom": { - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "drawStyle": "line", - "fillOpacity": 15, - "gradientMode": "opacity", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + { + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "purple", + "mode": "continuous-BlYlRd" }, - "lineInterpolation": "smooth", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "custom": { + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "drawStyle": "line", + "fillOpacity": 15, + "gradientMode": "opacity", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "lineInterpolation": "smooth", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } }, - "showPoints": "auto", - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "decimals": 1, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "blue", + "value": null + } + ] }, - "thresholdsStyle": { - "mode": "off" - } + "unit": "short" }, - "decimals": 1, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "blue", - "value": null - } - ] - }, - "unit": "short" + "overrides": [] }, - "overrides": [] - }, - "gridPos": { - "h": 10, - "w": 9, - "x": 15, - "y": 0 - }, - "id": 1085, - "options": { - "legend": { - "calcs": [ - "lastNotNull" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Last *", - "sortDesc": true + "gridPos": { + "h": 10, + "w": 9, + "x": 15, + "y": 0 }, - "tooltip": { - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "9.2.20", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" - }, - "editorMode": "code", - "expr": "topk(5, avg by (service_name) (irate(mysql_global_status_questions{service_type=~\"$service_type\"})))", - "legendFormat": "__auto", - "range": true, - "refId": "A" + "id": 1085, + "options": { + "legend": { + "calcs": [ + "lastNotNull" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true, + "sortBy": "Last *", + "sortDesc": true + }, + "tooltip": { + "mode": "multi", + "sort": "desc" + } }, - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" + "pluginVersion": "9.2.20", + "targets": [ + { + "editorMode": "code", + "expr": "topk(5, avg by (service_name) (irate(mysql_global_status_questions{service_type=~\"$service_type\"})))", + "legendFormat": "__auto", + "range": true, + "refId": "A" }, - "editorMode": "code", - "expr": "topk(5, avg by (service_name) (rate(pg_stat_database_xact_commit{service_type=~\"$service_type\"}[$interval])))", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "B" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" + { + "editorMode": "code", + "expr": "topk(5, avg by (service_name) (rate(pg_stat_database_xact_commit{service_type=~\"$service_type\"}[$interval])))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "B" }, - "editorMode": "code", - "expr": "topk(5, avg by (service_name) (rate(mongodb_op_counters_total{service_type=~\"$service_type\",type!=\"command\"}[$interval])))", - "hide": false, - "legendFormat": "__auto", - "range": true, - "refId": "C" - } - ], - "title": "Executed Queries", - "transformations": [], - "transparent": true, - "type": "timeseries" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" - }, - "description": "*Not real time. QAN is expected to have some minutes of lag", - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 3 + { + "editorMode": "code", + "expr": "topk(5, avg by (service_name) (rate(mongodb_op_counters_total{service_type=~\"$service_type\",type!=\"command\"}[$interval])))", + "hide": false, + "legendFormat": "__auto", + "range": true, + "refId": "C" + } + ], + "title": "Executed Queries", + "transformations": [], + "transparent": true, + "type": "timeseries" }, - "id": 1079, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false + { + "description": "*Not real time. QAN is expected to have some minutes of lag", + "gridPos": { + "h": 3, + "w": 5, + "x": 0, + "y": 3 }, - "content": "
${slowq} Queries slower than ${qthres} sec(s) in the last ${rangeCustom} minutes*\n
", - "mode": "html" - }, - "pluginVersion": "9.2.20", - "transparent": true, - "type": "text" - }, - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" - }, - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "dark-blue", - "mode": "fixed" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - }, - "unit": "s" + "id": 1079, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "
${slowq} Queries slower than ${qthres} sec(s) in the last ${rangeCustom} minutes*\n
", + "mode": "html" }, - "overrides": [] - }, - "gridPos": { - "h": 4, - "w": 5, - "x": 0, - "y": 6 + "pluginVersion": "9.2.20", + "transparent": true, + "type": "text" }, - "id": 1087, - "options": { - "displayMode": "basic", - "minVizHeight": 10, - "minVizWidth": 0, - "orientation": "horizontal", - "reduceOptions": { - "calcs": [ - "min" - ], - "fields": "", - "values": false - }, - "showUnfilled": true - }, - "pluginVersion": "9.2.20", - "targets": [ - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" + { + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "dark-blue", + "mode": "fixed" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + }, + "unit": "s" }, - "editorMode": "code", - "exemplar": false, - "expr": "bottomk(3,range_last(mysql_global_status_uptime{service_type=\"$service_type\"}[30s]))", - "format": "time_series", - "hide": false, - "instant": false, - "legendFormat": "{{service_name}}", - "range": true, - "refId": "A" + "overrides": [] }, - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" - }, - "editorMode": "code", - "expr": "bottomk(3,range_last(pg_postmaster_uptime_seconds{service_type=\"$service_type\"}[30s]))", - "hide": false, - "legendFormat": "{{service_name}}", - "range": true, - "refId": "B" + "gridPos": { + "h": 4, + "w": 5, + "x": 0, + "y": 6 }, - { - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" - }, - "editorMode": "code", - "expr": "bottomk(3,range_last(mongodb_instance_uptime_seconds{service_type=\"$service_type\"}[30s]))", - "hide": false, - "legendFormat": "{{service_name}}", - "range": true, - "refId": "C" - } - ], - "title": "Lowest Uptime (top 3)", - "transparent": true, - "type": "bargauge" - }, - { - "datasource": { - "type": "grafana-clickhouse-datasource", - "uid": "PDEE91DDB90597936" - }, - "fieldConfig": { - "defaults": { - "color": { - "mode": "continuous-GrYlRd" - }, - "custom": { - "align": "auto", - "displayMode": "auto", - "inspect": false + "id": 1087, + "options": { + "displayMode": "basic", + "minVizHeight": 10, + "minVizWidth": 0, + "orientation": "horizontal", + "reduceOptions": { + "calcs": [ + "min" + ], + "fields": "", + "values": false }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": null - } - ] - } + "showUnfilled": true }, - "overrides": [ + "pluginVersion": "9.2.20", + "targets": [ { - "matcher": { - "id": "byName", - "options": "time" - }, - "properties": [ - { - "id": "custom.width", - "value": 202 - }, - { - "id": "custom.displayMode", - "value": "color-background-solid" - }, - { - "id": "custom.align", - "value": "center" - } - ] + "editorMode": "code", + "exemplar": false, + "expr": "bottomk(3,range_last(mysql_global_status_uptime{service_type=\"$service_type\"}[30s]))", + "format": "time_series", + "hide": false, + "instant": false, + "legendFormat": "{{service_name}}", + "range": true, + "refId": "A" }, { - "matcher": { - "id": "byName", - "options": "Service" - }, - "properties": [ - { - "id": "custom.width", - "value": 220 - }, - { - "id": "custom.align", - "value": "center" - }, - { - "id": "custom.filterable", - "value": true - } - ] + "editorMode": "code", + "expr": "bottomk(3,range_last(pg_postmaster_uptime_seconds{service_type=\"$service_type\"}[30s]))", + "hide": false, + "legendFormat": "{{service_name}}", + "range": true, + "refId": "B" }, { - "matcher": { - "id": "byName", - "options": "Query" + "editorMode": "code", + "expr": "bottomk(3,range_last(mongodb_instance_uptime_seconds{service_type=\"$service_type\"}[30s]))", + "hide": false, + "legendFormat": "{{service_name}}", + "range": true, + "refId": "C" + } + ], + "title": "Lowest Uptime (top 3)", + "transparent": true, + "type": "bargauge" + }, + { + "fieldConfig": { + "defaults": { + "color": { + "mode": "continuous-GrYlRd" }, - "properties": [ - { - "id": "custom.inspect", - "value": true + "custom": { + "align": "auto", + "displayMode": "auto", + "inspect": false + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": null + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "time" }, - { - "id": "custom.width", - "value": 832 + "properties": [ + { + "id": "custom.width", + "value": 202 + }, + { + "id": "custom.displayMode", + "value": "color-background-solid" + }, + { + "id": "custom.align", + "value": "center" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Service" }, - { - "id": "custom.filterable", - "value": true - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Execution_time" + "properties": [ + { + "id": "custom.width", + "value": 220 + }, + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.filterable", + "value": true + } + ] }, - "properties": [ - { - "id": "custom.align", - "value": "center" + { + "matcher": { + "id": "byName", + "options": "Query" }, - { - "id": "custom.displayMode", - "value": "basic" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "fingerprint" + "properties": [ + { + "id": "custom.inspect", + "value": true + }, + { + "id": "custom.width", + "value": 832 + }, + { + "id": "custom.filterable", + "value": true + } + ] }, - "properties": [ - { - "id": "custom.width", - "value": 704 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "username" + { + "matcher": { + "id": "byName", + "options": "Execution_time" + }, + "properties": [ + { + "id": "custom.align", + "value": "center" + }, + { + "id": "custom.displayMode", + "value": "basic" + } + ] }, - "properties": [ - { - "id": "custom.width", - "value": 86 - } - ] - } - ] - }, - "gridPos": { - "h": 10, - "w": 24, - "x": 0, - "y": 10 - }, - "id": 1065, - "options": { - "footer": { - "enablePagination": true, - "fields": "", - "reducer": [ - "sum" - ], - "show": false - }, - "showHeader": true, - "sortBy": [ - { - "desc": true, - "displayName": "Execution_time" - } - ] - }, - "pluginVersion": "9.2.20", - "targets": [ - { - "builderOptions": { - "database": "pmm", - "fields": [ - "fingerprint", - "service_name" - ], - "filters": [ - { - "condition": "AND", - "filterType": "custom", - "key": "period_start", - "operator": "WITH IN DASHBOARD TIME RANGE", - "restrictToFields": [ - { - "label": "period_start", - "name": "period_start", - "picklistValues": [], - "type": "DateTime" - } - ], - "type": "datetime" + { + "matcher": { + "id": "byName", + "options": "fingerprint" }, - { - "condition": "AND", - "filterType": "custom", - "key": "service_type", - "operator": "LIKE", - "type": "LowCardinality(String)", - "value": "$service_type" - } - ], - "groupBy": [ - "period_start", - "service_name", - "fingerprint", - "m_query_time_sum" - ], - "limit": 10, - "metrics": [ - { - "aggregation": "avg", - "alias": "\"Execution time\"", - "field": "m_query_time_sum" - } - ], - "mode": "trend", - "orderBy": [ - { - "dir": "ASC", - "name": "period_start" - } + "properties": [ + { + "id": "custom.width", + "value": 704 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "username" + }, + "properties": [ + { + "id": "custom.width", + "value": 86 + } + ] + } + ] + }, + "gridPos": { + "h": 10, + "w": 24, + "x": 0, + "y": 10 + }, + "id": 1065, + "options": { + "footer": { + "enablePagination": true, + "fields": "", + "reducer": [ + "sum" ], - "table": "metrics", - "timeField": "period_start", - "timeFieldType": "DateTime" + "show": false }, - "datasource": { - "type": "grafana-clickhouse-datasource", - "uid": "PDEE91DDB90597936" - }, - "format": 1, - "hide": false, - "meta": { + "showHeader": true, + "sortBy": [ + { + "desc": true, + "displayName": "Execution_time" + } + ] + }, + "pluginVersion": "9.2.20", + "targets": [ + { "builderOptions": { "database": "pmm", "fields": [ @@ -828,272 +709,315 @@ "table": "metrics", "timeField": "period_start", "timeFieldType": "DateTime" - } - }, - "queryType": "sql", - "rawSql": "SELECT $__timeInterval(period_start) as time, service_name \"Service\", username, fingerprint \"Query\", avg(m_query_time_sum/m_query_time_cnt) \"Execution_time\" FROM pmm.\"metrics\" WHERE ( period_start >= $__fromTime AND period_start <= $__toTime ) AND ( service_type LIKE '%$service_type%' ) GROUP BY service_name, username, fingerprint , m_query_time_sum, time ORDER BY time DESC LIMIT 10000", - "refId": "A", - "selectedFormat": 1 - } - ], - "title": "Queries", - "transformations": [], - "transparent": true, - "type": "table" - } - ], - "refresh": "30s", - "schemaVersion": 37, - "style": "dark", - "tags": [], - "templating": { - "list": [ - { - "allFormat": "glob", - "auto": true, - "auto_count": 200, - "auto_min": "1s", - "current": { - "selected": false, - "text": "auto", - "value": "$__auto_interval_interval" - }, - "datasource": "Metrics", - "hide": 0, - "includeAll": false, - "label": "Interval", - "multi": false, - "multiFormat": "glob", - "name": "interval", - "options": [ - { - "selected": true, - "text": "auto", - "value": "$__auto_interval_interval" - }, - { - "selected": false, - "text": "1s", - "value": "1s" - }, - { - "selected": false, - "text": "5s", - "value": "5s" - }, - { - "selected": false, - "text": "1m", - "value": "1m" - }, - { - "selected": false, - "text": "5m", - "value": "5m" - }, - { - "selected": false, - "text": "1h", - "value": "1h" - }, - { - "selected": false, - "text": "6h", - "value": "6h" - }, - { - "selected": false, - "text": "1d", - "value": "1d" + }, + "format": 1, + "hide": false, + "meta": { + "builderOptions": { + "database": "pmm", + "fields": [ + "fingerprint", + "service_name" + ], + "filters": [ + { + "condition": "AND", + "filterType": "custom", + "key": "period_start", + "operator": "WITH IN DASHBOARD TIME RANGE", + "restrictToFields": [ + { + "label": "period_start", + "name": "period_start", + "picklistValues": [], + "type": "DateTime" + } + ], + "type": "datetime" + }, + { + "condition": "AND", + "filterType": "custom", + "key": "service_type", + "operator": "LIKE", + "type": "LowCardinality(String)", + "value": "$service_type" + } + ], + "groupBy": [ + "period_start", + "service_name", + "fingerprint", + "m_query_time_sum" + ], + "limit": 10, + "metrics": [ + { + "aggregation": "avg", + "alias": "\"Execution time\"", + "field": "m_query_time_sum" + } + ], + "mode": "trend", + "orderBy": [ + { + "dir": "ASC", + "name": "period_start" + } + ], + "table": "metrics", + "timeField": "period_start", + "timeFieldType": "DateTime" + } + }, + "queryType": "sql", + "rawSql": "SELECT $__timeInterval(period_start) as time, service_name \"Service\", username, fingerprint \"Query\", avg(m_query_time_sum/m_query_time_cnt) \"Execution_time\" FROM pmm.\"metrics\" WHERE ( period_start >= $__fromTime AND period_start <= $__toTime ) AND ( service_type LIKE '%$service_type%' ) GROUP BY service_name, username, fingerprint , m_query_time_sum, time ORDER BY time DESC LIMIT 10000", + "refId": "A", + "selectedFormat": 1 } ], - "query": "1s,5s,1m,5m,1h,6h,1d", - "queryValue": "", - "refresh": 2, - "skipUrlSync": false, - "type": "interval" - }, - { - "current": { - "selected": false, - "text": "mysql", - "value": "mysql" - }, - "datasource": { - "type": "prometheus", - "uid": "PA58DA793C7250F1B" - }, - "definition": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, service_type)", - "hide": 0, - "includeAll": false, - "label": "Engine", - "multi": false, - "name": "service_type", - "options": [], - "query": { - "query": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, service_type)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "/.*^(mysql|postgresql|mongodb)/", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": true, - "text": "0.100", - "value": "0.100" - }, - "hide": 0, - "includeAll": false, - "label": "Query Time", - "multi": false, - "name": "qthres", - "options": [ - { + "title": "Queries", + "transformations": [], + "transparent": true, + "type": "table" + } + ], + "refresh": "30s", + "schemaVersion": 37, + "style": "dark", + "tags": [], + "templating": { + "list": [ + { + "allFormat": "glob", + "auto": true, + "auto_count": 200, + "auto_min": "1s", + "current": { "selected": false, - "text": "0.001", - "value": "0.001" + "text": "auto", + "value": "$__auto_interval_interval" }, - { + "datasource": "Metrics", + "hide": 0, + "includeAll": false, + "label": "Interval", + "multi": false, + "multiFormat": "glob", + "name": "interval", + "options": [ + { + "selected": true, + "text": "auto", + "value": "$__auto_interval_interval" + }, + { + "selected": false, + "text": "1s", + "value": "1s" + }, + { + "selected": false, + "text": "5s", + "value": "5s" + }, + { + "selected": false, + "text": "1m", + "value": "1m" + }, + { + "selected": false, + "text": "5m", + "value": "5m" + }, + { + "selected": false, + "text": "1h", + "value": "1h" + }, + { + "selected": false, + "text": "6h", + "value": "6h" + }, + { + "selected": false, + "text": "1d", + "value": "1d" + } + ], + "query": "1s,5s,1m,5m,1h,6h,1d", + "queryValue": "", + "refresh": 2, + "skipUrlSync": false, + "type": "interval" + }, + { + "current": { "selected": false, - "text": "0.010", - "value": "0.010" - }, - { + "text": "mysql", + "value": "mysql" + }, + "definition": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, service_type)", + "hide": 0, + "includeAll": false, + "label": "Engine", + "multi": false, + "name": "service_type", + "options": [], + "query": { + "query": "label_values({__name__=~\"pg_up|mysql_up|mongodb_up|proxysql_mysql_status_active_transactions\"}, service_type)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "/.*^(mysql|postgresql|mongodb)/", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { "selected": true, "text": "0.100", "value": "0.100" }, - { + "hide": 0, + "includeAll": false, + "label": "Query Time", + "multi": false, + "name": "qthres", + "options": [ + { + "selected": false, + "text": "0.001", + "value": "0.001" + }, + { + "selected": false, + "text": "0.010", + "value": "0.010" + }, + { + "selected": true, + "text": "0.100", + "value": "0.100" + }, + { + "selected": false, + "text": "1", + "value": "1" + }, + { + "selected": false, + "text": "10", + "value": "10" + } + ], + "query": "0.001,0.010,0.100,1,10", + "queryValue": "", + "skipUrlSync": false, + "type": "custom" + }, + { + "current": { "selected": false, - "text": "1", - "value": "1" - }, - { + "text": "151", + "value": "151" + }, + "definition": "SELECT count(*)\n FROM pmm.metrics\n WHERE service_type = '${service_type}'\n AND ( period_start >= $__fromTime AND period_start <= $__toTime )\n AND m_query_time_sum/m_query_time_cnt > ${qthres}", + "hide": 2, + "includeAll": false, + "label": "slowq", + "multi": false, + "name": "slowq", + "options": [], + "query": "SELECT count(*)\n FROM pmm.metrics\n WHERE service_type = '${service_type}'\n AND ( period_start >= $__fromTime AND period_start <= $__toTime )\n AND m_query_time_sum/m_query_time_cnt > ${qthres}", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + }, + { + "current": { "selected": false, "text": "10", "value": "10" - } - ], - "query": "0.001,0.010,0.100,1,10", - "queryValue": "", - "skipUrlSync": false, - "type": "custom" - }, - { - "current": { - "selected": false, - "text": "151", - "value": "151" - }, - "datasource": { - "type": "grafana-clickhouse-datasource", - "uid": "PDEE91DDB90597936" - }, - "definition": "SELECT count(*)\n FROM pmm.metrics\n WHERE service_type = '${service_type}'\n AND ( period_start >= $__fromTime AND period_start <= $__toTime )\n AND m_query_time_sum/m_query_time_cnt > ${qthres}", - "hide": 2, - "includeAll": false, - "label": "slowq", - "multi": false, - "name": "slowq", - "options": [], - "query": "SELECT count(*)\n FROM pmm.metrics\n WHERE service_type = '${service_type}'\n AND ( period_start >= $__fromTime AND period_start <= $__toTime )\n AND m_query_time_sum/m_query_time_cnt > ${qthres}", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "10", - "value": "10" - }, - "datasource": { - "type": "postgres", - "uid": "PCC52D03280B7034C" - }, - "definition": "select count(*) from services where service_type = '${service_type}';", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "srvcnt", - "options": [], - "query": "select count(*) from services where service_type = '${service_type}';", - "refresh": 1, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - }, - { - "current": { - "selected": false, - "text": "15", - "value": "15" - }, - "datasource": { - "type": "grafana-clickhouse-datasource", - "uid": "PDEE91DDB90597936" + }, + "definition": "select count(*) from services where service_type = '${service_type}';", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "srvcnt", + "options": [], + "query": "select count(*) from services where service_type = '${service_type}';", + "refresh": 1, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" }, - "definition": "select ($__toTime - $__fromTime)/60", - "hide": 2, - "includeAll": false, - "multi": false, - "name": "rangeCustom", - "options": [], - "query": "select ($__toTime - $__fromTime)/60", - "refresh": 2, - "regex": "", - "skipUrlSync": false, - "sort": 0, - "type": "query" - } - ] - }, - "time": { - "from": "now-15m", - "to": "now" - }, - "timepicker": { - "collapse": false, - "enable": true, - "hidden": false, - "notice": false, - "now": true, - "refresh_intervals": [ - "5s", - "10s", - "30s", - "1m", - "5m", - "15m", - "30m", - "1h", - "2h", - "1d" - ], - "status": "Stable", - "time_options": [ - "5m", - "15m", - "1h", - "6h", - "12h", - "24h", - "2d", - "7d", - "30d" - ], - "type": "timepicker" - }, - "timezone": "", - "title": "Databases Overview", - "uid": "ywQr8WtSk", - "version": 33, - "weekStart": "" -} + { + "current": { + "selected": false, + "text": "15", + "value": "15" + }, + "definition": "select ($__toTime - $__fromTime)/60", + "hide": 2, + "includeAll": false, + "multi": false, + "name": "rangeCustom", + "options": [], + "query": "select ($__toTime - $__fromTime)/60", + "refresh": 2, + "regex": "", + "skipUrlSync": false, + "sort": 0, + "type": "query" + } + ] + }, + "time": { + "from": "now-15m", + "to": "now" + }, + "timepicker": { + "collapse": false, + "enable": true, + "hidden": false, + "notice": false, + "now": true, + "refresh_intervals": [ + "5s", + "10s", + "30s", + "1m", + "5m", + "15m", + "30m", + "1h", + "2h", + "1d" + ], + "status": "Stable", + "time_options": [ + "5m", + "15m", + "1h", + "6h", + "12h", + "24h", + "2d", + "7d", + "30d" + ], + "type": "timepicker" + }, + "timezone": "", + "title": "Databases Overview", + "uid": "database-overview", + "version": 33, + "weekStart": "" + }