diff --git a/dashboards/dashboards/PMM Health/PMM_Health.json b/dashboards/dashboards/PMM Health/PMM_Health.json index ce9a1903e4b..0f04f162cde 100644 --- a/dashboards/dashboards/PMM Health/PMM_Health.json +++ b/dashboards/dashboards/PMM Health/PMM_Health.json @@ -1,7929 +1,9737 @@ { - "annotations": { - "list": [ - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": false, - "iconColor": "#e0752d", - "limit": 100, - "matchAny": true, - "name": "PMM Annotations", - "showIn": 0, - "tags": [ - "pmm_annotation", - "$service_name" - ], - "target": { - "limit": 100, - "matchAny": true, - "tags": [ - "pmm_annotation", - "$service_name" - ], - "type": "tags" - }, - "type": "tags" - }, - { - "builtIn": 1, - "datasource": { - "type": "datasource", - "uid": "grafana" - }, - "enable": true, - "hide": true, - "iconColor": "#6ed0e0", - "limit": 100, - "name": "Annotations & Alerts", - "showIn": 0, - "tags": [], - "target": { - "limit": 100, - "matchAny": false, - "tags": [], - "type": "dashboard" - }, - "type": "dashboard" - } - ] - }, - "editable": false, - "fiscalYearStartMonth": 0, - "graphTooltip": 1, - "links": [], - "panels": [ - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 0 - }, - "id": 1054, - "panels": [], - "title": "Summary", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "Is the PMM Core component up and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "annotations": { + "list": [ { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 1 - }, - "id": 1086, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"pmm-managed\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "ManageD Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Is VM UP and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": false, + "iconColor": "#e0752d", + "limit": 100, + "matchAny": true, + "name": "PMM Annotations", + "showIn": 0, + "tags": [ + "pmm_annotation", + "$service_name" + ], + "target": { + "limit": 100, + "matchAny": true, + "tags": [ + "pmm_annotation", + "$service_name" + ], + "type": "tags" + }, + "type": "tags" + }, { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" + "builtIn": 1, + "datasource": { + "type": "datasource", + "uid": "grafana" + }, + "enable": true, + "hide": true, + "iconColor": "#6ed0e0", + "limit": 100, + "name": "Annotations & Alerts", + "showIn": 0, + "tags": [], + "target": { + "limit": 100, + "matchAny": false, + "tags": [], + "type": "dashboard" + }, + "type": "dashboard" } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 4, - "y": 1 - }, - "id": 1088, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"victoriametrics\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "VictoriaMetrics Status", - "type": "stat" + ] }, - { - "datasource": "Metrics", - "description": "Is PostgreSQL UP and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 1 - }, - "id": 1089, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ + "description": "", + "editable": false, + "fiscalYearStartMonth": 0, + "graphTooltip": 1, + "links": [], + "panels": [ { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "min by(service_name) (up{service_name=\"pmm-server-postgresql\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "PostgreSQL Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Is the PMM Core element up and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 0 + }, + "id": 1054, + "panels": [ + { + "datasource": "Metrics", + "description": "Is the PMM Core element up and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 1 + }, + "id": 1086, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"pmm-managed\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "ManageD Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Is VM UP and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 1 + }, + "id": 1088, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"victoriametrics\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "VictoriaMetrics Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Is PostgreSQL UP and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 1 + }, + "id": 1089, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "min by(service_name) (up{service_name=\"pmm-server-postgresql\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "PostgreSQL Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Is the PMM Core element up and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 1 + }, + "id": 1085, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"qan-api2\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "QAN API Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Is Grafana UP and running", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 1 + }, + "id": 1087, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"grafana\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Grafana Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Is Node UP and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 1 + }, + "id": 1090, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "min by(node_name) (up{ node_name=\"pmm-server\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Node Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Is the PMM Core element up and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 1 + }, + "id": 1091, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"clickhouse\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Clickhouse Status", + "type": "stat" } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 1 - }, - "id": 1085, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 + ], + "title": "Summary", + "type": "row" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"qan-api2\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "QAN API Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Is Grafana UP and running", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 1 + }, + "id": 291, + "panels": [ + { + "datasource": "Metrics", + "description": "The parameter shows how long a system has been “up” and running without a shut down or restart.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "rgba(245, 54, 54, 0.9)", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 300 + }, + { + "color": "rgba(50, 172, 45, 0.97)", + "value": 3600 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 0, + "y": 2 + }, + "id": 321, + "interval": "$interval", + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "calculatedInterval": "10m", + "datasource": "Metrics", + "datasourceErrors": {}, + "errors": {}, + "expr": "avg by (node_name) ((node_time_seconds{node_name=~\"$node_name\"} - node_boot_time_seconds{node_name=~\"$node_name\"}) or (time() - node_boot_time_seconds{node_name=~\"$node_name\"}))", + "format": "time_series", + "interval": "5m", + "intervalFactor": 1, + "legendFormat": "", + "metric": "", + "refId": "A", + "step": 300 + } + ], + "title": "System Uptime", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "The system load is a measurement of the computational work the system is performing. Each running process either using or waiting for CPU resources adds 1 to the load.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 10 + }, + { + "color": "#d44a3a", + "value": 20 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 3, + "y": 2 + }, + "id": 323, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (node_name) (avg_over_time(node_load1{node_name=~\"$node_name\"}[$interval]) or avg_over_time(node_load1{node_name=~\"$node_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Load Average", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "RAM (Random Access Memory) is the hardware in a computing device where the operating system, application programs and data in current use are kept so they can be quickly reached by the device's processor.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 6, + "y": 2 + }, + "id": 327, + "interval": "$interval", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (node_name) (node_memory_MemTotal_bytes{node_name=~\"$node_name\"})", + "format": "time_series", + "interval": "5m", + "intervalFactor": 1, + "refId": "A", + "step": 300 + } + ], + "title": "RAM", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Percent of Memory Available\nNote: on Modern Linux Kernels amount of Memory Available for application is not the same as Free+Cached+Buffers", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 5 + }, + { + "color": "#299c46", + "value": 10 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 9, + "y": 2 + }, + "id": 329, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (node_name) ((node_memory_MemAvailable_bytes{node_name=~\"$node_name\"} or (node_memory_MemFree_bytes{node_name=~\"$node_name\"} + node_memory_Buffers_bytes{node_name=~\"$node_name\"} + node_memory_Cached_bytes{node_name=~\"$node_name\"})) / node_memory_MemTotal_bytes{node_name=~\"$node_name\"} * 100)", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Memory Available", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "RAM + SWAP", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 2 + }, + "id": 331, + "interval": "$interval", + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (node_name) (node_memory_MemTotal_bytes{node_name=~\"$node_name\"}+node_memory_SwapTotal_bytes{node_name=~\"$node_name\"})", + "format": "time_series", + "interval": "5m", + "intervalFactor": 1, + "refId": "A", + "step": 300 + } + ], + "title": "Virtual Memory", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Sum of disk space on all partitions. Note it can be significantly over-reported in some installations", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 2 + }, + "id": 333, + "interval": "$interval", + "links": [ + { + "targetBlank": true, + "title": "Disk Space", + "url": "/graph/d/node-disk/disk-details?$__url_time_range&$__all_variables" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (node_name) (sum(avg(node_filesystem_size_bytes{node_name=~\"$node_name\",fstype=~\"(ext.|xfs|vfat|)\"}) without (mountpoint)) without (device,fstype))", + "format": "time_series", + "interval": "5m", + "intervalFactor": 1, + "refId": "A", + "step": 300 + } + ], + "title": "Disk Space", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Lowest percent of the disk space available", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 5 + }, + { + "color": "#299c46", + "value": 20 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 2 + }, + "id": 335, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "min(node_filesystem_free_bytes{node_name=~\"$node_name\", fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|shm|overlay|squashfs\"}/node_filesystem_size_bytes{node_name=~\"$node_name\", fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|shm|overlay|squashfs\"})*100", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Min Space Available", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 2 + }, + "id": 1002, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "
$node_name
", + "mode": "html" + }, + "pluginVersion": "12.4.5", + "title": "Node", + "type": "text" + }, + { + "datasource": "Metrics", + "description": "The CPU time is measured in clock ticks or seconds. It is useful to measure CPU time as a percentage of the CPU's capacity, which is called the CPU usage.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 60, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "max": 100, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Max Core Utilization" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "idle" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#806EB7", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "iowait" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E24D42", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "nice" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#1F78C1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "softirq" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#FFF899", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "steal" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#8F3BB8", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "system" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EAB839", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "user" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#508642", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Max Core Utilization" + }, + "properties": [ + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.pointSize", + "value": 4 + }, + { + "id": "custom.showPoints", + "value": "always" + }, + { + "id": "custom.stacking", + "value": { + "group": false, + "mode": "normal" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 83 + }, + "id": 337, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (node_name,mode) (clamp_max(((avg by (mode) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\"}[5m]),1)) ))*100 or (avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode!=\"total\", mode!=\"idle\"}[$interval]) or avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode!=\"total\", mode!=\"idle\"}[5m]))),100))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{ mode }}", + "refId": "B" + }, + { + "datasource": "Metrics", + "expr": "clamp_max(max by () (sum by (cpu) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[5m]),1)) )),1)", + "format": "time_series", + "hide": true, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Max Core Utilization", + "refId": "C" + } + ], + "title": "CPU Usage", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "When a system is running with maximum CPU utilization, the transmitting and receiving threads must all share the available CPU. This will cause data to be queued more frequently to cope with the lack of CPU. CPU Saturation may be measured as the length of a wait queue, or the time spent waiting on the queue.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Allocated" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#E0752D", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "CPU Load" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#64B0C8", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "IO Load " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#EA6460", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Limit" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#1F78C1", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Max CPU Core Utilization" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Max Core Usage" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Normalized CPU Load" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#6ED0E0", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Max CPU Core Utilization" + }, + "properties": [ + { + "id": "custom.lineWidth", + "value": 0 + }, + { + "id": "custom.pointSize", + "value": 4 + }, + { + "id": "custom.showPoints", + "value": "always" + }, + { + "id": "unit", + "value": "percentunit" + }, + { + "id": "max", + "value": 1 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 83 + }, + "id": 339, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "calculatedInterval": "2s", + "datasource": "Metrics", + "datasourceErrors": {}, + "errors": {}, + "expr": "avg by (node_name) ((avg_over_time(node_procs_running{node_name=~\"$node_name\"}[$interval])-1) / scalar(count(node_cpu_seconds_total{mode=\"user\", node_name=~\"$node_name\"})) or (avg_over_time(node_procs_running{node_name=~\"$node_name\"}[5m])-1) / scalar(count(node_cpu_seconds_total{mode=\"user\", node_name=~\"$node_name\"})))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Normalized CPU Load", + "metric": "", + "refId": "B", + "step": 300, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasource": "Metrics", + "datasourceErrors": {}, + "errors": {}, + "expr": "clamp_max(max by () (sum by (cpu) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[5m]),1)) )),1)", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Max CPU Core Utilization", + "metric": "", + "refId": "A", + "step": 300, + "target": "" + } + ], + "title": "CPU Saturation and Max Core Usage", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Disk I/O includes read or write or input/output operations involving a physical disk. It is the speed with which the data transfer takes place between the hard disk drive and RAM.\n\nSwap Activity is memory management that involves swapping sections of memory to and from physical storage.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Page Out (-) / Page In (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Swap In (Reads)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#6ed0e0", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Swap Out (Writes)" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#ef843c", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Disk Writes (Page Out)" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total" + }, + "properties": [ + { + "id": "custom.lineWidth", + "value": 0 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Swap Out (Writes)" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 91 + }, + "id": 341, + "links": [ + { + "targetBlank": true, + "title": "Disk Performance", + "url": "/graph/d/node-disk/disk-details?$__url_time_range&$__all_variables" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "calculatedInterval": "2s", + "datasource": "Metrics", + "datasourceErrors": {}, + "errors": {}, + "expr": "avg by (node_name) (rate(node_vmstat_pgpgin{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{node_name=\"$node_name\"}[5m]) * 1024)", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Disk Reads (Page In)", + "metric": "", + "refId": "A", + "step": 300, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasource": "Metrics", + "datasourceErrors": {}, + "errors": {}, + "expr": "avg by (node_name) ((rate(node_vmstat_pgpgout{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{node_name=\"$node_name\"}[5m]) * 1024))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Disk Writes (Page Out)", + "metric": "", + "refId": "B", + "step": 300, + "target": "" + }, + { + "datasource": "Metrics", + "expr": "avg by (node_name) ((rate(node_vmstat_pgpgin{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{node_name=\"$node_name\"}[5m]) * 1024 ) + (rate(node_vmstat_pgpgout{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{node_name=\"$node_name\"}[5m]) * 1024))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Total", + "refId": "C" + }, + { + "datasource": "Metrics", + "expr": "avg by (node_name) (rate(node_vmstat_pswpin{node_name=\"$node_name\"}[$interval]) * 4096 or irate(node_vmstat_pswpin{node_name=\"$node_name\"}[5m]) * 4096)", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Swap In (Reads)", + "refId": "D" + }, + { + "datasource": "Metrics", + "expr": "avg by (node_name) (rate(node_vmstat_pswpout{node_name=\"$node_name\"}[$interval]) * 4096 or irate(node_vmstat_pswpout{node_name=\"$node_name\"}[5m]) * 4096)", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Swap Out (Writes)", + "refId": "E" + } + ], + "title": "Disk I/O and Swap Activity", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Network traffic refers to the amount of data moving across a network at a given point in time.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "Outbound (-) / Inbound (+)", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "Bps" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Outbound" + }, + "properties": [ + { + "id": "custom.transform", + "value": "negative-Y" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 91 + }, + "id": 343, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "calculatedInterval": "2s", + "datasource": "Metrics", + "datasourceErrors": {}, + "errors": {}, + "expr": "avg by (node_name) (sum(rate(node_network_receive_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[$interval])) or sum(irate(node_network_receive_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[5m])) or sum(max_over_time(rdsosmetrics_network_rx{node_name=\"$node_name\"}[$interval])) or sum(max_over_time(rdsosmetrics_network_rx{node_name=\"$node_name\"}[5m])))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Inbound", + "metric": "", + "refId": "B", + "step": 300, + "target": "" + }, + { + "calculatedInterval": "2s", + "datasource": "Metrics", + "datasourceErrors": {}, + "errors": {}, + "expr": "avg by (node_name) (sum(rate(node_network_transmit_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[$interval])) or sum(irate(node_network_transmit_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[5m])) or\nsum(max_over_time(rdsosmetrics_network_tx{node_name=\"$node_name\"}[$interval])) or sum(max_over_time(rdsosmetrics_network_tx{node_name=\"$node_name\"}[5m])))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Outbound", + "metric": "", + "refId": "A", + "step": 300, + "target": "" + } + ], + "title": "Network Traffic", + "type": "timeseries" } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } + ], + "title": "Node Summary", + "type": "row" }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 1 - }, - "id": 1087, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"grafana\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Grafana Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Is Node UP and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 2 + }, + "id": 1070, + "panels": [ + { + "datasource": "Metrics", + "description": "Is the PMM Core element up and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 3 + }, + "id": 1071, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"qan-api2\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "QAN API Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Enqueued Collect requests.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 3 + }, + "id": 1080, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "qan_api2_data_ingestion_requests_len{job=\"qan-api2\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Ingestion Queue", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Maximum number of Collect requests that can be enqueued.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 3 + }, + "id": 1078, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "titleSize": 2 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "qan_api2_data_ingestion_requests_cap{job=\"qan-api2\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Ingestions cap ", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "The number of metric buckets per ClickHouse batch with Errors ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 3 + }, + "id": 1082, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "rate(qan_api2_data_ingestion_buckets_per_batch_sum{job=\"qan-api2\", error=\"1\"}[$__interval])", + "legendFormat": "{{quantile}}", + "range": true, + "refId": "A" + } + ], + "title": "Ingestion buckets with Errors", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Time to save a batch into QAN DB with Errors ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 3 + }, + "id": 1081, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "rate(qan_api2_data_ingestion_batch_save_seconds_sum{job=\"qan-api2\", error=\"1\"}[$__interval])", + "legendFormat": "{{quantile}}", + "range": true, + "refId": "A" + } + ], + "title": "Batch save duration with Errors", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Average user and system CPU time spent in seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 84 + }, + "id": 1072, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg(rate(process_cpu_seconds_total{job=\"qan-api2\"}[$__interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "CPU Time", + "range": true, + "refId": "A" + } + ], + "title": "Average CPU Usage", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Virtual and Resident memory size in bytes, averages over 5 min interval", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 84 + }, + "id": 1058, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg(rate(process_resident_memory_bytes{job=\"qan-api2\"}[$__interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Resident Mem", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg(rate(process_virtual_memory_bytes{job=\"qan-api2\"}[$__interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Virtual Mem", + "range": true, + "refId": "B" + } + ], + "title": "Average Memory Usage", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Time to save a batch into QAN DB", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 92 + }, + "id": 1075, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "qan_api2_data_ingestion_batch_save_seconds{job=\"qan-api2\", error=\"0\"}", + "legendFormat": "{{quantile}}", + "range": true, + "refId": "A" + } + ], + "title": "Batch save duration", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "The number of metric buckets per ClickHouse batch.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 92 + }, + "id": 1077, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "qan_api2_data_ingestion_buckets_per_batch{job=\"qan-api2\", error=\"0\"}", + "legendFormat": "{{quantile}}", + "range": true, + "refId": "A" + } + ], + "title": "Buckets per Batch", + "type": "timeseries" } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 1 - }, - "id": 1090, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ], + "title": "QAN API", + "type": "row" }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "editorMode": "code", - "expr": "min by(node_name) (up{node_name=\"pmm-server\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Node Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Is the PMM Core element up and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 21, - "y": 1 - }, - "id": 1091, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 3 + }, + "id": 1056, + "panels": [], + "title": "PMM ManageD", + "type": "row" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"clickhouse\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Clickhouse Status", - "type": "stat" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 4 - }, - "id": 291, - "panels": [], - "title": "Node Summary", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "The parameter shows how long a system has been “up” and running without a shut down or restart.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "text", - "index": 0, - "text": "N/A" + "datasource": "Metrics", + "description": "Is the PMM Core element up and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 4 + }, + "id": 1045, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"pmm-managed\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 300 - }, - { - "color": "rgba(50, 172, 45, 0.97)", - "value": 3600 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 0, - "y": 5 - }, - "id": 321, - "interval": "$interval", - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ], + "title": "ManageD Status", + "transparent": true, + "type": "stat" }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "calculatedInterval": "10m", - "datasource": "Metrics", - "datasourceErrors": {}, - "errors": {}, - "expr": "avg by (node_name) ((node_time_seconds{node_name=~\"$node_name\"} - node_boot_time_seconds{node_name=~\"$node_name\"}) or (time() - node_boot_time_seconds{node_name=~\"$node_name\"}))", - "format": "time_series", - "interval": "5m", - "intervalFactor": 1, - "legendFormat": "", - "metric": "", - "refId": "A", - "step": 300 - } - ], - "title": "System Uptime", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The system load is a measurement of the computational work the system is performing. Each running process either using or waiting for CPU resources adds 1 to the load.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "Number of Advisors checks loaded in PMM ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 4 + }, + "id": 1060, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "sum(pmm_managed_advisor_checks_available{job=\"pmm-managed\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 10 - }, - { - "color": "#d44a3a", - "value": 20 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 3, - "y": 5 - }, - "id": 323, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Advisors checks", + "transparent": true, + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (node_name) (avg_over_time(node_load1{node_name=~\"$node_name\"}[$interval]) or avg_over_time(node_load1{node_name=~\"$node_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Load Average", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "RAM (Random Access Memory) is the hardware in a computing device where the operating system, application programs and data in current use are kept so they can be quickly reached by the device's processor.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "The current number of connected pmm-agents", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 4 + }, + "id": 1061, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "titleSize": 2 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "sum(pmm_managed_agents_connected{job=\"pmm-managed\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 6, - "y": 5 - }, - "id": 327, - "interval": "$interval", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Connected PMM Agents", + "transparent": true, + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (node_name) (node_memory_MemTotal_bytes{node_name=~\"$node_name\"})", - "format": "time_series", - "interval": "5m", - "intervalFactor": 1, - "refId": "A", - "step": 300 - } - ], - "title": "RAM", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Percent of Memory Available\nNote: on Modern Linux Kernels amount of Memory Available for application is not the same as Free+Cached+Buffers", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "The current number of connected pmm-agents", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 4 + }, + "id": 1062, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "titleSize": 2 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "count(pmm_managed_inventory_agents{job=\"pmm-managed\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 5 - }, - { - "color": "#299c46", - "value": 10 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 9, - "y": 5 - }, - "id": 329, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Connected Agents", + "transparent": true, + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (node_name) ((node_memory_MemAvailable_bytes{node_name=~\"$node_name\"} or (node_memory_MemFree_bytes{node_name=~\"$node_name\"} + node_memory_Buffers_bytes{node_name=~\"$node_name\"} + node_memory_Cached_bytes{node_name=~\"$node_name\"})) / node_memory_MemTotal_bytes{node_name=~\"$node_name\"} * 100)", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Memory Available", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "RAM + SWAP", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "The current number of Services in Inventory", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 4 + }, + "id": 1063, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "titleSize": 2 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "count(pmm_managed_inventory_services{job=\"pmm-managed\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 5 - }, - "id": 331, - "interval": "$interval", - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Monitored Services", + "transparent": true, + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (node_name) (node_memory_MemTotal_bytes{node_name=~\"$node_name\"}+node_memory_SwapTotal_bytes{node_name=~\"$node_name\"})", - "format": "time_series", - "interval": "5m", - "intervalFactor": 1, - "refId": "A", - "step": 300 - } - ], - "title": "Virtual Memory", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Sum of disk space on all partitions. Note it can be significantly over-reported in some installations", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "The current number of Nodes in Inventory", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 4 + }, + "id": 1064, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "titleSize": 2 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "count(pmm_managed_inventory_nodes{job=\"pmm-managed\"})", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 5 - }, - "id": 333, - "interval": "$interval", - "links": [ - { - "targetBlank": true, - "title": "Disk Space", - "url": "/graph/d/node-disk/disk-details?$__url_time_range&$__all_variables" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Monitored Nodes", + "transparent": true, + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (node_name) (sum(avg(node_filesystem_size_bytes{node_name=~\"$node_name\",fstype=~\"(ext.|xfs|vfat|)\"}) without (mountpoint)) without (device,fstype))", - "format": "time_series", - "interval": "5m", - "intervalFactor": 1, - "refId": "A", - "step": 300 - } - ], - "title": "Disk Space", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Lowest percent of the disk space available", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "The current runtime.GOMAXPROCS setting, or the number of operating system threads that can execute user-level Go code simultaneously.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 7 + }, + "id": 1120, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "go_sched_gomaxprocs_threads{job=\"pmm-managed\"}", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 5 - }, - { - "color": "#299c46", - "value": 20 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 5 - }, - "id": 335, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ], + "title": "GOMAXPROCS", + "transparent": true, + "type": "stat" }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "min(node_filesystem_free_bytes{node_name=~\"$node_name\", fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|shm|overlay|squashfs\"}/node_filesystem_size_bytes{node_name=~\"$node_name\", fstype!~\"rootfs|selinuxfs|autofs|rpc_pipefs|tmpfs|shm|overlay|squashfs\"})*100", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Min Space Available", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 21, - "y": 5 - }, - "id": 1002, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "
$node_name
", - "mode": "html" - }, - "pluginVersion": "12.4.3", - "title": "Node", - "type": "text" - }, - { - "datasource": "Metrics", - "description": "The CPU time is measured in clock ticks or seconds. It is useful to measure CPU time as a percentage of the CPU's capacity, which is called the CPU usage.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 60, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "Go runtime memory limit configured by the user, otherwise math.MaxInt64. This value is set by the GOMEMLIMIT environment variable.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 7 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" + "id": 1121, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "links": [], - "mappings": [], - "max": 100, - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "percent" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "go_gc_gomemlimit_bytes{job=\"pmm-managed\"}", + "instant": true, + "legendFormat": "__auto", + "range": false, + "refId": "A" + } + ], + "title": "GOMEMLIMIT", + "transparent": true, + "type": "stat" }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Max Core Utilization" + { + "datasource": "Metrics", + "description": "Average user and system CPU time spent in seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "idle" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 10 }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#806EB7", - "mode": "fixed" + "id": 1057, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "iowait" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#E24D42", - "mode": "fixed" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg(rate(process_cpu_seconds_total{job=\"pmm-managed\"}[$__interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "CPU Time", + "range": true, + "refId": "A" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "nice" + ], + "title": "Average CPU Usage", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Virtual and Resident memory size in bytes, averages over 5 min interval", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#1F78C1", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "softirq" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 10 }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#FFF899", - "mode": "fixed" + "id": 1073, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "steal" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#8F3BB8", - "mode": "fixed" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg_over_time(process_resident_memory_bytes{job=\"pmm-managed\"}[$__interval])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Resident Mem", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg_over_time(process_virtual_memory_bytes{job=\"pmm-managed\"}[$__interval])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Virtual Mem", + "range": true, + "refId": "B" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "system" + ], + "title": "Average Memory Usage", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Agents clock drift", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EAB839", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "user" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 18 }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#508642", - "mode": "fixed" + "id": 1068, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Max Core Utilization" }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.pointSize", - "value": 4 - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "custom.stacking", - "value": { - "group": false, - "mode": "normal" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "pmm_managed_agents_clock_drift_seconds{job=\"pmm-managed\"}", + "legendFormat": "{{quantile}}", + "range": true, + "refId": "A" } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 8 - }, - "id": 337, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true + ], + "title": "Clock drift", + "transparent": true, + "type": "timeseries" }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (node_name,mode) (clamp_max(((avg by (mode) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\"}[5m]),1)) ))*100 or (avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode!=\"total\", mode!=\"idle\"}[$interval]) or avg_over_time(node_cpu_average{node_name=~\"$node_name\", mode!=\"total\", mode!=\"idle\"}[5m]))),100))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{ mode }}", - "refId": "B" + "datasource": "Metrics", + "description": "Agents Round-trip time by Quantiles ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 18 + }, + "id": 1066, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "pmm_managed_agents_round_trip_seconds{job=\"pmm-managed\"}", + "legendFormat": "{{quantile}}", + "range": true, + "refId": "A" + } + ], + "title": "Round-trip time", + "transparent": true, + "type": "timeseries" }, { - "datasource": "Metrics", - "expr": "clamp_max(max by () (sum by (cpu) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[5m]),1)) )),1)", - "format": "time_series", - "hide": true, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Max Core Utilization", - "refId": "C" - } - ], - "title": "CPU Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "When a system is running with maximum CPU utilization, the transmitting and receiving threads must all share the available CPU. This will cause data to be queued more frequently to cope with the lack of CPU. CPU Saturation may be measured as the length of a wait queue, or the time spent waiting on the queue.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "If this number stays high and matches the latency spikes, the server is \"clogged.\" This usually happens when the upstream Grafana stops responding quickly, causing a backup of goroutines.\nIf type=\"db\" is high, PostgreSQL is slow (likely LBAC query contention).\nIf type=\"total\" is high but the others are low, the overhead is in the AuthServer logic or context switching.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 26 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "id": 1116, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "sum(irate(pmm_managed_auth_requests_total[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "requests", + "range": true, + "refId": "B" + } + ], + "title": "Incoming Auth Requests Rate", + "transparent": true, + "type": "timeseries" }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Allocated" + { + "datasource": "Metrics", + "description": "If type=\"grafana\" is high, Grafana is slow.\n\nIf type=\"db\" is high, DB is slow(check connection pool as well).\n\nIf type=\"total\" is high but the others are low, the overhead is in the AuthServer logic or context switching.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "request to grafana rate" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "custom.axisColorMode", + "value": "series" + }, + { + "id": "unit", + "value": "reqps" + }, + { + "id": "min", + "value": 0 + }, + { + "id": "color", + "value": { + "fixedColor": "blue", + "mode": "fixed" + } + } + ] + } + ] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#E0752D", - "mode": "fixed" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 26 + }, + "id": 1114, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "CPU Load" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#64B0C8", - "mode": "fixed" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "histogram_quantile(0.95, sum(irate(pmm_managed_auth_duration_seconds_bucket[$__rate_interval])) by (le, type))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{type}} latency", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "sum(irate(pmm_managed_auth_grafana_requests_total[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "request to grafana rate", + "range": true, + "refId": "B" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "IO Load " + ], + "title": "Auth Latency (95 percentile)", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "/auth_request http response status", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "fill": "solid" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#EA6460", - "mode": "fixed" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 34 + }, + "id": 1108, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Limit" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#1F78C1", - "mode": "fixed" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "sort_desc(sum(irate(pmm_managed_auth_requests_total[$__rate_interval])) by (status_code) )", + "format": "time_series", + "instant": false, + "intervalFactor": 2, + "legendFormat": "{{ status_code }}", + "range": true, + "refId": "A" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Max CPU Core Utilization" + ], + "title": "Auth Response Statuses Rate", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Grafana AuthUser response rate", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "reqps" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 34 }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" + "id": 1125, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Max Core Usage" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "sort_desc(sum(irate(pmm_managed_auth_grafana_requests_total[$__rate_interval])) by (status_code))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "{{ status_code }}", + "range": true, + "refId": "A" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Normalized CPU Load" + ], + "title": "Grafana Auth Response Rate", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Percentage of successful authentications.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6ED0E0", - "mode": "fixed" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 42 + }, + "id": 1126, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Max CPU Core Utilization" }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - }, - { - "id": "custom.pointSize", - "value": 4 - }, - { - "id": "custom.showPoints", - "value": "always" - }, - { - "id": "unit", - "value": "percentunit" - }, - { - "id": "max", - "value": 1 - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 8 - }, - "id": 339, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "sum(irate(pmm_managed_auth_requests_total{status_code=~\"2.*\"}[$__rate_interval])) / sum(irate(pmm_managed_auth_requests_total[$__rate_interval]))", + "format": "time_series", + "instant": false, + "intervalFactor": 2, + "legendFormat": "{{ status_code }}", + "range": true, + "refId": "A" + } + ], + "title": "Auth Success Ratio", + "transparent": true, + "type": "timeseries" }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ { - "calculatedInterval": "2s", - "datasource": "Metrics", - "datasourceErrors": {}, - "errors": {}, - "expr": "avg by (node_name) ((avg_over_time(node_procs_running{node_name=~\"$node_name\"}[$interval])-1) / scalar(count(node_cpu_seconds_total{mode=\"user\", node_name=~\"$node_name\"})) or (avg_over_time(node_procs_running{node_name=~\"$node_name\"}[5m])-1) / scalar(count(node_cpu_seconds_total{mode=\"user\", node_name=~\"$node_name\"})))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Normalized CPU Load", - "metric": "", - "refId": "B", - "step": 300, - "target": "" + "datasource": "Metrics", + "description": "/auth_request http response status", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "custom": { + "align": "left", + "cellOptions": { + "type": "auto" + }, + "filterable": true, + "footer": { + "reducers": [] + }, + "inspect": false, + "wrapHeaderText": false, + "wrapText": true + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + } + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "route" + }, + "properties": [ + { + "id": "custom.width", + "value": 719 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "method" + }, + "properties": [ + { + "id": "custom.width", + "value": 95 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Time" + }, + "properties": [ + { + "id": "custom.width", + "value": 198 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "status_code" + }, + "properties": [ + { + "id": "custom.width", + "value": 372 + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Value" + }, + "properties": [ + { + "id": "unit", + "value": "none" + }, + { + "id": "min", + "value": 0 + }, + { + "id": "custom.width", + "value": 133 + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 42 + }, + "id": 1117, + "options": { + "cellHeight": "sm", + "enablePagination": false, + "frozenColumns": {}, + "showHeader": true, + "sortBy": [] + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "sort_desc(sum by (method, route) (round(increase(pmm_managed_auth_requests_total[$__range]))))", + "format": "table", + "instant": true, + "intervalFactor": 1, + "legendFormat": "__auto", + "range": false, + "refId": "B" + } + ], + "title": "Total Auth Response per URI", + "transparent": true, + "type": "table" }, { - "calculatedInterval": "2s", - "datasource": "Metrics", - "datasourceErrors": {}, - "errors": {}, - "expr": "clamp_max(max by () (sum by (cpu) ( (clamp_max(rate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[$interval]),1)) or (clamp_max(irate(node_cpu_seconds_total{node_name=~\"$node_name\",mode!=\"idle\",mode!=\"iowait\"}[5m]),1)) )),1)", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Max CPU Core Utilization", - "metric": "", - "refId": "A", - "step": 300, - "target": "" - } - ], - "title": "CPU Saturation and Max Core Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Disk I/O includes read or write or input/output operations involving a physical disk. It is the speed with which the data transfer takes place between the hard disk drive and RAM.\n\nSwap Activity is memory management that involves swapping sections of memory to and from physical storage.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Page Out (-) / Page In (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "If this ratio drops, the server will melt because it's forced to make expensive Grafana calls for every request.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "max": 1, + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 50 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "id": 1109, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "sum(irate(pmm_managed_auth_cache_total{status=\"hit\"}[$__rate_interval])) / sum(irate(pmm_managed_auth_cache_total[$__rate_interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "rate", + "range": true, + "refId": "A" + } + ], + "title": "Auth cache hit rate", + "transparent": true, + "type": "timeseries" }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Swap In (Reads)" + { + "datasource": "Metrics", + "description": "If the cache is actually growing or if the invalidator is purging items too aggressively.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "fieldMinMax": false, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#6ed0e0", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Swap Out (Writes)" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 50 }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#ef843c", - "mode": "fixed" + "id": 1115, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Total" }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "pmm_managed_auth_cache_size", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Auth cache size", + "range": true, + "refId": "A" } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Disk Writes (Page Out)" + ], + "title": "Auth cache size", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Heap and sys allocations.\n\ngo_memstats_heap_alloc_bytes - Number of heap bytes allocated and currently in use.\n\ngo_memstats_heap_sys_bytes - Number of heap bytes obtained from system.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "series", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Heap Sys" + }, + "properties": [ + { + "id": "unit", + "value": "decbytes" + }, + { + "id": "custom.axisPlacement", + "value": "right" + } + ] + } + ] }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Total" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 58 }, - "properties": [ - { - "id": "custom.lineWidth", - "value": 0 - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Swap Out (Writes)" + "id": 1122, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 16 - }, - "id": 341, - "links": [ + "pluginVersion": "12.4.5", + "targets": [ + { + "editorMode": "code", + "expr": "go_memstats_heap_alloc_bytes{job=\"pmm-managed\"}", + "legendFormat": "Heap Alloc", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PA58DA793C7250F1B" + }, + "editorMode": "code", + "expr": "go_memstats_heap_sys_bytes{job=\"pmm-managed\"}", + "legendFormat": "Heap Sys", + "range": true, + "refId": "B" + } + ], + "title": "Memory", + "transparent": true, + "type": "timeseries" + }, { - "targetBlank": true, - "title": "Disk Performance", - "url": "/graph/d/node-disk/disk-details?$__url_time_range&$__all_variables" - } - ], - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "calculatedInterval": "2s", - "datasource": "Metrics", - "datasourceErrors": {}, - "errors": {}, - "expr": "avg by (node_name) (rate(node_vmstat_pgpgin{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{node_name=\"$node_name\"}[5m]) * 1024)", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Disk Reads (Page In)", - "metric": "", - "refId": "A", - "step": 300, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasource": "Metrics", - "datasourceErrors": {}, - "errors": {}, - "expr": "avg by (node_name) ((rate(node_vmstat_pgpgout{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{node_name=\"$node_name\"}[5m]) * 1024))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Disk Writes (Page Out)", - "metric": "", - "refId": "B", - "step": 300, - "target": "" - }, - { - "datasource": "Metrics", - "expr": "avg by (node_name) ((rate(node_vmstat_pgpgin{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgin{node_name=\"$node_name\"}[5m]) * 1024 ) + (rate(node_vmstat_pgpgout{node_name=\"$node_name\"}[$interval]) * 1024 or irate(node_vmstat_pgpgout{node_name=\"$node_name\"}[5m]) * 1024))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Total", - "refId": "C" - }, - { - "datasource": "Metrics", - "expr": "avg by (node_name) (rate(node_vmstat_pswpin{node_name=\"$node_name\"}[$interval]) * 4096 or irate(node_vmstat_pswpin{node_name=\"$node_name\"}[5m]) * 4096)", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Swap In (Reads)", - "refId": "D" - }, - { - "datasource": "Metrics", - "expr": "avg by (node_name) (rate(node_vmstat_pswpout{node_name=\"$node_name\"}[$interval]) * 4096 or irate(node_vmstat_pswpout{node_name=\"$node_name\"}[5m]) * 4096)", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Swap Out (Writes)", - "refId": "E" - } - ], - "title": "Disk I/O and Swap Activity", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Network traffic refers to the amount of data moving across a network at a given point in time.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "Outbound (-) / Inbound (+)", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "Bps" - }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Outbound" - }, - "properties": [ - { - "id": "custom.transform", - "value": "negative-Y" - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 16 - }, - "id": 343, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "calculatedInterval": "2s", - "datasource": "Metrics", - "datasourceErrors": {}, - "errors": {}, - "expr": "avg by (node_name) (sum(rate(node_network_receive_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[$interval])) or sum(irate(node_network_receive_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[5m])) or sum(max_over_time(rdsosmetrics_network_rx{node_name=\"$node_name\"}[$interval])) or sum(max_over_time(rdsosmetrics_network_rx{node_name=\"$node_name\"}[5m])))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Inbound", - "metric": "", - "refId": "B", - "step": 300, - "target": "" - }, - { - "calculatedInterval": "2s", - "datasource": "Metrics", - "datasourceErrors": {}, - "errors": {}, - "expr": "avg by (node_name) (sum(rate(node_network_transmit_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[$interval])) or sum(irate(node_network_transmit_bytes_total{node_name=\"$node_name\", device!=\"lo\"}[5m])) or\nsum(max_over_time(rdsosmetrics_network_tx{node_name=\"$node_name\"}[$interval])) or sum(max_over_time(rdsosmetrics_network_tx{node_name=\"$node_name\"}[5m])))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Outbound", - "metric": "", - "refId": "A", - "step": 300, - "target": "" - } - ], - "title": "Network Traffic", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 24 - }, - "id": 1070, - "panels": [], - "title": "QAN API", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "Is the PMM Core element up and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 0, - "y": 25 - }, - "id": 1071, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"qan-api2\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "QAN API Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Enqueued Collect requests.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 25 - }, - "id": 1080, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "qan_api2_data_ingestion_requests_len{job=\"qan-api2\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Ingestion Queue", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Maximum number of Collect requests that can be enqueued.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 12, - "y": 25 - }, - "id": 1078, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "qan_api2_data_ingestion_requests_cap{job=\"qan-api2\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Ingestions cap ", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The number of metric buckets per ClickHouse batch with Errors ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 25 - }, - "id": 1082, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "rate(qan_api2_data_ingestion_buckets_per_batch_sum{job=\"qan-api2\", error=\"1\"}[$__interval])", - "legendFormat": "{{quantile}}", - "range": true, - "refId": "A" - } - ], - "title": "Ingestion buckets with Errors", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Time to save a batch into QAN DB with Errors ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 25 - }, - "id": 1081, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "rate(qan_api2_data_ingestion_batch_save_seconds_sum{job=\"qan-api2\", error=\"1\"}[$__interval])", - "legendFormat": "{{quantile}}", - "range": true, - "refId": "A" - } - ], - "title": "Batch save duration with Errors", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Average user and system CPU time spent in seconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 28 - }, - "id": 1072, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_cpu_seconds_total{job=\"qan-api2\"}[$__interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "CPU Time", - "range": true, - "refId": "A" - } - ], - "title": "Average CPU Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Virtual and Resident memory size in bytes, averages over 5 min interval", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 28 - }, - "id": 1058, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_resident_memory_bytes{job=\"qan-api2\"}[$__interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Mem", - "range": true, - "refId": "A" - }, - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_virtual_memory_bytes{job=\"qan-api2\"}[$__interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Virtual Mem", - "range": true, - "refId": "B" - } - ], - "title": "Average Memory Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Time to save a batch into QAN DB", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 36 - }, - "id": 1075, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "qan_api2_data_ingestion_batch_save_seconds{job=\"qan-api2\", error=\"0\"}", - "legendFormat": "{{quantile}}", - "range": true, - "refId": "A" - } - ], - "title": "Batch save duration", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "The number of metric buckets per ClickHouse batch.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 36 - }, - "id": 1077, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "qan_api2_data_ingestion_buckets_per_batch{job=\"qan-api2\", error=\"0\"}", - "legendFormat": "{{quantile}}", - "range": true, - "refId": "A" - } - ], - "title": "Buckets per Batch", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 44 - }, - "id": 1056, - "panels": [], - "title": "PMM ManageD", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "Is the PMM Core element up and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 45 - }, - "id": 1045, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"pmm-managed\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "ManageD Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Number of Advisors checks loaded in PMM ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 4, - "y": 45 - }, - "id": 1060, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "value", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "sum(pmm_managed_advisor_checks_available{job=\"pmm-managed\"} or 0)", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Advisors checks", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The current number of connected pmm-agents", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 45 - }, - "id": 1061, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "sum(pmm_managed_agents_connected{job=\"pmm-managed\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Connected PMM Agents", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The current number of connected pmm-agents", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 12, - "y": 45 - }, - "id": 1062, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "count(pmm_managed_inventory_agents{job=\"pmm-managed\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Connected Agents", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The current number of Services in Inventory", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 45 - }, - "id": 1063, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "count(pmm_managed_inventory_services{job=\"pmm-managed\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Monitored Services", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The current number of Nodes in Inventory", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 45 - }, - "id": 1064, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "count(pmm_managed_inventory_nodes{job=\"pmm-managed\"})", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Monitored Nodes", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Average user and system CPU time spent in seconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 48 - }, - "id": 1057, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_cpu_seconds_total{job=\"pmm-managed\"}[$__interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "CPU Time", - "range": true, - "refId": "A" - } - ], - "title": "Average CPU Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Virtual and Resident memory size in bytes, averages over 5 min interval", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 48 - }, - "id": 1073, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_resident_memory_bytes{job=\"pmm-managed\"}[$__interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Mem", - "range": true, - "refId": "A" - }, - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_virtual_memory_bytes{job=\"pmm-managed\"}[5m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Virtual Mem", - "range": true, - "refId": "B" - } - ], - "title": "Average Memory Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Agents clock drift", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 56 - }, - "id": 1068, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "pmm_managed_agents_clock_drift_seconds{job=\"pmm-managed\"}", - "legendFormat": "{{quantile}}", - "range": true, - "refId": "A" - } - ], - "title": "Clock drift", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Agents Round-trip time by Quantiles ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 0, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "auto", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 56 - }, - "id": 1066, - "options": { - "legend": { - "calcs": [], - "displayMode": "list", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "single", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "pmm_managed_agents_round_trip_seconds{job=\"pmm-managed\"}", - "legendFormat": "{{quantile}}", - "range": true, - "refId": "A" - } - ], - "title": "Round-trip time", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 64 - }, - "id": 1033, - "panels": [], - "title": "Grafana", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "Is Grafana UP and running", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 0, - "y": 65 - }, - "id": 1059, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"grafana\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Grafana Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 6, - "x": 6, - "y": 65 - }, - "id": 1047, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "rate(grafana_database_conn_open[$__interval])", - "instant": false, - "legendFormat": "open conn", - "range": true, - "refId": "A" - } - ], - "title": "DB Open Connections", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "total amount of orgs", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 12, - "y": 65 - }, - "id": 1049, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "grafana_stat_total_orgs{instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "range": true, - "refId": "A" - } - ], - "title": "Organisations Count", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "total amount of users", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 15, - "y": 65 - }, - "id": 1029, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "last" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "grafana_stat_total_users", - "format": "time_series", - "intervalFactor": 2, - "range": true, - "refId": "A" - } - ], - "title": "User Count", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "total amount of folders", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 18, - "y": 65 - }, - "id": 1051, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "grafana_stat_totals_folder{instance=\"$instance\"}", - "format": "time_series", - "intervalFactor": 2, - "range": true, - "refId": "A" - } - ], - "title": "Folder Count", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "total amount of dashboards", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 3, - "x": 21, - "y": 65 - }, - "id": 1031, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "grafana_stat_totals_dashboard", - "format": "time_series", - "intervalFactor": 2, - "range": true, - "refId": "A" - } - ], - "title": "Dashboard Count", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Average user and system CPU time spent in seconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 68 - }, - "id": 1039, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_cpu_seconds_total{job=\"grafana\"}[$__interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "CPU Time", - "range": true, - "refId": "A" - } - ], - "title": "Average CPU Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Virtual and Resident memory size in bytes, averages over 5 min interval", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "decbytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 68 - }, - "id": 1037, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_resident_memory_bytes{job=\"grafana\"}[$__interval]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Resident Mem", - "range": true, - "refId": "A" - }, - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg(rate(process_virtual_memory_bytes{job=\"grafana\"}[5m]))", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Virtual Mem", - "range": true, - "refId": "B" - } - ], - "title": "Average Memory Usage", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "http response status", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 76 - }, - "id": 1041, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "rate(grafana_api_response_status_total[$__interval])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "API {{ code }}", - "range": true, - "refId": "A" - }, - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "rate(grafana_page_response_status_total[$__interval])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Page {{ code }}", - "range": true, - "refId": "B" - }, - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "rate(grafana_proxy_response_status_total[$__interval])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "Proxy {{ code }}", - "range": true, - "refId": "C" - } - ], - "title": "Total Response Statuses", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "api login counters", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 1, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 76 - }, - "id": 1043, - "options": { - "legend": { - "calcs": [ - "mean", - "lastNotNull", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true, - "sortBy": "Name", - "sortDesc": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "rate(grafana_api_login_post_total[$__interval])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "POST", - "range": true, - "refId": "A" - }, - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "rate(grafana_api_login_oauth_total[$__interval])", - "format": "time_series", - "intervalFactor": 2, - "legendFormat": "OAuth", - "range": true, - "refId": "B" - } - ], - "title": "Login Events", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 84 - }, - "id": 1009, - "panels": [], - "title": "Victoria Metrics", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "CPU Usage by VictoriaMetrics Process Only", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 50 - }, - { - "color": "#d44a3a", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 0, - "y": 85 - }, - "id": 1011, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "(sum(rate(process_cpu_seconds_total{job=\"$job\", instance=\"$instance\"}[$interval])) by () or sum(irate(process_cpu_seconds_total{job=\"$job\", instance=\"$instance\"}[5m])) by ()) / count(node_cpu_seconds_total{mode=\"user\", node_name=\"pmm-server\"})*100", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "CPU Usage", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Memory Allocated and In use by VictoriaMetrics Process Only", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 50 - }, - { - "color": "#d44a3a", - "value": 80 - } - ] - }, - "unit": "percent" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 5, - "y": 85 - }, - "id": 1013, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum(vm_cache_size_bytes{job=\"$job\", instance=\"$instance\"}) / max(vm_allowed_memory_bytes{job=\"$job\", instance=\"$instance\"})", - "format": "time_series", - "hide": true, - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - }, - { - "datasource": "Metrics", - "expr": "100*sum(go_memstats_alloc_bytes{job=\"$job\", instance=\"$instance\"}+go_memstats_stack_inuse_bytes{job=\"$job\", instance=\"$instance\"}) by () / \nsum(node_memory_MemTotal_bytes{node_name=\"pmm-server\"}) by ()", - "interval": "", - "legendFormat": "", - "refId": "B" - } - ], - "title": "Memory Usage", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Shows percent of occupied disk space by data points on the remaining disk space at `-storageDataPath`", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#299c46", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 50 - }, - { - "color": "#d44a3a", - "value": 80 - } - ] - }, - "unit": "percentunit" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 10, - "y": 85 - }, - "id": 1015, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum(vm_data_size_bytes{job=\"$job\", instance=~\"$instance\"}) / (sum(vm_data_size_bytes{job=\"$job\", instance=~\"$instance\"}) + vm_free_disk_space_bytes{job=\"$job\", instance=\"$instance\"})", - "format": "time_series", - "instant": false, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Value", - "refId": "A" - } - ], - "title": "Disk Usage", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "How many datapoints are in storage", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 15, - "y": 85 - }, - "id": 1017, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum(vm_rows{job=\"$job\", instance=~\"$instance\", type!=\"indexdb\"})", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Total Datapoints", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "How many entries inverted index contains. This value is proportional to the number of unique timeseries in storage(cardinality).", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" - } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 19, - "y": 85 - }, - "id": 1019, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum(vm_rows{job=\"$job\", instance=~\"$instance\", type=~\"indexdb.*\"})", - "format": "time_series", - "instant": false, - "interval": "", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Index Size", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "points", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "stepAfter", - "lineWidth": 2, - "pointSize": 4, - "scaleDistribution": { - "log": 2, - "type": "log" - }, - "showPoints": "always", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 88 - }, - "id": 1021, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum(rate(vm_http_requests_total{job=\"$job\", instance=~\"$instance\", path!~\"/favicon.ico\"}[$interval]) or irate(vm_http_requests_total{job=\"$job\", instance=~\"$instance\", path!~\"/favicon.ico\"}[5m])) by (path)", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{path}}", - "refId": "A" - } - ], - "title": "Requests", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "The less time it takes is better.\n* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "points", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 4, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "always", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 88 - }, - "id": 1023, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum by (path) (max(vm_request_duration_seconds{job=\"$job\", instance=~\"$instance\"}) by (path, quantile) > 0)", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{quantile}} ({{path}})", - "refId": "A" - } - ], - "title": "Queries Duration", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 0, - "y": 96 - }, - "id": 1025, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "right", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "vm_tcplistener_conns{job=\"$job\", instance=\"$instance\"}", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{name}}", - "refId": "A" - } - ], - "title": "TCP Connections", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Shows the number of active time series. High value may result in ingestion slowdown. ", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 60, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 7, - "w": 12, - "x": 12, - "y": 96 - }, - "id": 1027, - "links": [ - { - "targetBlank": true, - "title": "troubleshooting", - "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md#troubleshooting" - } - ], - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "vm_cache_entries{job=\"$job\", instance=~\"$instance\", type=\"storage/hour_metric_ids\"}", - "format": "time_series", - "hide": true, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Time Series", - "refId": "A" - }, - { - "datasource": "Metrics", - "expr": "vm_cache_entries{job=\"$job\", instance=~\"$instance\"} > 0", - "interval": "$interval", - "legendFormat": "{{type}}", - "refId": "B" - } - ], - "title": "Time Series", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 103 - }, - "id": 1084, - "panels": [], - "title": "Clickhouse", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "Is the PMM Core element up and running?", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 104 - }, - "id": 1094, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "up{job=\"clickhouse\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Clickhouse Status", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Version of the server in a single integer number in base-1000. For example, version 11.22.33 is translated to 11022033.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 4, - "y": 104 - }, - "id": 1095, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "ClickHouseMetrics_VersionInteger{job=\"clickhouse\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Clickhouse Version", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Revision of the server. It is a number incremented for every release or release candidate except patch releases.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 8, - "y": 104 - }, - "id": 1096, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "ClickHouseMetrics_Revision{job=\"clickhouse\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Clickhouse revision", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Total number of databases on the server.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 12, - "y": 104 - }, - "id": 1099, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "ClickHouseAsyncMetrics_NumberOfDatabases{job=\"clickhouse\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Number of Databases", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Total number of tables summed across the databases on the server, excluding the databases that cannot contain MergeTree tables. The excluded database engines are those who generate the set of tables on the fly, like `Lazy`, `MySQL`, `PostgreSQL`, `SQlite`.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 16, - "y": 104 - }, - "id": 1098, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "ClickHouseAsyncMetrics_NumberOfTables{job=\"clickhouse\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Number of Tables", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The uptime of the host server (the machine where ClickHouse is running), in seconds.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "color": "red", - "index": 1, - "text": "DOWN" - }, - "1": { - "color": "green", - "index": 0, - "text": "UP" - } - }, - "type": "value" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "red", - "value": 0 - }, - { - "color": "green", - "value": 1 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 20, - "y": 104 - }, - "id": 1097, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "ClickHouseAsyncMetrics_Uptime{job=\"clickhouse\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Uptime", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Total amount of memory (bytes) allocated by the server.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineStyle": { - "fill": "solid" - }, - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 107 - }, - "id": 1101, - "maxDataPoints": 200, - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "right", - "showLegend": false - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "exemplar": false, - "expr": "ClickHouseMetrics_MemoryTracking{job=\"clickhouse\"}", - "interval": "", - "legendFormat": "{{instance}}", - "range": true, - "refId": "A" - } - ], - "title": "Memory", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Number of connections to TCP server (clients with native interface), also included server-server distributed query connections. \nNumber of connections to HTTP server", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false - }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" - }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" - }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 107 - }, - "id": 1103, - "maxDataPoints": 200, - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "exemplar": false, - "expr": "ClickHouseMetrics_TCPConnection{job=\"clickhouse\"}", - "interval": "", - "legendFormat": "tcp ", - "range": true, - "refId": "A" - }, - { - "datasource": "Metrics", - "editorMode": "code", - "exemplar": false, - "expr": "ClickHouseMetrics_HTTPConnection{job=\"clickhouse\"}", - "interval": "", - "legendFormat": "http ", - "range": true, - "refId": "B" - } - ], - "title": "Connections", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Number of times the number of query processing threads was lowered due to slow reads.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "Heap and allocation throughput.\n\ngo_memstats_mallocs_total - Total number of heap objects allocated, both live and gc-ed.\n\ngo_memstats_frees_total - Total number of heap objects frees.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "series", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Mallocs/s" + }, + "properties": [ + { + "id": "unit", + "value": "pps" + }, + { + "id": "custom.axisPlacement", + "value": "left" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Frees/s" + }, + "properties": [ + { + "id": "unit", + "value": "pps" + }, + { + "id": "custom.axisPlacement", + "value": "right" + } + ] + } + ] }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 58 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "id": 1113, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "cps" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 12, - "x": 0, - "y": 112 - }, - "id": 1105, - "maxDataPoints": 200, - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "right", - "showLegend": false + "pluginVersion": "12.4.5", + "targets": [ + { + "editorMode": "code", + "expr": "sum(irate(go_memstats_mallocs_total{job=\"pmm-managed\"}[$__rate_interval]))", + "legendFormat": "Mallocs/s", + "range": true, + "refId": "B" + }, + { + "editorMode": "code", + "expr": "sum(irate(go_memstats_frees_total{job=\"pmm-managed\"}[$__rate_interval]))", + "legendFormat": "Frees/s", + "range": true, + "refId": "C" + } + ], + "title": "Heap Allocations", + "transparent": true, + "type": "timeseries" }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "editorMode": "code", - "exemplar": false, - "expr": "rate(ClickHouseProfileEvents_ReadBackoff{job=\"clickhouse\"}[$__interval]) ", - "interval": "", - "legendFormat": "__auto", - "range": true, - "refId": "C" - } - ], - "title": "Read backoff", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "description": "Number of reads from a file that were slow. This indicate system overload. Thresholds are controlled by read_backoff_* settings.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 10, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "GC STW.\nLong pauses lead to API degradation and increased latency.\n\nGC Run Rate.\nIf GC is running hundreds of times per second, it means that the program is creating too many short-lived objects (garbage), and the processor is spending time cleaning them up instead of doing useful work.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "series", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "GC run rate (cycles/s)" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "unit", + "value": "ops" + } + ] + } + ] }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 66 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "id": 1118, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - "thresholdsStyle": { - "mode": "off" - } - }, - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "cps" - }, - "overrides": [] - }, - "gridPos": { - "h": 5, - "w": 12, - "x": 12, - "y": 112 - }, - "id": 1107, - "maxDataPoints": 200, - "options": { - "legend": { - "calcs": [], - "displayMode": "table", - "placement": "right", - "showLegend": false + "pluginVersion": "12.4.3", + "targets": [ + { + "editorMode": "code", + "expr": "go_gc_duration_seconds{job=\"pmm-managed\", quantile=\"1\"}", + "legendFormat": "GC run duration", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PA58DA793C7250F1B" + }, + "editorMode": "code", + "expr": "sum(irate(go_gc_duration_seconds_count{job=\"pmm-managed\"}[$__rate_interval]))", + "legendFormat": "GC run rate (cycles/s)", + "range": true, + "refId": "B" + } + ], + "title": "Garbage Collector", + "transparent": true, + "type": "timeseries" }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "desc" - } - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "editorMode": "code", - "exemplar": false, - "expr": "rate(ClickHouseProfileEvents_SlowRead{job=\"clickhouse\"}[$__interval])", - "interval": "", - "legendFormat": "trend - {{instance}}", - "range": true, - "refId": "C" - } - ], - "title": "Slow reads", - "type": "timeseries" - }, - { - "collapsed": false, - "gridPos": { - "h": 1, - "w": 24, - "x": 0, - "y": 117 - }, - "id": 1007, - "panels": [], - "title": "PostgreSQL", - "type": "row" - }, - { - "datasource": "Metrics", - "description": "Reports whether PMM Server can connect to the PostgreSQL instance.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "NO" + "datasource": "Metrics", + "description": "If 'Derive' value is consistently greater than 0 over a long period of time, the number of goroutines is growing steadily that is a sign of goroutine leak.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "series", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Derive" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 66 + }, + "id": 1111, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true }, - "1": { - "text": "YES" + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } - }, - "type": "value" }, - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "pluginVersion": "12.4.3", + "targets": [ + { + "expr": "go_goroutines{job=\"pmm-managed\"}", + "legendFormat": "Total", + "refId": "A" + }, + { + "editorMode": "code", + "expr": "deriv(go_goroutines{job=\"pmm-managed\"}[30m])", + "legendFormat": "Derive", + "range": true, + "refId": "B" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0 - }, - { - "color": "#299c46", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 118 - }, - "id": 63, - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "mean" - ], - "fields": "", - "values": false + ], + "title": "Goroutines", + "transparent": true, + "type": "timeseries" }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (service_name) (pg_up{service_name=~\"$service_name\"})", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Connected", - "type": "stat" - }, - { - "fieldConfig": { - "defaults": {}, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 118 - }, - "id": 1001, - "options": { - "code": { - "language": "plaintext", - "showLineNumbers": false, - "showMiniMap": false - }, - "content": "
$node_name
", - "mode": "html" - }, - "pluginVersion": "12.4.3", - "title": "Node", - "type": "text" - }, - { - "datasource": "Metrics", - "description": "The version of the PostgreSQL instance.\nThe current server version number as an integer, which represents a canonical version number without needing to parse a textual representation (e.g. 120007 vs 12.7), and can reliably be used to compare versions.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "color": "text", - "index": 0, - "text": "N/A" + "datasource": "Metrics", + "description": "go_sql_connections_max_open - Maximum number of open connections to the database.\n\ngo_sql_connections_in_use - The number of connections currently in use.\n\nWait rate.\n\ngo_sql_connections_wait_duration_seconds - The total time blocked waiting for a new connection. If the result is 1.0, it means that at any given moment, exactly one goroutine is completely blocked waiting for a DB connection. If it spikes to 5.0, five goroutines are perpetually blocked. It should be 0 ideally.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "series", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineStyle": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + }, + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "blocked go-routines" + }, + "properties": [ + { + "id": "custom.axisPlacement", + "value": "right" + }, + { + "id": "unit", + "value": "short" + }, + { + "id": "min", + "value": 0 + }, + { + "id": "custom.lineStyle" + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "in-use" + }, + "properties": [ + { + "id": "custom.lineStyle" + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 74 + }, + "id": 1123, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - } - ] - } - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 9, - "y": 118 - }, - "id": 65, - "options": { - "colorMode": "value", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "auto", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 24 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "builder", - "expr": "pg_settings_server_version_num{node_id=\"pmm-server\"}", - "legendFormat": "__auto", - "range": true, - "refId": "A" - } - ], - "title": "Version", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Defines the amount of memory the database server uses for shared memory buffers. Default is 128MB. Guidance on tuning is 25% of RAM, but generally doesn't exceed 40%.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "editorMode": "code", + "expr": "go_sql_connections_max_open{job=\"pmm-managed\", db=\"pmm-managed\"}", + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PA58DA793C7250F1B" + }, + "editorMode": "code", + "exemplar": false, + "expr": "go_sql_connections_in_use{job=\"pmm-managed\", db=\"pmm-managed\"}", + "instant": false, + "legendFormat": "in-use", + "range": true, + "refId": "B" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PA58DA793C7250F1B" + }, + "editorMode": "code", + "exemplar": false, + "expr": "rate(go_sql_connections_wait_duration_seconds{db=\"pmm-managed\",driver=\"postgres\"}[$__interval])", + "instant": false, + "legendFormat": "blocked go-routines", + "range": true, + "refId": "C" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" + ], + "title": "SQL connections pool", + "transparent": true, + "type": "timeseries" }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 14, - "y": 118 - }, - "id": 67, - "links": [ { - "targetBlank": true, - "title": "GUC-SHARED-BUFFERS", - "url": "https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-BUFFERS" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + "collapsed": false, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 82 + }, + "id": 1033, + "panels": [], + "title": "Grafana", + "type": "row" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (service_name) (max_over_time(pg_settings_shared_buffers_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_shared_buffers_bytes{service_name=~\"$service_name\"}[5m])) ", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Shared Buffers", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The parameter work_mem defines the amount of memory assigned for internal sort operations and hash tables before writing to temporary disk files. The default is 4MB.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "Is Grafana UP and running", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 6, + "x": 0, + "y": 83 + }, + "id": 1059, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"grafana\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 19, - "y": 118 - }, - "id": 69, - "links": [ - { - "targetBlank": true, - "title": "GUC-WORK-MEM", - "url": "https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-WORK-MEM" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Grafana Status", + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (service_name) (max_over_time(pg_settings_work_mem_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_work_mem_bytes{service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Memory Size for each Sort", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "Whether autovacuum process is enabled or not. Generally the solution is to vacuum more often, not less.", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "mappings": [ - { - "options": { - "0": { - "text": "NO" + "datasource": "Metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" }, - "1": { - "text": "YES" - } - }, - "type": "value" + "overrides": [] }, - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "gridPos": { + "h": 3, + "w": 6, + "x": 6, + "y": 83 + }, + "id": 1047, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "rate(grafana_database_conn_open[$__interval])", + "instant": false, + "legendFormat": "open conn", + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 0 - }, - { - "color": "#299c46", - "value": 1 - } - ] - }, - "unit": "none" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 4, - "x": 0, - "y": 121 - }, - "id": 85, - "links": [ - { - "targetBlank": true, - "title": "AUTOVACUUM", - "url": "https://www.postgresql.org/docs/current/static/routine-vacuuming.html#AUTOVACUUM" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ], + "title": "DB Open Connections", + "type": "stat" }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (service_name) (max_over_time(pg_settings_autovacuum{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_autovacuum{service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Autovacuum", - "type": "stat" - }, - { - "datasource": "Metrics", - "fieldConfig": { - "defaults": { - "color": { - "mode": "thresholds" - }, - "decimals": 1, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "total amount of orgs", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 12, + "y": 83 + }, + "id": 1049, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "grafana_stat_total_orgs{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "#d44a3a", - "value": 0 - }, - { - "color": "rgba(237, 129, 40, 0.89)", - "value": 3600 - }, - { - "color": "#299c46", - "value": 86400 - } - ] - }, - "unit": "s" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 4, - "y": 121 - }, - "id": 86, - "maxDataPoints": 100, - "options": { - "colorMode": "value", - "graphMode": "none", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Organisations Count", + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "exemplar": false, - "expr": "avg by (service_name) (pg_postmaster_uptime_seconds{service_name=~\"$service_name\"})", - "format": "time_series", - "instant": true, - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Uptime", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The maximum number of client connections allowed. Change this value with care as there are some memory resources that are allocated on a per-client basis, so setting max_connections higher will generally increase overall PostgreSQL memory usage.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "decimals": 0, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "total amount of users", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 15, + "y": 83 + }, + "id": 1029, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "last" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "grafana_stat_total_users", + "format": "time_series", + "intervalFactor": 2, + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 9, - "y": 121 - }, - "id": 1005, - "links": [ - { - "targetBlank": true, - "title": "GUC-MAX-CONNECTIONS", - "url": "https://www.postgresql.org/docs/current/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ], + "title": "User Count", + "type": "stat" }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (service_name) (max_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Max Connections", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "PostgreSQL's effective_cache_size variable tunes how much RAM you expect to be available for disk caching. Generally adding Linux free+cached will give you a good idea. This value is used by the query planner whether plans will fit in memory, and when defined too low, can lead to some plans rejecting certain indexes.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "total amount of folders", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 18, + "y": 83 + }, + "id": 1051, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "grafana_stat_totals_folder{instance=\"$instance\"}", + "format": "time_series", + "intervalFactor": 2, + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 14, - "y": 121 - }, - "id": 70, - "links": [ - { - "targetBlank": true, - "title": "GUC-EFFECTIVE-CACHE-SIZE", - "url": "https://www.postgresql.org/docs/current/static/runtime-config-query.html#GUC-EFFECTIVE-CACHE-SIZE" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false - }, - "showPercentChange": false, - "text": { - "valueSize": 20 + ], + "title": "Folders Count", + "type": "stat" }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (service_name) (max_over_time(pg_settings_effective_cache_size_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_effective_cache_size_bytes{service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "", - "refId": "A" - } - ], - "title": "Disk Cache Size", - "type": "stat" - }, - { - "datasource": "Metrics", - "description": "The setting wal_buffers defines how much memory is used for caching the write-ahead log entries. Generally this value is small (3% of shared_buffers value), but it may need to be modified for heavily loaded servers.", - "fieldConfig": { - "defaults": { - "color": { - "fixedColor": "rgb(31, 120, 193)", - "mode": "fixed" - }, - "decimals": 2, - "mappings": [ - { - "options": { - "match": "null", - "result": { - "text": "N/A" + "datasource": "Metrics", + "description": "total amount of dashboards", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 3, + "x": 21, + "y": 83 + }, + "id": 1031, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "grafana_stat_totals_dashboard", + "format": "time_series", + "intervalFactor": 2, + "range": true, + "refId": "A" } - }, - "type": "special" - } - ], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "bytes" - }, - "overrides": [] - }, - "gridPos": { - "h": 3, - "w": 5, - "x": 19, - "y": 121 - }, - "id": 68, - "links": [ - { - "title": "GUC-WAL-BUFFERS", - "url": "https://www.postgresql.org/docs/current/static/runtime-config-wal.html#GUC-WAL-BUFFERS" - }, - { - "targetBlank": true, - "title": "GUC-SHARED-BUFFERS", - "url": "https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-BUFFERS" - } - ], - "maxDataPoints": 100, - "options": { - "colorMode": "none", - "graphMode": "area", - "justifyMode": "auto", - "orientation": "horizontal", - "percentChangeColorMode": "standard", - "reduceOptions": { - "calcs": [ - "lastNotNull" - ], - "fields": "", - "values": false + ], + "title": "Dashboard Count", + "type": "stat" }, - "showPercentChange": false, - "text": { - "valueSize": 20 - }, - "textMode": "auto", - "wideLayout": true - }, - "pluginVersion": "12.4.3", - "targets": [ { - "datasource": "Metrics", - "expr": "avg by (service_name) (max_over_time(pg_settings_wal_buffers_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_wal_buffers_bytes{service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "refId": "A" - } - ], - "title": "Disk-Page Buffers", - "type": "stat" - }, - { - "datasource": "Metrics", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 60, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "Average user and system CPU time spent in seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 86 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" + "id": 1039, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg(rate(process_cpu_seconds_total{job=\"grafana\"}[$__interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "CPU Time", + "range": true, + "refId": "A" + } + ], + "title": "Average CPU Usage", + "type": "timeseries" }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Total " + { + "datasource": "Metrics", + "description": "Virtual and Resident memory size in bytes, averages over 5 min interval", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "decbytes" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Total" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 86 }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" + "id": 1037, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.stacking", - "value": { - "group": false, - "mode": "normal" + }, + "pluginVersion": "12.4.3", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg(rate(process_resident_memory_bytes{job=\"grafana\"}[$__interval]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Resident Mem", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg(rate(process_virtual_memory_bytes{job=\"grafana\"}[5m]))", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Virtual Mem", + "range": true, + "refId": "B" } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 124 - }, - "id": 23, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "editorMode": "code", - "expr": "avg by (service_name,state) (sum(max_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[$interval]) or\nmax_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[5m])) by (state))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{state}}", - "range": true, - "refId": "A" + ], + "title": "Average Memory Usage", + "type": "timeseries" }, { - "datasource": "Metrics", - "expr": "sum(max_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[$interval]) or\nmax_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Total", - "metric": "pg", - "refId": "C", - "step": 2 - } - ], - "title": "PostgreSQL Connections", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "http response status", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "log": 2, - "type": "log" + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 94 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "normal" + "id": 1041, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 0, - "links": [], - "mappings": [], - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "rate(grafana_api_response_status_total[$__interval])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "API {{ code }}", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "rate(grafana_page_response_status_total[$__interval])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Page {{ code }}", + "range": true, + "refId": "B" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "rate(grafana_proxy_response_status_total[$__interval])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "Proxy {{ code }}", + "range": true, + "refId": "C" + } + ], + "title": "Total Response Statuses", + "type": "timeseries" }, - "overrides": [ - { - "matcher": { - "id": "byName", - "options": "Maximum commections" + { + "datasource": "Metrics", + "description": "api login counters", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 10, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" - } - } - ] - }, - { - "matcher": { - "id": "byName", - "options": "Maximum connections" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 94 }, - "properties": [ - { - "id": "color", - "value": { - "fixedColor": "#bf1b00", - "mode": "fixed" + "id": 1043, + "options": { + "legend": { + "calcs": [ + "mean", + "lastNotNull", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" } - }, - { - "id": "custom.fillOpacity", - "value": 0 - }, - { - "id": "custom.stacking", - "value": { - "group": false, - "mode": "normal" + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "rate(grafana_api_login_post_total[$__interval])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "POST", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "rate(grafana_api_login_oauth_total[$__interval])", + "format": "time_series", + "intervalFactor": 2, + "legendFormat": "OAuth", + "range": true, + "refId": "B" } - } - ] - } - ] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 124 - }, - "id": 34, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "avg by (service_name,datname) (max_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\",state='active'}[$interval]) or\nmax_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\",state='active'}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "{{datname}}", - "refId": "A" + ], + "title": "Login Events", + "type": "timeseries" }, { - "datasource": "Metrics", - "expr": "avg by (service_name) (max_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[$interval]) or \nmax_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Maximum connections", - "refId": "B" - } - ], - "title": "Active Connections", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + "datasource": "Metrics", + "description": "go_sql_connections_max_open - Maximum number of open connections to the database.\n\ngo_sql_connections_in_use - The number of connections currently in use.\n\nWait rate.\n\ngo_sql_connections_wait_duration_seconds - The total time blocked waiting for a new connection. If the result is 1.0, it means that at any given moment, exactly one goroutine is completely blocked waiting for a DB connection. If it spikes to 5.0, five goroutines are perpetually blocked. It should be 0 ideally.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "series", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 1, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "auto", + "showValues": false, + "spanNulls": 60000, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "max" + }, + "properties": [ + { + "id": "custom.lineStyle", + "value": { + "dash": [ + 10, + 10 + ], + "fill": "dash" + } + } + ] + } + ] }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 102 }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + "id": 1127, + "options": { + "legend": { + "calcs": [], + "displayMode": "list", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "single", + "sort": "none" + } }, - "thresholdsStyle": { - "mode": "off" - } - }, - "decimals": 2, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "short" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 0, - "y": 132 - }, - "id": 36, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum(rate(pg_stat_database_tup_fetched{datname=~\"$database\",instance=~\"$node_name\"}[$interval])) or \nsum(irate(pg_stat_database_tup_fetched{datname=~\"$database\",instance=~\"$node_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Fetched", - "refId": "A" - }, - { - "datasource": "Metrics", - "expr": "sum(rate(pg_stat_database_tup_returned{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_returned{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Returned", - "refId": "B" + "pluginVersion": "12.4.5", + "targets": [ + { + "editorMode": "code", + "expr": "go_sql_stats_connections_max_open{job=\"grafana\", db_name=\"grafana\"}", + "legendFormat": "max", + "range": true, + "refId": "A" + }, + { + "datasource": { + "type": "prometheus", + "uid": "PA58DA793C7250F1B" + }, + "editorMode": "code", + "exemplar": false, + "expr": "go_sql_stats_connections_in_use{job=\"grafana\",db_name=\"grafana\"}", + "instant": false, + "legendFormat": "in-use", + "range": true, + "refId": "B" + } + ], + "title": "SQL connections pool", + "transparent": true, + "type": "timeseries" }, { - "datasource": "Metrics", - "expr": "sum(rate(pg_stat_database_tup_inserted{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_inserted{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Inserted", - "refId": "C" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 110 + }, + "id": 1009, + "panels": [ + { + "datasource": "Metrics", + "description": "CPU Usage by VictoriaMetrics Process Only", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 50 + }, + { + "color": "#d44a3a", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 0, + "y": 230 + }, + "id": 1011, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "(sum(rate(process_cpu_seconds_total{job=\"$job\", instance=\"$instance\"}[$interval])) by () or sum(irate(process_cpu_seconds_total{job=\"$job\", instance=\"$instance\"}[5m])) by ()) / count(node_cpu_seconds_total{mode=\"user\", node_name=\"pmm-server\"})*100", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "CPU Usage", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Memory Allocated and In use by VictoriaMetrics Process Only", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 50 + }, + { + "color": "#d44a3a", + "value": 80 + } + ] + }, + "unit": "percent" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 5, + "y": 230 + }, + "id": 1013, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "sum(vm_cache_size_bytes{job=\"$job\", instance=\"$instance\"}) / max(vm_allowed_memory_bytes{job=\"$job\", instance=\"$instance\"})", + "format": "time_series", + "hide": true, + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + }, + { + "datasource": "Metrics", + "expr": "100*sum(go_memstats_alloc_bytes{job=\"$job\", instance=\"$instance\"}+go_memstats_stack_inuse_bytes{job=\"$job\", instance=\"$instance\"}) by () / \nsum(node_memory_MemTotal_bytes{node_name=\"pmm-server\"}) by ()", + "interval": "", + "legendFormat": "", + "refId": "B" + } + ], + "title": "Memory Usage", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Shows percent of occupied disk space by data points on the remaining disk space at `-storageDataPath`", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#299c46", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 50 + }, + { + "color": "#d44a3a", + "value": 80 + } + ] + }, + "unit": "percentunit" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 10, + "y": 230 + }, + "id": 1015, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "sum(vm_data_size_bytes{job=\"$job\", instance=~\"$instance\"}) / (sum(vm_data_size_bytes{job=\"$job\", instance=~\"$instance\"}) + vm_free_disk_space_bytes{job=\"$job\", instance=\"$instance\"})", + "format": "time_series", + "instant": false, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Value", + "refId": "A" + } + ], + "title": "Disk Usage", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "How many datapoints are in storage", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 15, + "y": 230 + }, + "id": 1017, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "sum(vm_rows{job=\"$job\", instance=~\"$instance\", type!=\"indexdb\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Total Datapoints", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "How many entries inverted index contains. This value is proportional to the number of unique timeseries in storage(cardinality).", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 19, + "y": 230 + }, + "id": 1019, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "sum(vm_rows{job=\"$job\", instance=~\"$instance\", type=~\"indexdb.*\"})", + "format": "time_series", + "instant": false, + "interval": "", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Index Size", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "points", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "stepAfter", + "lineWidth": 2, + "pointSize": 4, + "scaleDistribution": { + "log": 2, + "type": "log" + }, + "showPoints": "always", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 233 + }, + "id": 1021, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "sort_desc(sum(rate(vm_http_requests_total{job=\"$job\", instance=~\"$instance\", path!~\"/favicon.ico\"}[$interval]) or irate(vm_http_requests_total{job=\"$job\", instance=~\"$instance\", path!~\"/favicon.ico\"}[5m])) by (path))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{path}}", + "range": true, + "refId": "A" + } + ], + "title": "Requests", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "The less time it takes is better.\n* `*` - unsupported query path\n* `/write` - insert into VM\n* `/metrics` - query VM system metrics\n* `/query` - query instant values\n* `/query_range` - query over a range of time\n* `/series` - match a certain label set\n* `/label/{}/values` - query a list of label values (variables mostly)", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "points", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 4, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "always", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 233 + }, + "id": 1023, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "sum by (path) (max(vm_request_duration_seconds{job=\"$job\", instance=~\"$instance\"}) by (path, quantile) > 0)", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{quantile}} ({{path}})", + "refId": "A" + } + ], + "title": "Queries Duration", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 0, + "y": 241 + }, + "id": 1025, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "vm_tcplistener_conns{job=\"$job\", instance=\"$instance\"}", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{name}}", + "refId": "A" + } + ], + "title": "TCP Connections", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Shows the number of active time series. High value may result in ingestion slowdown. ", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 60, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 7, + "w": 12, + "x": 12, + "y": 241 + }, + "id": 1027, + "links": [ + { + "targetBlank": true, + "title": "troubleshooting", + "url": "https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md#troubleshooting" + } + ], + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "vm_cache_entries{job=\"$job\", instance=~\"$instance\", type=\"storage/hour_metric_ids\"}", + "format": "time_series", + "hide": true, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Time Series", + "refId": "A" + }, + { + "datasource": "Metrics", + "expr": "vm_cache_entries{job=\"$job\", instance=~\"$instance\"} > 0", + "interval": "$interval", + "legendFormat": "{{type}}", + "refId": "B" + } + ], + "title": "Time Series", + "type": "timeseries" + } + ], + "title": "Victoria Metrics", + "type": "row" }, { - "datasource": "Metrics", - "expr": "sum(rate(pg_stat_database_tup_updated{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_updated{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Updated", - "refId": "D" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 111 + }, + "id": 1084, + "panels": [ + { + "datasource": "Metrics", + "description": "Is the PMM Core element up and running?", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 231 + }, + "id": 1094, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "up{job=\"clickhouse\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Clickhouse Status", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Version of the server in a single integer number in base-1000. For example, version 11.22.33 is translated to 11022033.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 4, + "y": 231 + }, + "id": 1095, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "ClickHouseMetrics_VersionInteger{job=\"clickhouse\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Clickhouse Version", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Revision of the server. It is a number incremented for every release or release candidate except patch releases.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 8, + "y": 231 + }, + "id": 1096, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "ClickHouseMetrics_Revision{job=\"clickhouse\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Clickhouse revision", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Total number of databases on the server.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 12, + "y": 231 + }, + "id": 1099, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "ClickHouseAsyncMetrics_NumberOfDatabases{job=\"clickhouse\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Number of Databases", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Total number of tables summed across the databases on the server, excluding the databases that cannot contain MergeTree tables. The excluded database engines are those who generate the set of tables on the fly, like `Lazy`, `MySQL`, `PostgreSQL`, `SQlite`.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 16, + "y": 231 + }, + "id": 1098, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "ClickHouseAsyncMetrics_NumberOfTables{job=\"clickhouse\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Number of Tables", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "The uptime of the host server (the machine where ClickHouse is running), in seconds.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "color": "red", + "index": 1, + "text": "DOWN" + }, + "1": { + "color": "green", + "index": 0, + "text": "UP" + } + }, + "type": "value" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "red", + "value": 0 + }, + { + "color": "green", + "value": 1 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 20, + "y": 231 + }, + "id": 1097, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "ClickHouseAsyncMetrics_Uptime{job=\"clickhouse\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Total amount of memory (bytes) allocated by the server.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 234 + }, + "id": 1101, + "maxDataPoints": 200, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "ClickHouseMetrics_MemoryTracking{job=\"clickhouse\"}", + "interval": "", + "legendFormat": "{{instance}}", + "range": true, + "refId": "A" + } + ], + "title": "Memory", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Number of connections to TCP server (clients with native interface), also included server-server distributed query connections. \nNumber of connections to HTTP server", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 234 + }, + "id": 1103, + "maxDataPoints": 200, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "ClickHouseMetrics_TCPConnection{job=\"clickhouse\"}", + "interval": "", + "legendFormat": "tcp ", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "ClickHouseMetrics_HTTPConnection{job=\"clickhouse\"}", + "interval": "", + "legendFormat": "http ", + "range": true, + "refId": "B" + } + ], + "title": "Connections", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Number of times the number of query processing threads was lowered due to slow reads.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cps" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 0, + "y": 239 + }, + "id": 1105, + "maxDataPoints": 200, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "max_over_time( (irate(ClickHouseProfileEvents_ReadBackoff{instance=~\"$instance\"}[2m]))[$__interval] ) * $peaks", + "hide": true, + "interval": "", + "legendFormat": "peaks - {{instance}}", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "rate(ClickHouseProfileEvents_ReadBackoff{job=\"clickhouse\"}[$__interval]) ", + "interval": "", + "legendFormat": "__auto", + "range": true, + "refId": "C" + } + ], + "title": "Read backoff", + "transparent": true, + "type": "timeseries" + }, + { + "datasource": "Metrics", + "description": "Number of reads from a file that were slow. This indicate system overload. Thresholds are controlled by read_backoff_* settings.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 0, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "cps" + }, + "overrides": [] + }, + "gridPos": { + "h": 5, + "w": 12, + "x": 12, + "y": 239 + }, + "id": 1107, + "maxDataPoints": 200, + "options": { + "legend": { + "calcs": [], + "displayMode": "table", + "placement": "right", + "showLegend": false + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "desc" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "exemplar": false, + "expr": "rate(ClickHouseProfileEvents_SlowRead{job=\"clickhouse\"}[$__interval])", + "interval": "", + "legendFormat": "trend - {{instance}}", + "range": true, + "refId": "C" + } + ], + "title": "Slow reads", + "transparent": true, + "type": "timeseries" + } + ], + "title": "Clickhouse", + "type": "row" }, { - "datasource": "Metrics", - "expr": "sum(rate(pg_stat_database_tup_deleted{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_deleted{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Deleted", - "refId": "E" + "collapsed": true, + "gridPos": { + "h": 1, + "w": 24, + "x": 0, + "y": 112 + }, + "id": 1007, + "panels": [ + { + "datasource": "Metrics", + "description": "Reports whether PMM Server can connect to the PostgreSQL instance.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "NO" + }, + "1": { + "text": "YES" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, + { + "color": "#299c46", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 263 + }, + "id": 63, + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "mean" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) (pg_up{service_name=~\"$service_name\"})", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Connected", + "type": "stat" + }, + { + "fieldConfig": { + "defaults": {}, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 4, + "y": 263 + }, + "id": 1001, + "options": { + "code": { + "language": "plaintext", + "showLineNumbers": false, + "showMiniMap": false + }, + "content": "
$node_name
", + "mode": "html" + }, + "pluginVersion": "12.4.5", + "title": "Node", + "type": "text" + }, + { + "datasource": "Metrics", + "description": "The version of the PostgreSQL instance.\nThe current server version number as an integer, which represents a canonical version number without needing to parse a textual representation (e.g. 120007 vs 12.7), and can reliably be used to compare versions.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + } + ] + } + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 9, + "y": 263 + }, + "id": 65, + "options": { + "colorMode": "value", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "auto", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "builder", + "expr": "pg_settings_server_version_num{node_id=\"pmm-server\"}", + "legendFormat": "__auto", + "range": true, + "refId": "A" + } + ], + "title": "Version", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Defines the amount of memory the database server uses for shared memory buffers. Default is 128MB. Guidance on tuning is 25% of RAM, but generally doesn't exceed 40%.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 14, + "y": 263 + }, + "id": 67, + "links": [ + { + "targetBlank": true, + "title": "GUC-SHARED-BUFFERS", + "url": "https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-BUFFERS" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max_over_time(pg_settings_shared_buffers_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_shared_buffers_bytes{service_name=~\"$service_name\"}[5m])) ", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Shared Buffers", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "The parameter work_mem defines the amount of memory assigned for internal sort operations and hash tables before writing to temporary disk files. The default is 4MB.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 19, + "y": 263 + }, + "id": 69, + "links": [ + { + "targetBlank": true, + "title": "GUC-WORK-MEM", + "url": "https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-WORK-MEM" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max_over_time(pg_settings_work_mem_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_work_mem_bytes{service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Memory Size for each Sort", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "Whether autovacuum process is enabled or not. Generally the solution is to vacuum more often, not less.", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "mappings": [ + { + "options": { + "0": { + "text": "NO" + }, + "1": { + "text": "YES" + } + }, + "type": "value" + }, + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 0 + }, + { + "color": "#299c46", + "value": 1 + } + ] + }, + "unit": "none" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 4, + "x": 0, + "y": 266 + }, + "id": 85, + "links": [ + { + "targetBlank": true, + "title": "AUTOVACUUM", + "url": "https://www.postgresql.org/docs/current/static/routine-vacuuming.html#AUTOVACUUM" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max_over_time(pg_settings_autovacuum{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_autovacuum{service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Autovacuum", + "type": "stat" + }, + { + "datasource": "Metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "thresholds" + }, + "decimals": 1, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "#d44a3a", + "value": 0 + }, + { + "color": "rgba(237, 129, 40, 0.89)", + "value": 3600 + }, + { + "color": "#299c46", + "value": 86400 + } + ] + }, + "unit": "s" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 4, + "y": 266 + }, + "id": 86, + "maxDataPoints": 100, + "options": { + "colorMode": "value", + "graphMode": "none", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "exemplar": false, + "expr": "avg by (service_name) (pg_postmaster_uptime_seconds{service_name=~\"$service_name\"})", + "format": "time_series", + "instant": true, + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Uptime", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "The maximum number of client connections allowed. Change this value with care as there are some memory resources that are allocated on a per-client basis, so setting max_connections higher will generally increase overall PostgreSQL memory usage.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 0, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 9, + "y": 266 + }, + "id": 1005, + "links": [ + { + "targetBlank": true, + "title": "GUC-MAX-CONNECTIONS", + "url": "https://www.postgresql.org/docs/current/static/runtime-config-connection.html#GUC-MAX-CONNECTIONS" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Max Connections", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "PostgreSQL's effective_cache_size variable tunes how much RAM you expect to be available for disk caching. Generally adding Linux free+cached will give you a good idea. This value is used by the query planner whether plans will fit in memory, and when defined too low, can lead to some plans rejecting certain indexes.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 14, + "y": 266 + }, + "id": 70, + "links": [ + { + "targetBlank": true, + "title": "GUC-EFFECTIVE-CACHE-SIZE", + "url": "https://www.postgresql.org/docs/current/static/runtime-config-query.html#GUC-EFFECTIVE-CACHE-SIZE" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max_over_time(pg_settings_effective_cache_size_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_effective_cache_size_bytes{service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "", + "refId": "A" + } + ], + "title": "Disk Cache Size", + "type": "stat" + }, + { + "datasource": "Metrics", + "description": "The setting wal_buffers defines how much memory is used for caching the write-ahead log entries. Generally this value is small (3% of shared_buffers value), but it may need to be modified for heavily loaded servers.", + "fieldConfig": { + "defaults": { + "color": { + "fixedColor": "rgb(31, 120, 193)", + "mode": "fixed" + }, + "decimals": 2, + "mappings": [ + { + "options": { + "match": "null", + "result": { + "text": "N/A" + } + }, + "type": "special" + } + ], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "bytes" + }, + "overrides": [] + }, + "gridPos": { + "h": 3, + "w": 5, + "x": 19, + "y": 266 + }, + "id": 68, + "links": [ + { + "title": "GUC-WAL-BUFFERS", + "url": "https://www.postgresql.org/docs/current/static/runtime-config-wal.html#GUC-WAL-BUFFERS" + }, + { + "targetBlank": true, + "title": "GUC-SHARED-BUFFERS", + "url": "https://www.postgresql.org/docs/current/static/runtime-config-resource.html#GUC-SHARED-BUFFERS" + } + ], + "maxDataPoints": 100, + "options": { + "colorMode": "none", + "graphMode": "area", + "justifyMode": "auto", + "orientation": "horizontal", + "percentChangeColorMode": "standard", + "reduceOptions": { + "calcs": [ + "lastNotNull" + ], + "fields": "", + "values": false + }, + "showPercentChange": false, + "text": { + "valueSize": 20 + }, + "textMode": "auto", + "wideLayout": true + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max_over_time(pg_settings_wal_buffers_bytes{service_name=~\"$service_name\"}[$interval]) or\nmax_over_time(pg_settings_wal_buffers_bytes{service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "refId": "A" + } + ], + "title": "Disk-Page Buffers", + "type": "stat" + }, + { + "datasource": "Metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 60, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Total " + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Total" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.stacking", + "value": { + "group": false, + "mode": "normal" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 269 + }, + "id": 23, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "editorMode": "code", + "expr": "avg by (service_name,state) (sum(max_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[$interval]) or\nmax_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[5m])) by (state))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{state}}", + "range": true, + "refId": "A" + }, + { + "datasource": "Metrics", + "expr": "sum(max_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[$interval]) or\nmax_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Total", + "metric": "pg", + "refId": "C", + "step": 2 + } + ], + "title": "PostgreSQL Connections", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "log": 2, + "type": "log" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "normal" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 0, + "links": [], + "mappings": [], + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [ + { + "matcher": { + "id": "byName", + "options": "Maximum commections" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + } + ] + }, + { + "matcher": { + "id": "byName", + "options": "Maximum connections" + }, + "properties": [ + { + "id": "color", + "value": { + "fixedColor": "#bf1b00", + "mode": "fixed" + } + }, + { + "id": "custom.fillOpacity", + "value": 0 + }, + { + "id": "custom.stacking", + "value": { + "group": false, + "mode": "normal" + } + } + ] + } + ] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 269 + }, + "id": 34, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "avg by (service_name,datname) (max_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\",state='active'}[$interval]) or\nmax_over_time(pg_stat_activity_count{service_name=~\"$service_name\",datname=~\"$database\",state='active'}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "{{datname}}", + "refId": "A" + }, + { + "datasource": "Metrics", + "expr": "avg by (service_name) (max_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[$interval]) or \nmax_over_time(pg_settings_max_connections{service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Maximum connections", + "refId": "B" + } + ], + "title": "Active Connections", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "short" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 0, + "y": 277 + }, + "id": 36, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "sum(rate(pg_stat_database_tup_fetched{datname=~\"$database\",instance=~\"$node_name\"}[$interval])) or \nsum(irate(pg_stat_database_tup_fetched{datname=~\"$database\",instance=~\"$node_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Fetched", + "refId": "A" + }, + { + "datasource": "Metrics", + "expr": "sum(rate(pg_stat_database_tup_returned{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_returned{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Returned", + "refId": "B" + }, + { + "datasource": "Metrics", + "expr": "sum(rate(pg_stat_database_tup_inserted{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_inserted{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Inserted", + "refId": "C" + }, + { + "datasource": "Metrics", + "expr": "sum(rate(pg_stat_database_tup_updated{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_updated{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Updated", + "refId": "D" + }, + { + "datasource": "Metrics", + "expr": "sum(rate(pg_stat_database_tup_deleted{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_tup_deleted{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Deleted", + "refId": "E" + } + ], + "title": "Tuples", + "type": "timeseries" + }, + { + "datasource": "Metrics", + "fieldConfig": { + "defaults": { + "color": { + "mode": "palette-classic" + }, + "custom": { + "axisBorderShow": false, + "axisCenteredZero": false, + "axisColorMode": "text", + "axisLabel": "", + "axisPlacement": "auto", + "barAlignment": 0, + "barWidthFactor": 0.6, + "drawStyle": "line", + "fillOpacity": 20, + "gradientMode": "none", + "hideFrom": { + "legend": false, + "tooltip": false, + "viz": false + }, + "insertNulls": false, + "lineInterpolation": "linear", + "lineWidth": 2, + "pointSize": 5, + "scaleDistribution": { + "type": "linear" + }, + "showPoints": "never", + "showValues": false, + "spanNulls": false, + "stacking": { + "group": "A", + "mode": "none" + }, + "thresholdsStyle": { + "mode": "off" + } + }, + "decimals": 2, + "links": [], + "mappings": [], + "min": 0, + "thresholds": { + "mode": "absolute", + "steps": [ + { + "color": "green", + "value": 0 + }, + { + "color": "red", + "value": 80 + } + ] + }, + "unit": "ops" + }, + "overrides": [] + }, + "gridPos": { + "h": 8, + "w": 12, + "x": 12, + "y": 277 + }, + "id": 26, + "options": { + "legend": { + "calcs": [ + "mean", + "max", + "min" + ], + "displayMode": "table", + "placement": "bottom", + "showLegend": true + }, + "tooltip": { + "hideZeros": false, + "mode": "multi", + "sort": "none" + } + }, + "pluginVersion": "12.4.5", + "targets": [ + { + "datasource": "Metrics", + "expr": "sum(rate(pg_stat_database_xact_commit{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or \nsum(irate(pg_stat_database_xact_commit{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Commits", + "metric": "pg_stat_database_xact_commit", + "refId": "A", + "step": 2 + }, + { + "datasource": "Metrics", + "expr": "sum(rate(pg_stat_database_xact_rollback{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_xact_rollback{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", + "format": "time_series", + "interval": "$interval", + "intervalFactor": 1, + "legendFormat": "Rollbacks", + "metric": "pg_stat_database_xact_commit", + "refId": "B", + "step": 2 + } + ], + "title": "Transactions", + "type": "timeseries" + } + ], + "title": "PostgreSQL", + "type": "row" } - ], - "title": "Tuples", - "type": "timeseries" - }, - { - "datasource": "Metrics", - "fieldConfig": { - "defaults": { - "color": { - "mode": "palette-classic" - }, - "custom": { - "axisBorderShow": false, - "axisCenteredZero": false, - "axisColorMode": "text", - "axisLabel": "", - "axisPlacement": "auto", - "barAlignment": 0, - "barWidthFactor": 0.6, - "drawStyle": "line", - "fillOpacity": 20, - "gradientMode": "none", - "hideFrom": { - "legend": false, - "tooltip": false, - "viz": false + ], + "preload": false, + "refresh": false, + "schemaVersion": 42, + "tags": [ + "Percona", + "experimental" + ], + "templating": { + "list": [ + { + "auto": true, + "auto_count": 200, + "auto_min": "1s", + "current": { + "text": "$__auto", + "value": "$__auto" + }, + "label": "Interval", + "name": "interval", + "options": [ + { + "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,10s,1m,5m,1h,6h,1d", + "refresh": 2, + "type": "interval" + }, + { + "current": { + "text": "pmm-server", + "value": "pmm-server" + }, + "description": "pmm-server", + "hide": 2, + "label": "Node Name", + "name": "node_name", + "query": "pmm-server", + "skipUrlSync": true, + "type": "constant" + }, + { + "current": { + "text": "pmm-server-postgresql", + "value": "pmm-server-postgresql" + }, + "description": "pmm-server", + "hide": 2, + "label": "Service Name", + "name": "service_name", + "query": "pmm-server-postgresql", + "skipUrlSync": true, + "type": "constant" }, - "insertNulls": false, - "lineInterpolation": "linear", - "lineWidth": 2, - "pointSize": 5, - "scaleDistribution": { - "type": "linear" + { + "current": { + "text": "All", + "value": "$__all" + }, + "definition": "label_values(pg_stat_database_tup_fetched{service_name=~\"$service_name\",datname!~\"template.*|postgres\"},datname)", + "description": "database", + "hide": 2, + "includeAll": true, + "label": "database", + "name": "database", + "options": [], + "query": { + "query": "label_values(pg_stat_database_tup_fetched{service_name=~\"$service_name\",datname!~\"template.*|postgres\"},datname)", + "refId": "StandardVariableQuery" + }, + "refresh": 1, + "regex": "", + "regexApplyTo": "value", + "type": "query" }, - "showPoints": "never", - "showValues": false, - "spanNulls": false, - "stacking": { - "group": "A", - "mode": "none" + { + "current": { + "text": "victoriametrics", + "value": "victoriametrics" + }, + "hide": 2, + "name": "job", + "query": "victoriametrics", + "skipUrlSync": true, + "type": "constant" }, - "thresholdsStyle": { - "mode": "off" + { + "current": { + "text": "pmm-server", + "value": "pmm-server" + }, + "hide": 2, + "name": "instance", + "query": "pmm-server", + "skipUrlSync": true, + "type": "constant" } - }, - "decimals": 2, - "links": [], - "mappings": [], - "min": 0, - "thresholds": { - "mode": "absolute", - "steps": [ - { - "color": "green", - "value": 0 - }, - { - "color": "red", - "value": 80 - } - ] - }, - "unit": "ops" - }, - "overrides": [] - }, - "gridPos": { - "h": 8, - "w": 12, - "x": 12, - "y": 132 - }, - "id": 26, - "options": { - "legend": { - "calcs": [ - "mean", - "max", - "min" - ], - "displayMode": "table", - "placement": "bottom", - "showLegend": true - }, - "tooltip": { - "hideZeros": false, - "mode": "multi", - "sort": "none" - } - }, - "pluginVersion": "12.4.3", - "targets": [ - { - "datasource": "Metrics", - "expr": "sum(rate(pg_stat_database_xact_commit{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or \nsum(irate(pg_stat_database_xact_commit{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Commits", - "metric": "pg_stat_database_xact_commit", - "refId": "A", - "step": 2 - }, - { - "datasource": "Metrics", - "expr": "sum(rate(pg_stat_database_xact_rollback{datname=~\"$database\",service_name=~\"$service_name\"}[$interval])) or\nsum(irate(pg_stat_database_xact_rollback{datname=~\"$database\",service_name=~\"$service_name\"}[5m]))", - "format": "time_series", - "interval": "$interval", - "intervalFactor": 1, - "legendFormat": "Rollbacks", - "metric": "pg_stat_database_xact_commit", - "refId": "B", - "step": 2 - } - ], - "title": "Transactions", - "type": "timeseries" - } - ], - "preload": false, - "refresh": false, - "schemaVersion": 42, - "tags": [ - "Percona" - ], - "templating": { - "list": [ - { - "auto": true, - "auto_count": 200, - "auto_min": "1s", - "current": { - "text": "$__auto", - "value": "$__auto" - }, - "label": "Interval", - "name": "interval", - "options": [ - { - "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", - "refresh": 2, - "type": "interval" - }, - { - "current": { - "text": "pmm-server", - "value": "pmm-server" - }, - "description": "pmm-server", - "hide": 2, - "label": "Node Name", - "name": "node_name", - "query": "pmm-server", - "skipUrlSync": true, - "type": "constant" - }, - { - "current": { - "text": "pmm-server-postgresql", - "value": "pmm-server-postgresql" - }, - "description": "pmm-server", - "hide": 2, - "label": "Service Name", - "name": "service_name", - "query": "pmm-server-postgresql", - "skipUrlSync": true, - "type": "constant" - }, - { - "current": { - "text": "All", - "value": "$__all" - }, - "definition": "label_values(pg_stat_database_tup_fetched{service_name=~\"$service_name\",datname!~\"template.*|postgres\"},datname)", - "description": "database", - "hide": 2, - "includeAll": true, - "label": "database", - "name": "database", - "options": [], - "query": { - "query": "label_values(pg_stat_database_tup_fetched{service_name=~\"$service_name\",datname!~\"template.*|postgres\"},datname)", - "refId": "StandardVariableQuery" - }, - "refresh": 1, - "regex": "", - "regexApplyTo": "value", - "type": "query" - }, - { - "current": { - "text": "victoriametrics", - "value": "victoriametrics" - }, - "hide": 2, - "name": "job", - "query": "victoriametrics", - "skipUrlSync": true, - "type": "constant" - }, - { - "current": { - "text": "pmm-server", - "value": "pmm-server" - }, - "hide": 2, - "name": "instance", - "query": "pmm-server", - "skipUrlSync": true, - "type": "constant" - } - ] - }, - "time": { - "from": "now-12h", - "to": "now" - }, - "timepicker": {}, - "timezone": "", - "title": "PMM Health", - "uid": "pmm-health", - "version": 1, - "weekStart": "" + ] + }, + "time": { + "from": "now-12h", + "to": "now" + }, + "timepicker": {}, + "timezone": "", + "title": "PMM Health", + "uid": "pmm-health", + "version": 6, + "weekStart": "" } - diff --git a/managed/cmd/pmm-managed/main.go b/managed/cmd/pmm-managed/main.go index 2468e9778a0..34fe6c3ec98 100644 --- a/managed/cmd/pmm-managed/main.go +++ b/managed/cmd/pmm-managed/main.go @@ -1129,6 +1129,7 @@ func main() { //nolint:gocognit,maintidx,cyclop } authServer := grafana.NewAuthServer(grafanaClient, db) + prom.MustRegister(authServer) l.Info("Starting services...") var wg sync.WaitGroup diff --git a/managed/services/grafana/auth_server.go b/managed/services/grafana/auth_server.go index 7bb9927c306..cd435322b22 100644 --- a/managed/services/grafana/auth_server.go +++ b/managed/services/grafana/auth_server.go @@ -26,12 +26,14 @@ import ( "net/http/httputil" "net/url" "path" + "strconv" "strings" "sync" "time" "unicode/utf8" "github.com/lib/pq" + prom "github.com/prometheus/client_golang/prometheus" "github.com/sirupsen/logrus" "google.golang.org/grpc/codes" "gopkg.in/reform.v1" @@ -160,19 +162,50 @@ const ( // Note: cacheInvalidationInterval is used to invalidate cache for grafana responses. cacheInvalidationInterval = 60 * time.Second authenticationTimeout = 15 * time.Second + prometheusNamespace = "pmm_managed" + prometheusSubsystem = "auth" ) +func statusCodeToString(code int) string { + switch code { + case http.StatusOK: + return "200" + case http.StatusBadRequest: + return "400" + case http.StatusUnauthorized: + return "401" + case http.StatusForbidden: + return "403" + case http.StatusNotFound: + return "404" + case http.StatusMethodNotAllowed: + return "405" + case http.StatusRequestTimeout: + return "408" + case http.StatusTooManyRequests: + return "429" + case http.StatusInternalServerError: + return "500" + case http.StatusServiceUnavailable: + return "503" + default: + return strconv.Itoa(code) + } +} + // clientError contains authentication error response details. type authError struct { code codes.Code // error code for API client; not mapped to HTTP status code message string } -// ErrInvalidUserID is returned when user ID is not valid. -var ErrInvalidUserID = errors.New("InvalidUserID") +var ( + // ErrInvalidUserID is returned when user ID is not valid. + ErrInvalidUserID = errors.New("InvalidUserID") -// ErrCannotGetUserID is returned when we cannot retrieve user ID. -var ErrCannotGetUserID = errors.New("CannotGetUserID") + // ErrCannotGetUserID is returned when we cannot retrieve user ID. + ErrCannotGetUserID = errors.New("CannotGetUserID") +) type cacheItem struct { u authUser @@ -184,23 +217,45 @@ type clientInterface interface { getAuthUser(ctx context.Context, authHeaders http.Header, l *logrus.Entry) (authUser, error) } +type authMetrics struct { + // mAuthRequests tracks total auth requests by method, route, and response code. + mAuthRequests *prom.CounterVec + // mGrafanaAuthRequests tracks auth requests made to Grafana by response code. + mGrafanaAuthRequests *prom.CounterVec + // mCache tracks total authentication cache requests by status (hit or miss). + mCache *prom.CounterVec + // mCacheSizeDesc is the descriptor for the number of items in the auth cache. + mCacheSizeDesc *prom.Desc + // mDurations tracks latency of auth operations (labels: total, grafana, db). + mDurations *prom.HistogramVec +} + // AuthServer authenticates incoming requests via Grafana API. type AuthServer struct { - c clientInterface + // c is the client used to interact with the Grafana API. + c clientInterface + // db is the PostgreSQL database handle using reform ORM. db *reform.DB - l *logrus.Entry + // l is the structured logger for the auth component. + l *logrus.Entry + // cache stores authentication responses to reduce Grafana API calls. + // Stores positive responses only. cache map[string]cacheItem - rw sync.RWMutex + // rw protects the cache for concurrent access. + rw sync.RWMutex + // accessControl manages RBAC and LBAC filtering logic. accessControl *accessControl // TODO server metrics should be provided by middleware https://jira.percona.com/browse/PMM-4326 + // Prometheus metrics for the AuthServer. + metrics authMetrics } // NewAuthServer creates new AuthServer. func NewAuthServer(c clientInterface, db *reform.DB) *AuthServer { - return &AuthServer{ + s := &AuthServer{ c: c, db: db, l: logrus.WithField("component", "grafana/auth"), @@ -208,7 +263,81 @@ func NewAuthServer(c clientInterface, db *reform.DB) *AuthServer { accessControl: &accessControl{ db: db, }, + metrics: authMetrics{ + mAuthRequests: prom.NewCounterVec( + prom.CounterOpts{ + Name: prom.BuildFQName(prometheusNamespace, prometheusSubsystem, "requests_total"), + Help: "Total number of authentication requests.", + }, + []string{"method", "route", "status_code"}, + ), + mGrafanaAuthRequests: prom.NewCounterVec( + prom.CounterOpts{ + Name: prom.BuildFQName(prometheusNamespace, prometheusSubsystem, "grafana_requests_total"), + Help: "Total number of authentication requests to Grafana.", + }, + []string{"status_code"}, + ), + mCache: prom.NewCounterVec( + prom.CounterOpts{ + Name: prom.BuildFQName(prometheusNamespace, prometheusSubsystem, "cache_total"), + Help: "Total number of authentication cache requests by status (hit or miss).", + }, + []string{"status"}, + ), + mCacheSizeDesc: prom.NewDesc( + prom.BuildFQName(prometheusNamespace, prometheusSubsystem, "cache_size"), + "Total number of items in the authentication cache.", + nil, + nil, + ), + mDurations: prom.NewHistogramVec(prom.HistogramOpts{ // labels: total, grafana, db + Name: prom.BuildFQName(prometheusNamespace, prometheusSubsystem, "duration_seconds"), + Help: "Latency of authentication operations in seconds.", + Buckets: prom.DefBuckets, + }, []string{"type"}), + }, } + return s +} + +// Describe implements prom.Collector interface. +func (s *AuthServer) Describe(ch chan<- *prom.Desc) { + s.metrics.mAuthRequests.Describe(ch) + s.metrics.mGrafanaAuthRequests.Describe(ch) + s.metrics.mCache.Describe(ch) + ch <- s.metrics.mCacheSizeDesc + s.metrics.mDurations.Describe(ch) +} + +// Collect implements prom.Collector interface. +func (s *AuthServer) Collect(ch chan<- prom.Metric) { + s.metrics.mAuthRequests.Collect(ch) + s.metrics.mGrafanaAuthRequests.Collect(ch) + s.metrics.mCache.Collect(ch) + + s.rw.RLock() + cacheSize := len(s.cache) + s.rw.RUnlock() + ch <- prom.MustNewConstMetric(s.metrics.mCacheSizeDesc, prom.GaugeValue, float64(cacheSize)) + + s.metrics.mDurations.Collect(ch) +} + +func (s *AuthServer) incAuthRequests(method, route string, code int) { + s.metrics.mAuthRequests.WithLabelValues(method, route, statusCodeToString(code)).Inc() +} + +func (s *AuthServer) incGrafanaAuthRequests(code int) { + s.metrics.mGrafanaAuthRequests.WithLabelValues(statusCodeToString(code)).Inc() +} + +func (s *AuthServer) incCacheHit() { + s.metrics.mCache.WithLabelValues("hit").Inc() +} + +func (s *AuthServer) incCacheMiss() { + s.metrics.mCache.WithLabelValues("miss").Inc() } // Run runs cache invalidator which removes expired cache items. @@ -237,7 +366,12 @@ func (s *AuthServer) Run(ctx context.Context) { // ServeHTTP serves internal location /auth_request for both authentication subrequests // and subsequent normal requests. func (s *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { - if s.l.Logger.GetLevel() >= logrus.DebugLevel { + start := time.Now() + defer func() { + s.metrics.mDurations.WithLabelValues("total").Observe(time.Since(start).Seconds()) + }() + + if s.l.Logger.IsLevelEnabled(logrus.DebugLevel) { b, err := httputil.DumpRequest(req, true) if err != nil { s.l.Errorf("Failed to dump request: %v.", err) @@ -249,6 +383,24 @@ func (s *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { if err != nil { s.l.Warnf("Failed to parse request: %s.", err) rw.WriteHeader(http.StatusBadRequest) + + method := req.Header.Get("X-Original-Method") + if method == "" { + method = req.Method + } + + route := req.Header.Get("X-Original-Uri") + if route == "" { + route = req.URL.Path + } else if i := strings.IndexByte(route, '?'); i >= 0 { + route = route[:i] + } + cleaned, cleanErr := cleanPath(route) + if cleanErr == nil { + route = cleaned + } + + s.incAuthRequests(method, route, http.StatusBadRequest) return } @@ -266,7 +418,10 @@ func (s *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { "error": authErr.message, "message": authErr.message, //nolint:goconst } - s.returnError(rw, httpStatusForAuthError(authErr.code), m, l) + + status := httpStatusForAuthError(authErr.code) + s.incAuthRequests(req.Method, req.URL.Path, status) + s.returnError(rw, status, m, l) return } @@ -285,9 +440,12 @@ func (s *AuthServer) ServeHTTP(rw http.ResponseWriter, req *http.Request) { } l.Errorf("Failed to add VMProxy filters: %s", errF) + s.incAuthRequests(req.Method, req.URL.Path, authenticationErrorCode) s.returnError(rw, authenticationErrorCode, m, l) return } + + s.incAuthRequests(req.Method, req.URL.Path, http.StatusOK) } // httpStatusForAuthError maps an authError code to the HTTP status nginx receives. @@ -377,6 +535,11 @@ func (s *AuthServer) shallAddLBACFilters(req *http.Request) bool { // getLBACFilters retrieves LBAC filters for the user. func (s *AuthServer) getLBACFilters(ctx context.Context, userID int) ([]string, error) { + start := time.Now() + defer func() { + s.metrics.mDurations.WithLabelValues("db").Observe(time.Since(start).Seconds()) + }() + roles, err := models.GetUserRoles(s.db.Querier, userID) if err != nil { return nil, err @@ -438,14 +601,19 @@ func extractOriginalRequest(req *http.Request) error { return errors.New("empty X-Original-Uri") } if origURI[0] != '/' { - return fmt.Errorf("unexpected X-Original-Uri: %s", origURI) + return fmt.Errorf("unexpected X-Original-Uri: %q", origURI) } if !utf8.ValidString(origURI) { - return fmt.Errorf("invalid X-Original-Uri: %s", origURI) + return fmt.Errorf("invalid X-Original-Uri: %q", origURI) + } + + cleanedOrigURI, err := cleanPath(origURI) + if err != nil { + return fmt.Errorf("failed to unescape path %q: %w", origURI, err) } req.Method = origMethod - req.URL.Path = origURI + req.URL.Path = cleanedOrigURI return nil } @@ -496,10 +664,14 @@ func resolveRule(method, cleanedPath string, l *logrus.Entry) (role, string) { } } +// isLocalAgentConnection reports whether the request is a local PMM agent +// connection for endpoints that are allowed from localhost. +// This func expects that req.Method and req.URL.Path are already replaced +// with original request values - extractOriginalRequest(req) has been called beforehand. func isLocalAgentConnection(req *http.Request) bool { ip := strings.Split(req.RemoteAddr, ":")[0] // pmmAgent := req.Header.Get("Pmm-Agent-Id") - path := req.Header.Get("X-Original-Uri") + path := req.URL.Path if ip == "127.0.0.1" && (path == connectionEndpoint || path == rtaCollectEndpoint) { return true @@ -512,19 +684,11 @@ func isLocalAgentConnection(req *http.Request) bool { // It returns user information retrieved during authentication. // Paths which require no Grafana role return zero value for // some user fields such as authUser.userID. +// This func expects that req.Method and req.URL.Path are already replaced +// with original request values - extractOriginalRequest(req) has been called beforehand. func (s *AuthServer) authenticate(ctx context.Context, req *http.Request, l *logrus.Entry) (*authUser, *authError) { - // Unescape the URL-encoded parts of the path. - p := req.URL.Path - cleanedPath, err := cleanPath(p) - if err != nil { - l.Warnf("Error while unescaping path %s: %q", p, err) - return nil, &authError{ - code: codes.Internal, - message: "Internal server error.", - } - } - - minRole, prefix := resolveRule(req.Method, cleanedPath, l) + // Determine the minimal required role for the (already cleaned) original request path. + minRole, prefix := resolveRule(req.Method, req.URL.Path, l) l = l.WithField("prefix", prefix) if minRole == none { @@ -534,7 +698,7 @@ func (s *AuthServer) authenticate(ctx context.Context, req *http.Request, l *log var user *authUser if isLocalAgentConnection(req) { - if req.Header.Get("X-Original-Uri") == connectionEndpoint { + if req.URL.Path == connectionEndpoint { user = &authUser{ role: rules[connectionEndpoint], userID: 0, @@ -603,9 +767,11 @@ func (s *AuthServer) getAuthUser(ctx context.Context, req *http.Request, l *logr // cacheInvalidationInterval, so without this an entry could be served for almost // twice that long. Re-fetch once an entry is older than the interval. if ok && time.Since(item.created) < cacheInvalidationInterval { + s.incCacheHit() return &item.u, nil } + s.incCacheMiss() return s.retrieveRole(ctx, hash, authHeaders, l) } @@ -623,17 +789,25 @@ func (s *AuthServer) authHeaders(req *http.Request) http.Header { } func (s *AuthServer) retrieveRole(ctx context.Context, hash string, authHeaders http.Header, l *logrus.Entry) (*authUser, *authError) { + start := time.Now() + defer func() { + s.metrics.mDurations.WithLabelValues("grafana").Observe(time.Since(start).Seconds()) + }() + authUser, err := s.c.getAuthUser(ctx, authHeaders, l) if err != nil { l.Warnf("%s", err) cErr, ok := errors.AsType[*clientError](err) if ok { + s.incGrafanaAuthRequests(cErr.Code) + code := codes.Internal - if cErr.Code == 401 || cErr.Code == 403 { + if cErr.Code == http.StatusUnauthorized || cErr.Code == http.StatusForbidden { code = codes.Unauthenticated } return nil, &authError{code: code, message: cErr.ErrorMessage} } + s.incGrafanaAuthRequests(http.StatusInternalServerError) return nil, &authError{code: codes.Internal, message: "Internal server error."} } s.rw.Lock() @@ -643,5 +817,8 @@ func (s *AuthServer) retrieveRole(ctx context.Context, hash string, authHeaders } s.rw.Unlock() + s.incGrafanaAuthRequests(http.StatusOK) return &authUser, nil } + +var _ prom.Collector = (*AuthServer)(nil) diff --git a/managed/services/grafana/auth_server_test.go b/managed/services/grafana/auth_server_test.go index a009ab5d185..da17a93088a 100644 --- a/managed/services/grafana/auth_server_test.go +++ b/managed/services/grafana/auth_server_test.go @@ -25,6 +25,7 @@ import ( "time" "github.com/google/uuid" + "github.com/prometheus/client_golang/prometheus/testutil" "github.com/sirupsen/logrus" "github.com/stretchr/testify/assert" "github.com/stretchr/testify/require" @@ -378,3 +379,41 @@ func TestCleanPath(t *testing.T) { }) } } + +func TestAuthServerServeHTTPBadRequestMetricsUsesCleanedRoute(t *testing.T) { + t.Parallel() + + s := NewAuthServer(nil, nil) + rr := httptest.NewRecorder() + req := httptest.NewRequestWithContext(t.Context(), http.MethodGet, "/auth_request", nil) + + // Trigger extractOriginalRequest error (missing X-Original-Method), + // but keep X-Original-Uri so ServeHTTP records a metric for it. + req.Header.Set("X-Original-Uri", "/v1/server/AWSInstanceCheck/..%2f..%2f..%2f/logs.zip?foo=bar") + + s.ServeHTTP(rr, req) + + require.Equal(t, http.StatusBadRequest, rr.Code) + + value := testutil.ToFloat64(s.metrics.mAuthRequests.WithLabelValues(http.MethodGet, "/logs.zip", "400")) + require.InDelta(t, 1.0, value, 0.0, "expected auth request metric with cleaned route") +} + +func TestAuthServerServeHTTPBadRequestMetricsFallbackToRawRouteOnCleanError(t *testing.T) { + t.Parallel() + + s := NewAuthServer(nil, nil) + rr := httptest.NewRecorder() + req := httptest.NewRequestWithContext(t.Context(), http.MethodPost, "/auth_request", nil) + + // Invalid escape sequence keeps cleanPath from normalizing the path, + // so ServeHTTP should use route value after query trimming. + req.Header.Set("X-Original-Uri", "/bad%2?foo=bar") + + s.ServeHTTP(rr, req) + + require.Equal(t, http.StatusBadRequest, rr.Code) + + value := testutil.ToFloat64(s.metrics.mAuthRequests.WithLabelValues(http.MethodPost, "/bad%2", "400")) + require.InDelta(t, 1.0, value, 0.0, "expected auth request metric with original route when cleaning fails") +}