{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "grafana", "uid": "-- Grafana --" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "target": { "limit": 100, "matchAny": false, "tags": [], "type": "dashboard" }, "type": "dashboard" } ] }, "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "id": 44, "links": [], "liveNow": false, "panels": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 0, "y": 0 }, "id": 18, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [], "fields": "", "values": false }, "textMode": "name" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "code", "expr": "sum by (short_version) (pg_static{instance=~\"$host\"})", "legendFormat": "{{short_version}}", "range": true, "refId": "A" } ], "title": "Version", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 3, "y": 0 }, "id": 11, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum(pg_settings_shared_buffers_bytes{instance=~\"$host\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Shared Buffers", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [ { "options": { "match": "null", "result": { "index": 0, "text": "No cache" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 6, "y": 0 }, "id": 12, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "code", "expr": "sum(pg_settings_effective_cache_size_bytes{instance=~\"$host\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Effective Cache", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 9, "y": 0 }, "id": 13, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "code", "expr": "sum(pg_settings_maintenance_work_mem_bytes{instance=~\"$host\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Maintenance Work Mem", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 12, "y": 0 }, "id": 14, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "code", "expr": "sum(pg_settings_max_wal_size_bytes{instance=~\"$host\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Max WAL Size", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 15, "y": 0 }, "id": 15, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "code", "expr": "sum(pg_settings_max_worker_processes{instance=~\"$host\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Max Worker Processes", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 18, "y": 0 }, "id": 16, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "code", "expr": "sum(pg_settings_max_parallel_workers{instance=~\"$host\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Max Parallel Workers", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 3, "w": 3, "x": 21, "y": 0 }, "id": 17, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "auto", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "textMode": "auto" }, "pluginVersion": "9.4.7", "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "code", "expr": "sum(pg_settings_max_connections{instance=~\"$host\"})", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Max Connections", "type": "stat" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 30, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 3 }, "id": 4, "interval": "5m", "options": { "legend": { "calcs": [ "mean", "max", "last" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum by(instance) (rate(pg_stat_database_xact_commit{instance=~\"$host\"}[$__rate_interval]))", "legendFormat": "{{instance}} commits", "range": true, "refId": "A" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum by(instance) (rate(pg_stat_database_xact_commit{instance=~\"$host\"}[$__rate_interval]))", "hide": false, "legendFormat": "{{instance}} rollbacks", "range": true, "refId": "B" } ], "title": "Transactions rate (5m)", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 30, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 3 }, "id": 9, "interval": "5m", "options": { "legend": { "calcs": [ "mean", "max", "last" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum by(instance) (rate(pg_locks_count{instance=~\"$host\"}[$__rate_interval]))", "legendFormat": "{{instance}} locks", "range": true, "refId": "A" } ], "title": "Lock tables rate (5m)", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 30, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 14 }, "id": 2, "interval": "5m", "options": { "legend": { "calcs": [ "mean", "max", "last" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum by(instance) (rate(pg_stat_activity_count{instance=~\"$host\", state=\"active\"}[$__rate_interval]))", "legendFormat": "{{instance}}", "range": true, "refId": "A" } ], "title": "Activity rate (5m)", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "bars", "fillOpacity": 30, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "auto", "spanNulls": false, "stacking": { "group": "A", "mode": "normal" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null } ] } }, "overrides": [] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 14 }, "id": 8, "interval": "5m", "options": { "legend": { "calcs": [ "mean", "max", "last" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum by(instance) (rate(pg_stat_activity_count{instance=~\"$host\", state=~\"idle|idle in transaction|idle in transaction (aborted)\"}[$__rate_interval]))", "legendFormat": "{{instance}}", "range": true, "refId": "A" } ], "title": "Idle conn rate (5m)", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 30, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "binBps" }, "overrides": [] }, "gridPos": { "h": 11, "w": 12, "x": 0, "y": 25 }, "id": 6, "options": { "legend": { "calcs": [ "mean", "max", "last" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum by(instance) (rate(pg_stat_database_tup_fetched{instance=~\"$host\"}[$__rate_interval]))", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "SELECT data rate", "type": "timeseries" }, { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 30, "gradientMode": "opacity", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "lineInterpolation": "smooth", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "binBps" }, "overrides": [] }, "gridPos": { "h": 11, "w": 12, "x": 12, "y": 25 }, "id": 7, "options": { "legend": { "calcs": [ "mean", "max", "last" ], "displayMode": "table", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "single", "sort": "none" } }, "targets": [ { "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "editorMode": "builder", "expr": "sum by(instance) (rate(pg_stat_database_tup_returned{instance=~\"$host\"}[$__rate_interval]))", "legendFormat": "__auto", "range": true, "refId": "A" } ], "title": "Return data rate", "type": "timeseries" } ], "refresh": "1m", "revision": 1, "schemaVersion": 38, "style": "dark", "tags": [], "templating": { "list": [ { "current": { "selected": true, "text": [ "sv1:9187", "sv2:9187" ], "value": [ "sv1:9187", "sv2:9187" ] }, "datasource": { "type": "prometheus", "uid": "yPhvsDP7k" }, "definition": "label_values(pg_up, instance)", "hide": 0, "includeAll": false, "label": "Host", "multi": true, "name": "host", "options": [], "query": { "query": "label_values(pg_up, instance)", "refId": "StandardVariableQuery" }, "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query" } ] }, "time": { "from": "now-6h", "to": "now" }, "timepicker": {}, "timezone": "", "title": "PostgreSQL", "uid": "Qr75XfEVk", "version": 3, "weekStart": "" }