{ "annotations": { "list": [ { "$$hashKey": "object:721", "builtIn": 1, "datasource": { "type": "datasource", "uid": "grafana" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "limit": 100, "name": "Annotations & Alerts", "showIn": 0, "type": "dashboard" } ] }, "description": "This dashboard works with postgres_exporter for prometheus", "editable": true, "fiscalYearStartMonth": 0, "gnetId": 12273, "graphTooltip": 1, "links": [], "panels": [ { "collapsed": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 0 }, "id": 167, "panels": [], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Overview", "type": "row" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "description": "Time from last Postgres process restart. < 5m Error, < 30m Warn thresholds by default", "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 300 }, { "color": "#d44a3a", "value": 1800 } ] }, "unit": "dateTimeFromNow" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 0, "y": 1 }, "id": 164, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_postmaster_start_time_seconds{hostname=\"$hostname\"} * 1000", "format": "time_series", "intervalFactor": 2, "legendFormat": "", "refId": "A" } ], "title": "Uptime Postgres", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 5 }, { "color": "#d44a3a", "value": 10 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 6, "y": 1 }, "id": 175, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "(sum(pg_stat_database_xact_rollback{hostname=\"$hostname\"})/sum(pg_stat_database_xact_commit{hostname=\"$hostname\"}))*100", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], "title": "rollback/commit", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 0 }, { "color": "#d44a3a", "value": 5 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 12, "y": 1 }, "id": 179, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(pg_stat_activity_count{hostname=\"$hostname\",state=\"idle in transaction\"})", "hide": false, "intervalFactor": 1, "legendFormat": "idle in transaction sessions", "refId": "C", "step": 2 } ], "title": "Count idle in transaction", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 10 }, { "color": "#d44a3a", "value": 25 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 18, "y": 1 }, "id": 171, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "aggregation": "Last", "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 2, "displayAliasType": "Warning / Critical", "displayType": "Regular", "displayValueWithAlias": "Never", "expr": "sum(pg_locks_count{datname=~\"$datname\", datname!=\"postgres\", hostname=~\"$hostname\", mode=~\"$mode\", mode!=\"accesssharelock\", mode!=\"rowsharelock\", mode!=\"sharelock\"} > 1)", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} {{mode}}", "refId": "A", "units": "none", "valueHandler": "Number Threshold" } ], "title": "Sum ExclusiveLock on instance", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#d44a3a", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 70 }, { "color": "#299c46", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 0, "y": 3 }, "id": 173, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "round(100*sum(pg_stat_database_blks_hit{hostname=\"$hostname\"}) / (sum(pg_stat_database_blks_hit{hostname=\"$hostname\"}) + sum(pg_stat_database_blks_read{hostname=\"$hostname\"})),0.1)", "hide": false, "interval": "", "intervalFactor": 2, "legendFormat": "pg cache hit rate", "refId": "A", "step": 2 } ], "title": "PG buffer cache hit rate", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 75 }, { "color": "#d44a3a", "value": 85 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 6, "y": 3 }, "id": 169, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "(sum(pg_stat_activity_count{hostname=\"$hostname\"}) / sum(pg_settings_max_connections)) * 100", "hide": false, "interval": "", "intervalFactor": 1, "legendFormat": "total/all connection", "metric": "pg_runtime_variable_max_connections", "refId": "A", "step": 2 } ], "title": "% current/total connections", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 10 }, { "color": "#d44a3a", "value": 20 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 12, "y": 3 }, "id": 177, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "(sum(rate(pg_stat_database_xact_rollback{hostname=\"$hostname\"}[1m])) + sum(rate(pg_stat_database_xact_commit{hostname=\"$hostname\"}[1m])))/60", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "TPS", "refId": "A" } ], "title": "Transactions per second", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 4 }, { "color": "#d44a3a", "value": 6 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 18, "y": 3 }, "id": 172, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "aggregation": "Last", "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 2, "displayAliasType": "Warning / Critical", "displayType": "Regular", "displayValueWithAlias": "Never", "expr": "sum(pg_locks_count{datname=~\"$datname\", datname!=\"postgres\", hostname=~\"$hostname\", mode=~\"$mode\", mode!=\"accessexclusivelock\", mode!=\"exclusivelock\", mode!=\"rowexclusivelock\", mode!=\"sharerowexclusivelock\", mode!=\"shareupdateexclusivelock\" })", "format": "time_series", "intervalFactor": 1, "legendFormat": "", "refId": "A", "units": "none", "valueHandler": "Number Threshold" } ], "title": "Sum ShareLock on instance", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 10 }, { "color": "#d44a3a", "value": 20 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 0, "y": 5 }, "id": 181, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_statements_calls{hostname=~\"$hostname\"}[1m]))/60", "format": "time_series", "intervalFactor": 2, "legendFormat": "", "refId": "A" } ], "title": "Queries per second", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 1 }, { "color": "#d44a3a", "value": 2 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 6, "y": 5 }, "id": 183, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_statements_mean_time_seconds{datname!~\"template.*\", datname!~\"postgres\", hostname=~\"$hostname\"}[1m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "", "refId": "A" } ], "title": "Mean query time avg 1m by instance", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "description": "Connected sessions, including Postgres internal processes like Autovacuum. < 1 Warn / > 300 Error thresholds by default", "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "#299c46", "value": null }, { "color": "rgba(237, 129, 40, 0.89)", "value": 1 }, { "color": "#d44a3a", "value": 300 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 6, "x": 12, "y": 5 }, "id": 165, "maxDataPoints": 100, "options": { "colorMode": "background", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(pg_stat_activity_count{state=\"active\"})", "format": "time_series", "interval": "", "intervalFactor": 2, "legendFormat": "", "refId": "A", "step": 2 } ], "title": "Active sessions", "type": "stat" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 7 }, "id": 158, "panels": [ { "columns": [], "datasource": { "type": "prometheus", "uid": "mimir" }, "fontSize": "100%", "gridPos": { "h": 7, "w": 24, "x": 0, "y": 2 }, "id": 160, "links": [], "options": {}, "scroll": true, "showHeader": true, "sort": { "col": 2, "desc": false }, "styles": [ { "alias": "Time", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "job", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "queryid", "thresholds": [], "type": "string", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "alias", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "__name__", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "hostname", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "server", "thresholds": [], "type": "hidden", "unit": "short" } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "topk(5, pg_stat_statements_mean_time_seconds{datname!~\"template.*\", datname!~\"postgres\", hostname=~\"$hostname\", datname=~\"$datname\"})", "format": "table", "instant": true, "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], "title": "TOP-5 Most long-running queries by mean_time second", "transform": "table", "type": "table-old" } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "TOP-5 Most long-running queries by mean_time", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 8 }, "id": 154, "panels": [ { "columns": [], "datasource": { "type": "prometheus", "uid": "mimir" }, "fontSize": "100%", "gridPos": { "h": 7, "w": 24, "x": 0, "y": 3 }, "id": 156, "links": [], "options": {}, "scroll": true, "showHeader": true, "sort": { "col": 7, "desc": true }, "styles": [ { "alias": "Time", "align": "auto", "dateFormat": "YYYY-MM-DD HH:mm:ss", "pattern": "Time", "type": "hidden" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "job", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "queryid", "thresholds": [], "type": "string", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "pattern": "__name__", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "alias", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "dateFormat": "YYYY-MM-DD HH:mm:ss", "decimals": 2, "mappingType": 1, "pattern": "server", "thresholds": [], "type": "hidden", "unit": "short" }, { "alias": "", "align": "auto", "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "decimals": 2, "pattern": "/.*/", "thresholds": [], "type": "number", "unit": "short" } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "topk(5, pg_stat_statements_calls{datname!~\"template.*\", datname!~\"postgres\", hostname=~\"$hostname\", datname=~\"$datname\"})", "format": "table", "instant": true, "intervalFactor": 2, "legendFormat": "", "refId": "A" } ], "title": "TOP-5 Most called queries", "transform": "table", "type": "table-old" } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "TOP-5 Most called queries", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 9 }, "id": 142, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 4 }, "hiddenSeries": false, "id": 144, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_statements_mean_time_seconds{datname!~\"template.*\", datname!~\"postgres\", hostname=~\"$hostname\"}[1m]))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ hostname }}", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Mean query time avg 1m by instance", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "s", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 4 }, "hiddenSeries": false, "id": 146, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(increase(pg_stat_statements_calls{datname!~\"template.*\", datname!~\"postgres\", hostname=~\"$hostname\", datname=~\"$datname\"}[1m])) by (datname) > 100", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ datname }}", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Mean query time by entire database", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "s", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Syntetic query time", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 10 }, "id": 148, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 5 }, "hiddenSeries": false, "id": 150, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(increase(pg_stat_statements_calls{datname!~\"template.*\", datname!~\"postgres\", hostname=~\"$hostname\"}[1m])) by (hostname)", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{hostname}}", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Total queries count (1m rate) by entire instance", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 5 }, "hiddenSeries": false, "id": 152, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(increase(pg_stat_statements_calls{datname!~\"template.*\", datname!~\"postgres\", hostname=~\"$hostname\", datname=~\"$datname\"}[1m])) by (datname) > 100", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ datname }}", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Total queries count (1m rate) by database", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Syntetic queries count", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 11 }, "id": 138, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 6 }, "hiddenSeries": false, "id": 140, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "topk(5, (pg_database_size{hostname=\"$hostname\"}))", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{ datname }}", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Database size", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "bytes", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Database size", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 12 }, "id": 116, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 2, "fillGradient": 0, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 7 }, "hiddenSeries": false, "id": 134, "legend": { "alignAsTable": true, "avg": true, "current": false, "hideEmpty": false, "hideZero": false, "max": true, "min": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_bgwriter_checkpoint_write_time{hostname=\"$hostname\"}[$interval]) or\nirate(pg_stat_bgwriter_checkpoint_write_time{hostname=\"$hostname\"}[5m])", "format": "time_series", "hide": false, "interval": "$interval", "intervalFactor": 1, "legendFormat": "Written Files to disk", "metric": "pg_stat_bgwriter_checkpoint_write_time", "refId": "B", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_bgwriter_checkpoint_sync_time{hostname=\"$hostname\"}[$interval]) or\nirate(pg_stat_bgwriter_checkpoint_sync_time{hostname=\"$hostname\"}[5m])", "format": "time_series", "hide": false, "interval": "$interval", "intervalFactor": 1, "legendFormat": "Files Synchronization to disk", "metric": "pg_stat_bgwriter_checkpoint_sync_time", "refId": "A", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Checkpoint stats", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "ops", "logBase": 1, "min": "0", "show": true }, { "format": "ms", "logBase": 1, "show": false } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "description": "write_time - Total amount of time that has been spent in the portion of checkpoint processing where files are written to disk.\n\nsync_time - Total amount of time that has been spent in the portion of checkpoint processing where files are synchronized to disk.", "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 24, "x": 0, "y": 15 }, "hiddenSeries": false, "id": 92, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": true, "rightSide": false, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_bgwriter_checkpoint_write_time{hostname=\"$hostname\"}[5m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "write_time", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_bgwriter_checkpoint_sync_time{hostname=\"$hostname\"}[5m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "sync_time", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Checkpoint Stats", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "ms", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Checkpoint", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 13 }, "id": 128, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 2, "fill": 2, "fillGradient": 0, "gridPos": { "h": 9, "w": 12, "x": 0, "y": 12 }, "hiddenSeries": false, "id": 130, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [ { "alias": "/Write */", "yaxis": 2 } ], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_blk_read_time{datname=~\"$datname\",hostname=~\"$hostname\",datname!~\"template.*|postgres\"}[5m])", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "legendFormat": "Read {{datname}}", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_blk_write_time{datname=~\"$datname\",hostname=~\"$hostname\",datname!~\"template.*|postgres\"}[5m])", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "legendFormat": "Write {{datname}}", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Operations with Blocks", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 0, "format": "rps", "label": "", "logBase": 1, "min": "0", "show": true }, { "decimals": 0, "format": "wps", "logBase": 1, "min": "0", "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 2, "editable": true, "error": false, "fill": 2, "fillGradient": 0, "grid": {}, "gridPos": { "h": 9, "w": 12, "x": 12, "y": 12 }, "hiddenSeries": false, "id": 132, "legend": { "alignAsTable": true, "avg": true, "current": false, "hideZero": false, "max": true, "min": true, "rightSide": false, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "Buffers Allocated", "datasource": { "type": "prometheus", "uid": "mimir" }, "dsType": "prometheus", "expr": "rate(pg_stat_bgwriter_buffers_alloc{hostname=\"$hostname\"}[$interval]) or \nirate(pg_stat_bgwriter_buffers_alloc{hostname=\"$hostname\"}[5m])", "format": "time_series", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "interval": "$interval", "intervalFactor": 1, "legendFormat": "Allocated", "measurement": "postgresql", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "buffers_alloc" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [], "type": "difference" } ] ], "step": 2, "tags": [ { "key": "host", "operator": "=~", "value": "/^$host$/" } ] }, { "alias": "Buffers Allocated", "datasource": { "type": "prometheus", "uid": "mimir" }, "dsType": "prometheus", "expr": "rate(pg_stat_bgwriter_buffers_backend_fsync{hostname=\"$hostname\"}[$interval]) or\nirate(pg_stat_bgwriter_buffers_backend_fsync{hostname=\"$hostname\"}[5m])", "format": "time_series", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "interval": "$interval", "intervalFactor": 1, "legendFormat": "Fsync calls by a backend", "measurement": "postgresql", "policy": "default", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "buffers_alloc" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [], "type": "difference" } ] ], "step": 2, "tags": [ { "key": "host", "operator": "=~", "value": "/^$host$/" } ] }, { "alias": "Buffers Allocated", "datasource": { "type": "prometheus", "uid": "mimir" }, "dsType": "prometheus", "expr": "rate(pg_stat_bgwriter_buffers_backend{hostname=\"$hostname\"}[$interval]) or\nirate(pg_stat_bgwriter_buffers_backend{hostname=\"$hostname\"}[5m])", "format": "time_series", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "interval": "$interval", "intervalFactor": 1, "legendFormat": "Written directly by a backend", "measurement": "postgresql", "policy": "default", "refId": "C", "resultFormat": "time_series", "select": [ [ { "params": [ "buffers_alloc" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [], "type": "difference" } ] ], "step": 2, "tags": [ { "key": "host", "operator": "=~", "value": "/^$host$/" } ] }, { "alias": "Buffers Allocated", "datasource": { "type": "prometheus", "uid": "mimir" }, "dsType": "prometheus", "expr": "rate(pg_stat_bgwriter_buffers_clean{hostname=\"$hostname\"}[$interval]) or \nirate(pg_stat_bgwriter_buffers_clean{hostname=\"$hostname\"}[5m])", "format": "time_series", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "interval": "$interval", "intervalFactor": 1, "legendFormat": "Written by the background writer", "measurement": "postgresql", "policy": "default", "refId": "D", "resultFormat": "time_series", "select": [ [ { "params": [ "buffers_alloc" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [], "type": "difference" } ] ], "step": 2, "tags": [ { "key": "host", "operator": "=~", "value": "/^$host$/" } ] }, { "alias": "Buffers Allocated", "datasource": { "type": "prometheus", "uid": "mimir" }, "dsType": "prometheus", "expr": "rate(pg_stat_bgwriter_buffers_checkpoint{hostname=\"$hostname\"}[5m]) or\nirate(pg_stat_bgwriter_buffers_checkpoint{hostname=\"$hostname\"}[5m])", "format": "time_series", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "interval": "$interval", "intervalFactor": 1, "legendFormat": "Written during checkpoints", "measurement": "postgresql", "policy": "default", "refId": "E", "resultFormat": "time_series", "select": [ [ { "params": [ "buffers_alloc" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [], "type": "difference" } ] ], "step": 2, "tags": [ { "key": "host", "operator": "=~", "value": "/^$host$/" } ] } ], "thresholds": [], "timeRegions": [], "title": "Buffers (bgwriter)", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": 0, "show": true }, { "format": "short", "logBase": 1, "show": false } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Buffers & Blocks Operations", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 14 }, "id": 110, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 9 }, "hiddenSeries": false, "id": 104, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideZero": true, "max": true, "min": false, "show": false, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_max_connections", "hide": false, "interval": "", "intervalFactor": 1, "legendFormat": "max_connections", "metric": "pg_runtime_variable_max_connections", "refId": "A", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(pg_stat_activity_count{hostname=\"$hostname\"})", "hide": false, "intervalFactor": 1, "legendFormat": "total connections", "metric": "pg", "refId": "B", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(pg_stat_activity_count{hostname=\"$hostname\",state=\"idle\"})", "hide": false, "intervalFactor": 1, "legendFormat": "idle sessions", "refId": "E", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(pg_stat_activity_count{hostname=\"$hostname\",state=\"active\"})", "hide": false, "intervalFactor": 1, "legendFormat": "active sessions", "refId": "D", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(pg_stat_activity_count{hostname=\"$hostname\",state=\"idle in transaction\"})", "hide": false, "intervalFactor": 1, "legendFormat": "idle in transaction sessions", "refId": "C", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(pg_stat_activity_count{hostname=\"$hostname\",state=\"idle in transaction (aborted)\"})", "intervalFactor": 1, "legendFormat": "idle in transaction (aborted) sessions", "refId": "F", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Count general connections", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 9 }, "hiddenSeries": false, "id": 1, "legend": { "alignAsTable": true, "avg": true, "current": true, "max": true, "min": false, "rightSide": true, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": false, "linewidth": 1, "links": [], "nullPointMode": "connected", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 3, "points": true, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_stat_activity_count{datname=~\"$datname\", hostname=~\"$hostname\", state=\"active\"} !=0", "format": "time_series", "interval": "", "intervalFactor": 2, "legendFormat": "{{datname}}, s: {{state}}", "refId": "A", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Active sessions", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 0, "format": "none", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 16 }, "hiddenSeries": false, "id": 76, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "topk(5, (pg_stat_activity_count{hostname=\"$hostname\"}))", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} {{state}}", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Connections in detail", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Connection", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 15 }, "id": 32, "panels": [ { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "decbytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 4, "x": 0, "y": 14 }, "height": "200px", "id": 10, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "SUM(pg_stat_database_tup_fetched{datname=~\"$datname\", hostname=~\"$hostname\"})", "format": "time_series", "intervalFactor": 2, "refId": "A", "step": 4 } ], "thresholds": "", "title": "Current fetch data", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "bytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 3, "x": 4, "y": 14 }, "id": 42, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_effective_cache_size_bytes{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Effective Cache", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "bytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 3, "x": 7, "y": 14 }, "id": 46, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_work_mem_bytes{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "legendFormat": "", "refId": "A" } ], "thresholds": "", "title": "Work Mem", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 1, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "bytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 3, "x": 10, "y": 14 }, "id": 48, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_max_wal_size_bytes{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Max WAL Size", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 4, "x": 13, "y": 14 }, "id": 54, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_max_worker_processes{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Max Worker Processes", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "avg" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 3, "x": 17, "y": 14 }, "id": 52, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_seq_page_cost", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Seq Page Cost", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 2, "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": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "bytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 4, "x": 20, "y": 14 }, "id": 126, "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" } ], "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_wal_buffers_bytes{hostname=~\"$hostname\"}", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Disk-Page Buffers", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "decbytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 4, "x": 0, "y": 16 }, "height": "200px", "id": 11, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "SUM(pg_stat_database_tup_inserted{datname=~\"$datname\", hostname=~\"$hostname\"})", "format": "time_series", "intervalFactor": 2, "refId": "A", "step": 4 } ], "thresholds": "", "title": "Current insert data", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "bytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 4, "x": 7, "y": 17 }, "id": 44, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_maintenance_work_mem_bytes{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Maintenance Work Mem", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 3, "x": 11, "y": 17 }, "id": 50, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_random_page_cost{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Random Page Cost", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "bytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 3, "x": 14, "y": 17 }, "id": 40, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_shared_buffers_bytes{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Shared Buffers", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": true, "colors": [ "#299c46", "#7eb26d", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 3, "x": 17, "y": 17 }, "id": 36, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_static{hostname=\"$hostname\"}", "format": "time_series", "instant": true, "intervalFactor": 1, "legendFormat": "{{short_version}}", "refId": "A" } ], "thresholds": "", "title": "Version", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "name" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "#299c46", "rgba(237, 129, 40, 0.89)", "#d44a3a" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "none", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 3, "w": 4, "x": 20, "y": 17 }, "id": 56, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_settings_max_parallel_workers{hostname=\"$hostname\"}", "format": "time_series", "intervalFactor": 1, "refId": "A" } ], "thresholds": "", "title": "Max Parallel Workers", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" }, { "autoMigrateFrom": "singlestat", "colorBackground": false, "colorValue": false, "colors": [ "rgba(245, 54, 54, 0.9)", "rgba(237, 129, 40, 0.89)", "rgba(50, 172, 45, 0.97)" ], "datasource": { "type": "prometheus", "uid": "mimir" }, "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green" }, { "color": "red", "value": 80 } ] } }, "overrides": [] }, "format": "decbytes", "gauge": { "maxValue": 100, "minValue": 0, "show": false, "thresholdLabels": false, "thresholdMarkers": true }, "gridPos": { "h": 2, "w": 4, "x": 0, "y": 18 }, "height": "200px", "id": 12, "mappingType": 1, "mappingTypes": [ { "name": "value to text", "value": 1 }, { "name": "range to text", "value": 2 } ], "maxDataPoints": 100, "nullPointMode": "connected", "options": { "colorMode": "value", "graphMode": "area", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "11.0.0", "postfix": "", "postfixFontSize": "50%", "prefix": "", "prefixFontSize": "50%", "rangeMaps": [ { "from": "null", "text": "N/A", "to": "null" } ], "sparkline": { "fillColor": "rgba(31, 118, 189, 0.18)", "full": false, "lineColor": "rgb(31, 120, 193)", "show": false }, "tableColumn": "", "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "SUM(pg_stat_database_tup_updated{datname=~\"$datname\", hostname=~\"$hostname\"})", "format": "time_series", "intervalFactor": 2, "refId": "A", "step": 4 } ], "thresholds": "", "title": "Current update data", "type": "stat", "valueFontSize": "80%", "valueMaps": [ { "op": "=", "text": "N/A", "value": "null" } ], "valueName": "current" } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "General Counters", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 16 }, "id": 74, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 11 }, "hiddenSeries": false, "id": 78, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_xact_commit{hostname=\"$hostname\"}[1m]) > 1", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "{{datname}} commits", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Transactions commits", "tooltip": { "shared": true, "sort": 1, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 24, "x": 0, "y": 18 }, "hiddenSeries": false, "id": 186, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "sort": "current", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_xact_rollback{hostname=\"$hostname\"}[1m]) > 1", "format": "time_series", "hide": false, "intervalFactor": 1, "legendFormat": "{{datname}} rollbacks", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Transactions rollbacks", "tooltip": { "shared": true, "sort": 1, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Transaction", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 17 }, "id": 185, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 12 }, "hiddenSeries": false, "id": 82, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_stat_activity_max_tx_duration{hostname=\"$hostname\"} > 0", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} max_tx_duration [{{state}}]", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Longest Transaction", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "s", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Longest Transaction", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 18 }, "id": 112, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 5, "w": 24, "x": 0, "y": 13 }, "hiddenSeries": false, "id": 80, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "sort": "max", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_tup_fetched{hostname=\"$hostname\"}[5m]) > 1000", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} SELECT (index scan)", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_tup_returned{hostname=\"$hostname\"}[5m]) > 1000", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} SELECT (table scan)", "refId": "B" } ], "thresholds": [], "timeRegions": [], "title": "Read Stats", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Rows", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 4, "w": 24, "x": 0, "y": 18 }, "hiddenSeries": false, "id": 84, "legend": { "alignAsTable": true, "avg": true, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "sort": "max", "sortDesc": false, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_tup_inserted{hostname=\"$hostname\"}[5m]) > 1", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} INSERT", "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_tup_updated{hostname=\"$hostname\"}[5m]) > 1", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} UPDATE", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_tup_deleted{hostname=\"$hostname\"}[5m]) > 1", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} DELETE", "refId": "C" } ], "thresholds": [], "timeRegions": [], "title": "Change Stats", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "label": "Rows", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Select, insert, update", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 19 }, "id": 100, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 6, "w": 24, "x": 0, "y": 14 }, "hiddenSeries": false, "id": 102, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_replication_lag{hostname=\"$hostname\"}[5m])", "format": "time_series", "intervalFactor": 2, "legendFormat": "{{hostname}}", "metric": "pg_replication_lag", "refId": "A", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Replication Lag (Only for Replica)", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "s", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": false } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Replication Lag", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 20 }, "id": 118, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 0, "fill": 1, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 0, "y": 18 }, "hiddenSeries": false, "id": 90, "legend": { "alignAsTable": true, "avg": true, "current": false, "hideEmpty": true, "hideZero": true, "max": true, "min": true, "rightSide": true, "show": true, "total": true, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null as zero", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pluginVersion": "6.5.3", "pointradius": 3, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": true, "steppedLine": false, "targets": [ { "aggregation": "Last", "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 2, "displayAliasType": "Warning / Critical", "displayType": "Regular", "displayValueWithAlias": "Never", "expr": "pg_locks_count{datname=~\"$datname\", datname!=\"postgres\", hostname=~\"$hostname\", mode=~\"$mode\"} > 1", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} {{mode}}", "refId": "A", "units": "none", "valueHandler": "Number Threshold" } ], "thresholds": [], "timeRegions": [], "title": "Lock Tables", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 0, "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "decimals": 0, "description": "Based on pg_stat_database_conflicts view", "fill": 2, "fillGradient": 0, "gridPos": { "h": 8, "w": 12, "x": 12, "y": 18 }, "hiddenSeries": false, "id": 136, "legend": { "alignAsTable": true, "avg": true, "current": false, "max": true, "min": true, "show": true, "sort": "avg", "sortDesc": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_database_conflicts_confl_bufferpin{hostname=~\"$hostname\"}[$interval])) or\nsum(irate(pg_stat_database_conflicts_confl_bufferpin{hostname=~\"$hostname\"}[5m]))", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "legendFormat": "Pinned buffers", "metric": "pg_stat_database_conflicts_confl_bufferpin", "refId": "A", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_database_conflicts_confl_deadlock{hostname=~\"$hostname\"}[$interval])) or\nsum(irate(pg_stat_database_conflicts_confl_deadlock{hostname=~\"$hostname\"}[5m]))", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "legendFormat": "Deadlocks", "metric": "pg_stat_database_conflicts_confl_bufferpin", "refId": "B", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_database_conflicts_confl_lock{hostname=~\"$hostname\"}[$interval])) or\nsum(irate(pg_stat_database_conflicts_confl_lock{hostname=~\"$hostname\"}[5m]))", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "legendFormat": "Lock timeouts", "metric": "pg_stat_database_conflicts_confl_bufferpin", "refId": "C", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_database_conflicts_confl_snapshot{hostname=~\"$hostname\"}[$interval])) or\nsum(irate(pg_stat_database_conflicts_confl_snapshot{hostname=~\"$hostname\"}[5m]))", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "legendFormat": "Old snapshots", "metric": "pg_stat_database_conflicts_confl_bufferpin", "refId": "D", "step": 2 }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "sum(rate(pg_stat_database_conflicts_confl_tablespace{hostname=~\"$hostname\"}[$interval])) or\nsum(irate(pg_stat_database_conflicts_confl_tablespace{hostname=~\"$hostname\"}[5m]))", "format": "time_series", "interval": "$interval", "intervalFactor": 1, "legendFormat": "Dropped tablespaces ", "metric": "pg_stat_database_conflicts_confl_bufferpin", "refId": "E", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "Canceled Queries", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 0, "format": "ops", "logBase": 1, "min": "0", "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 26 }, "hiddenSeries": false, "id": 94, "legend": { "alignAsTable": true, "avg": false, "current": true, "hideEmpty": true, "hideZero": true, "max": false, "min": false, "rightSide": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_conflicts{hostname=\"$hostname\"}[5m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} conflicts", "refId": "B" }, { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "rate(pg_stat_database_deadlocks{hostname=\"$hostname\"}[5m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} deadlocks", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Conflicts/Deadlocks", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "editable": true, "error": false, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { "h": 7, "w": 12, "x": 12, "y": 26 }, "hiddenSeries": false, "id": 114, "legend": { "avg": false, "current": false, "max": false, "min": false, "show": true, "total": false, "values": false }, "lines": true, "linewidth": 2, "links": [], "nullPointMode": "connected", "options": { "dataLinks": [] }, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "alias": "conflicts", "datasource": { "type": "prometheus", "uid": "mimir" }, "dsType": "prometheus", "expr": "sum(rate(pg_stat_database_deadlocks{hostname=\"$hostname\"}[5m]))", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "legendFormat": "deadlocks", "measurement": "postgresql", "policy": "default", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "conflicts" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [], "type": "difference" } ] ], "step": 2, "tags": [ { "key": "host", "operator": "=~", "value": "/^$host$/" } ] }, { "alias": "deadlocks", "datasource": { "type": "prometheus", "uid": "mimir" }, "dsType": "prometheus", "expr": "sum(rate(pg_stat_database_conflicts{hostname=\"$hostname\"}[5m]))", "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "intervalFactor": 2, "legendFormat": "conflicts", "measurement": "postgresql", "policy": "default", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "deadlocks" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [], "type": "difference" } ] ], "step": 2, "tags": [ { "key": "host", "operator": "=~", "value": "/^$host$/" } ] } ], "thresholds": [], "timeRegions": [], "title": "Repl. Conflicts/Deadlocks", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "short", "logBase": 1, "min": 0, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Conflicts & Locks", "type": "row" }, { "collapsed": true, "datasource": { "type": "prometheus", "uid": "mimir" }, "gridPos": { "h": 1, "w": 24, "x": 0, "y": 21 }, "id": 86, "panels": [ { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "editable": true, "error": false, "fill": 1, "fillGradient": 0, "grid": {}, "gridPos": { "h": 5, "w": 12, "x": 0, "y": 21 }, "hiddenSeries": false, "id": 124, "legend": { "avg": true, "current": true, "max": false, "min": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 2, "links": [], "maxPerRow": 6, "nullPointMode": "connected", "options": { "dataLinks": [] }, "percentage": true, "pointradius": 1, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "round(100*sum(pg_stat_database_blks_hit{hostname=\"$hostname\"}) / (sum(pg_stat_database_blks_hit{hostname=\"$hostname\"}) + sum(pg_stat_database_blks_read{hostname=\"$hostname\"})),0.1)", "hide": false, "interval": "", "intervalFactor": 2, "legendFormat": "pg cache hit rate", "refId": "A", "step": 2 } ], "thresholds": [], "timeRegions": [], "title": "PG buffer cache hit rate", "tooltip": { "msResolution": false, "shared": true, "sort": 0, "value_type": "cumulative" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "percent", "logBase": 1, "max": "100", "show": true }, { "format": "percent", "label": "", "logBase": 1, "max": "100", "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "description": "Total amount of data written to temporary files by queries in this database. All temporary files are counted, regardless of why the temporary file was created, and regardless of the log_temp_files setting.", "fill": 1, "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 12, "y": 21 }, "hiddenSeries": false, "id": 96, "legend": { "alignAsTable": true, "avg": false, "current": true, "hideEmpty": true, "hideZero": true, "max": true, "min": false, "rightSide": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "irate(pg_stat_database_temp_bytes{hostname=\"$hostname\"}[5m])", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} Temp Bytes", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Temp File", "tooltip": { "shared": true, "sort": 2, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "format": "bytes", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } }, { "aliasColors": {}, "bars": false, "dashLength": 10, "dashes": false, "datasource": { "type": "prometheus", "uid": "mimir" }, "fill": 1, "fillGradient": 0, "gridPos": { "h": 6, "w": 12, "x": 0, "y": 26 }, "hiddenSeries": false, "id": 98, "legend": { "alignAsTable": true, "avg": false, "current": true, "hideEmpty": true, "hideZero": true, "max": false, "min": false, "rightSide": true, "show": true, "total": false, "values": true }, "lines": true, "linewidth": 1, "links": [], "nullPointMode": "null", "options": { "dataLinks": [] }, "paceLength": 10, "percentage": false, "pointradius": 5, "points": false, "renderer": "flot", "seriesOverrides": [], "spaceLength": 10, "stack": false, "steppedLine": false, "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "expr": "pg_stat_database_blks_hit{hostname=\"$hostname\"} / (pg_stat_database_blks_read{hostname=\"$hostname\"} + pg_stat_database_blks_hit{hostname=\"$hostname\"})", "format": "time_series", "intervalFactor": 1, "legendFormat": "{{datname}} Cache Hit Rate", "refId": "A" } ], "thresholds": [], "timeRegions": [], "title": "Cache Hit Rate", "tooltip": { "shared": true, "sort": 0, "value_type": "individual" }, "type": "graph", "xaxis": { "mode": "time", "show": true, "values": [] }, "yaxes": [ { "decimals": 4, "format": "percentunit", "label": "", "logBase": 1, "show": true }, { "format": "short", "logBase": 1, "show": true } ], "yaxis": { "align": false } } ], "targets": [ { "datasource": { "type": "prometheus", "uid": "mimir" }, "refId": "A" } ], "title": "Cache & Temp file", "type": "row" } ], "refresh": "5m", "schemaVersion": 39, "tags": [ "postgres", "db", "stats" ], "templating": { "list": [ { "auto": true, "auto_count": 200, "auto_min": "1s", "current": { "selected": false, "text": "auto", "value": "$__auto_interval_interval" }, "hide": 0, "label": "Interval", "name": "interval", "options": [ { "selected": true, "text": "auto", "value": "$__auto_interval_interval" }, { "selected": false, "text": "1s", "value": "1s" }, { "selected": false, "text": "5s", "value": "5s" }, { "selected": false, "text": "1m", "value": "1m" }, { "selected": false, "text": "5m", "value": "5m" }, { "selected": false, "text": "1h", "value": "1h" }, { "selected": false, "text": "6h", "value": "6h" }, { "selected": false, "text": "1d", "value": "1d" } ], "query": "1s,5s,1m,5m,1h,6h,1d", "refresh": 2, "skipUrlSync": false, "type": "interval" }, { "current": { "selected": false, "text": "bagel-box", "value": "bagel-box" }, "datasource": { "type": "prometheus", "uid": "mimir" }, "definition": "label_values(pg_up,hostname)", "hide": 0, "includeAll": false, "label": "Host", "multi": false, "name": "hostname", "options": [], "query": { "qryType": 1, "query": "label_values(pg_up,hostname)", "refId": "PrometheusVariableQueryEditor-VariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false }, { "current": { "selected": false, "text": "All", "value": "$__all" }, "datasource": { "type": "prometheus", "uid": "mimir" }, "definition": "label_values(datname)", "hide": 0, "includeAll": true, "label": "Database", "multi": true, "name": "datname", "options": [], "query": "label_values(datname)", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 1, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false }, { "current": { "selected": false, "text": "All", "value": "$__all" }, "datasource": { "type": "prometheus", "uid": "mimir" }, "definition": "label_values({mode=~\"accessexclusivelock|accesssharelock|exclusivelock|rowexclusivelock|rowsharelock|sharelock|sharerowexclusivelock|shareupdateexclusivelock\"}, mode)", "hide": 0, "includeAll": true, "label": "Lock table", "multi": true, "name": "mode", "options": [], "query": "label_values({mode=~\"accessexclusivelock|accesssharelock|exclusivelock|rowexclusivelock|rowsharelock|sharelock|sharerowexclusivelock|shareupdateexclusivelock\"}, mode)", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "tagValuesQuery": "", "tagsQuery": "", "type": "query", "useTags": false } ] }, "time": { "from": "now-1h", "to": "now" }, "timeRangeUpdatedDuringEditOrView": false, "timepicker": { "refresh_intervals": [ "5s", "10s", "30s", "1m", "5m", "15m", "30m", "1h", "2h", "1d" ], "time_options": [ "5m", "15m", "1h", "6h", "12h", "24h", "2d", "7d", "30d" ] }, "timezone": "browser", "title": "PostgreSQL Overview (Postgres_exporter)", "uid": "5474745", "version": 1, "weekStart": "" }