{ "annotations": { "list": [ { "builtIn": 1, "datasource": { "type": "datasource", "uid": "grafana" }, "enable": true, "hide": true, "iconColor": "rgba(0, 211, 255, 1)", "name": "Annotations & Alerts", "type": "dashboard" } ] }, "description": "Only \"pg_stat_statements\" extension expected", "editable": true, "fiscalYearStartMonth": 0, "graphTooltip": 0, "links": [], "panels": [ { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Last 5m data", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "0": { "text": "PRIMARY" }, "1": { "text": "REPLICA" } }, "type": "value" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 0, "y": 0 }, "hideTimeOverride": true, "id": 1, "interval": "", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "TPS", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "SELECT\n time,\n (data->'in_recovery_int')::int\nFROM\n wal\nWHERE\n $__timeFilter(time)\n AND dbname = '$dbname'\nORDER BY time DESC\nLIMIT 1\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "5m", "title": "Instance state", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Last 5min data", "fieldConfig": { "defaults": { "color": { "mode": "thresholds" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "dtdurations" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 3, "y": 0 }, "hideTimeOverride": true, "id": 17, "interval": "", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "none", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "TPS", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "SELECT\n time,\n (data->'postmaster_uptime_s')::int\nFROM\n wal\nWHERE\n $__timeFilter(time)\n AND dbname = '$dbname'\nORDER BY time DESC\nLIMIT 1\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "5m", "title": "Instance uptime", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Current Transaction Per Second (10m avg) + last 6h history", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 6, "y": 0 }, "hideTimeOverride": true, "id": 18, "interval": "10m", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "TPS", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $__interval),\n avg(((c - c_lag) + (r - r_lag)) / extract(epoch from time - time_lag)) as tps\nfrom (\n select \n (data->>'xact_commit')::int8 as c, lag((data->>'xact_commit')::int8) over w as c_lag,\n (data->>'xact_rollback')::int8 as r, lag((data->>'xact_rollback')::int8) over w as r_lag,\n time, lag(time) over w as time_lag\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time) \n) x\nwhere c >= c_lag and r >= r_lag and time > time_lag\ngroup by 1\norder by 1", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "6h", "title": "TPS", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Queries Per Second based on pg_stat_statements.calls. Last 10m avg. + last 6h history", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 9, "y": 0 }, "hideTimeOverride": true, "id": 2, "interval": "10m", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "QPS", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $__interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as qps\nfrom (\n select \n (data->>'calls')::int8 as c, lag((data->>'calls')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from stat_statements_calls\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time) \n) x\nwhere c >= c_lag\ngroup by 1\norder by 1\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "6h", "title": "QPS", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Approximate value based on pg_stat_statements total_time / calls. Last 10min avg. + last 6h history", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "none" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 12, "y": 0 }, "hideTimeOverride": true, "id": 3, "interval": "10m", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "avg_query_runtime_per_db", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n$__timeGroup(time, $__interval),\navg((tt-tt_lag)::numeric / (c-c_lag))\n\nfrom (\n\n select \n (data->>'total_time')::float8 as tt, lag((data->>'total_time')::float8) over w as tt_lag,\n (data->>'calls')::int8 as c, lag((data->>'calls')::int8) over w as c_lag,\n time\n from stat_statements_calls\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere c > c_lag and tt >= tt_lag\ngroup by 1\norder by 1", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "6h", "title": "Query runtime", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Based on pg_stat_database.numbackends. Last 10m avg + 6h history", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "decimals": 1, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 15, "y": 0 }, "hideTimeOverride": true, "id": 5, "interval": "10m", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "10m" ], "type": "time" }, { "params": [ "none" ], "type": "fill" } ], "measurement": "db_stats", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $__interval),\n avg(nb) as \"# Sessions ($agg_interval avg)\"\nfrom (\n select \n (data->>'numbackends')::int8 as nb,\n time\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n) x\ngroup by 1\norder by 1\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "numbackends" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [ { "key": "dbname", "operator": "=~", "value": "/^$dbname$/" } ], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "6h", "title": "Sessions", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "bytes" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 18, "y": 0 }, "hideTimeOverride": true, "id": 6, "interval": "10m", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "10m" ], "type": "time" }, { "params": [ "none" ], "type": "fill" } ], "measurement": "db_stats", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, '1h'),\n avg( ((tb-tb_lag)*3600) / (etime - lag_etime)) as \"Temp bytes (1h rate)\"\nfrom (\n select \n (data->>'temp_bytes')::int8 as tb, lag((data->>'temp_bytes')::int8) over w as tb_lag,\n (extract(epoch from time))::int8 as etime,\n (lag(extract(epoch from time)) over w)::int8 as lag_etime,\n time\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere tb >= tb_lag and etime > lag_etime\ngroup by 1\norder by 1\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "temp_bytes" ], "type": "field" }, { "params": [], "type": "last" }, { "params": [ "1h" ], "type": "non_negative_derivative" } ] ], "tags": [ { "key": "dbname", "operator": "=~", "value": "/^$dbname$/" } ], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "6h", "title": "Temp bytes 1h avg. rate", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Percentage of rows touched by queries that are actually returned to the client. Low numbers (< 10%) for an OLTP workload can hint at missing indexes. Last 10m avg + 6h history.", "fieldConfig": { "defaults": { "color": { "fixedColor": "rgb(31, 120, 193)", "mode": "fixed" }, "decimals": 1, "mappings": [ { "options": { "match": "null", "result": { "text": "N/A" } }, "type": "special" } ], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [] }, "gridPos": { "h": 2, "w": 3, "x": 21, "y": 0 }, "hideTimeOverride": true, "id": 4, "interval": "10m", "maxDataPoints": 100, "options": { "colorMode": "none", "graphMode": "area", "justifyMode": "auto", "orientation": "horizontal", "reduceOptions": { "calcs": [ "lastNotNull" ], "fields": "", "values": false }, "showPercentChange": false, "textMode": "auto", "wideLayout": true }, "pluginVersion": "10.4.1", "targets": [ { "alias": "db_size_change_last_hour", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "SELECT\n $__timeGroup(time, $__interval),\n 100 * avg((fetched - fetched_lag)::numeric / (returned - returned_lag)) as fetched_vs_returned_pct\nFROM (\n\nSELECT\n time,\n (data->'tup_fetched')::int8 as fetched,\n lag((data->'tup_fetched')::int8) over w as fetched_lag,\n (data->'tup_returned')::int8 as returned,\n lag((data->'tup_returned')::int8) over w as returned_lag\nFROM\n db_stats\nWHERE\n $__timeFilter(time)\n AND dbname = '$dbname'\nWINDOW w AS (ORDER BY time)\n) x \nWHERE returned > returned_lag AND fetched >= fetched_lag\nGROUP BY 1\nORDER BY 1\n\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "timeFrom": "6h", "title": "Tuples fetched vs returned", "type": "stat" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 2, "pointSize": 5, "scaleDistribution": { "log": 10, "type": "log" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 1, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [ { "matcher": { "id": "byName", "options": "db_stats.mean" }, "properties": [ { "id": "unit", "value": "ms" }, { "id": "custom.axisPlacement", "value": "hidden" } ] }, { "matcher": { "id": "byName", "options": "DB size" }, "properties": [ { "id": "unit", "value": "ms" }, { "id": "custom.axisPlacement", "value": "hidden" } ] }, { "matcher": { "id": "byName", "options": "blk_read_time" }, "properties": [ { "id": "unit", "value": "ms" }, { "id": "custom.axisPlacement", "value": "hidden" } ] }, { "matcher": { "id": "byName", "options": "blk_write_time" }, "properties": [ { "id": "unit", "value": "ms" }, { "id": "custom.axisPlacement", "value": "hidden" } ] } ] }, "gridPos": { "h": 4, "w": 12, "x": 0, "y": 2 }, "id": 7, "interval": "", "options": { "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "INSERT", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "query": "", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg((ins-ins_lag) * (extract(epoch from '$agg_interval'::interval)) / extract(epoch from time - time_lag)) as \"INSERT\",\n avg((upd-upd_lag) * (extract(epoch from '$agg_interval'::interval)) / extract(epoch from time - time_lag)) as \"UPDATE\",\n avg((del-del_lag) * (extract(epoch from '$agg_interval'::interval)) / extract(epoch from time - time_lag)) as \"DELETE\"\nfrom (\n select \n (data->>'tup_inserted')::int8 as ins, lag((data->>'tup_inserted')::int8) over w as ins_lag,\n (data->>'tup_updated')::int8 as upd, lag((data->>'tup_updated')::int8) over w as upd_lag,\n (data->>'tup_deleted')::int8 as del, lag((data->>'tup_deleted')::int8) over w as del_lag,\n time, lag(time) over w as time_lag\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere ins >= ins_lag and time > time_lag\ngroup by 1\norder by 1", "refId": "C", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "Tuple Ins. / Upd. / Del. statistics ($agg_interval rate)", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 2, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "max": 105, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "percent" }, "overrides": [ { "matcher": { "id": "byName", "options": "TX rollback ratio" }, "properties": [ { "id": "color", "value": { "fixedColor": "#890F02", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 4, "w": 12, "x": 12, "y": 2 }, "id": 8, "interval": "5m", "options": { "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "Shared buffers hit ratio", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "hide": false, "measurement": "db_stats", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg((hit-hit_lag)::numeric / ((hit-hit_lag) + (read-read_lag)))*100 as \"Shared buffers hit ratio\",\n avg((roll-roll_lag)::numeric / ((roll-roll_lag) + (comm-comm_lag)))*100 as \"TX rollback ratio\"\nfrom (\n select \n (data->>'blks_hit')::int8 as hit, lag((data->>'blks_hit')::int8) over w as hit_lag,\n (data->>'blks_read')::int8 as read, lag((data->>'blks_read')::int8) over w as read_lag,\n (data->>'xact_rollback')::int8 as roll, lag((data->>'xact_rollback')::int8) over w as roll_lag,\n (data->>'xact_commit')::int8 as comm, lag((data->>'xact_commit')::int8) over w as comm_lag,\n time\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere (hit > hit_lag or read > read_lag) and (roll > roll_lag or comm > comm_lag)\ngroup by 1\norder by 1", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "blks_hit" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "Buffer hit ratio + Rollback ratio", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Approximate value based on pg_stat_statements total_time / calls", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 2, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 1, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "ms" }, "overrides": [ { "matcher": { "id": "byName", "options": "avg_query_runtime" }, "properties": [ { "id": "color", "value": { "fixedColor": "#ef843c", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "load_5" }, "properties": [ { "id": "color", "value": { "fixedColor": "#BA43A9", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 4, "w": 12, "x": 0, "y": 6 }, "id": 12, "interval": "5m", "options": { "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "avg_query_runtime", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "stat_statements", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg(case when c=c_lag then null else (tt-tt_lag)::numeric / (c-c_lag) end) as \"avg_query_runtime\"\nfrom (\n\n select \n (data->>'total_time')::float8 as tt, lag((data->>'total_time')::float8) over w as tt_lag,\n (data->>'calls')::int8 as c, lag((data->>'calls')::int8) over w as c_lag,\n time\n from stat_statements_calls\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere c >= c_lag and tt >= tt_lag\ngroup by 1\norder by 1", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "Avg. query runtime ($agg_interval avg.)", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 2, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 1, "mappings": [], "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "Bps" }, "overrides": [ { "matcher": { "id": "byName", "options": "DB Size" }, "properties": [ { "id": "color", "value": { "fixedColor": "#2F575E", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "WAL rate" }, "properties": [ { "id": "color", "value": { "fixedColor": "#0A50A1", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "DB Size" }, "properties": [ { "id": "unit", "value": "bytes" } ] } ] }, "gridPos": { "h": 4, "w": 12, "x": 12, "y": 6 }, "id": 10, "interval": "5m", "options": { "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "none" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "WAL rate", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "measurement": "wal", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "query": "", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg((wal-wal_lag) / (etime-etime_lag)) as \"WAL rate\"\nfrom (\n select \n (data->>'xlog_location_b')::int8 as wal, lag((data->>'xlog_location_b')::int8) over w as wal_lag,\n extract(epoch from time) as etime,\n time, lag(extract(epoch from time)) over w as etime_lag\n from wal\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere wal >= wal_lag and etime > etime_lag\ngroup by 1\norder by 1", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "xlog_location_b" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [ "1h" ], "type": "derivative" } ] ], "tags": [ { "key": "dbname", "operator": "=~", "value": "/^$dbname$/" } ], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] }, { "alias": "DB Size", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "none" ], "type": "fill" } ], "measurement": "db_size", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg(size_b) as \"DB Size\"\nfrom (\n select \n (data->>'size_b')::int8 as size_b,\n time\n from db_size\n where dbname = '$dbname' and $__timeFilter(time)\n) x\ngroup by 1\norder by 1", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "size_b" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [ { "key": "dbname", "operator": "=~", "value": "/^$dbname$/" } ], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "WAL rate + DB size ($agg_interval avg.)", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 2, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": true, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [ { "matcher": { "id": "byName", "options": "/Deadlocks/" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-red", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "/Sessions/" }, "properties": [ { "id": "color", "value": { "fixedColor": "dark-yellow", "mode": "fixed" } } ] }, { "matcher": { "id": "byName", "options": "/Temp bytes/" }, "properties": [ { "id": "color", "value": { "fixedColor": "light-blue", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": "/Temp bytes/" }, "properties": [ { "id": "color", "value": { "fixedColor": "#3274D9", "mode": "fixed" } }, { "id": "unit", "value": "Bps" } ] }, { "matcher": { "id": "byRegexp", "options": "/Deadlocks/" }, "properties": [ { "id": "color", "value": { "fixedColor": "#C4162A", "mode": "fixed" } } ] }, { "matcher": { "id": "byRegexp", "options": "/Sessions/" }, "properties": [ { "id": "color", "value": { "fixedColor": "#E0B400", "mode": "fixed" } } ] } ] }, "gridPos": { "h": 4, "w": 12, "x": 0, "y": 10 }, "id": 9, "interval": "5m", "options": { "legend": { "calcs": [], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "# Sessions", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "none" ], "type": "fill" } ], "measurement": "db_stats", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "query": "", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg(nb) as \"# Sessions ($agg_interval avg)\",\n avg(((dl-dl_lag) * extract(epoch from '$agg_interval'::interval)) / (etime - etime_lag)) as \"Deadlocks ($agg_interval rate)\"\nfrom (\n select \n (data->>'numbackends')::int8 as nb,\n (data->>'deadlocks')::int8 as dl, lag((data->>'deadlocks')::int8) over w as dl_lag,\n (extract(epoch from time))::int8 as etime,\n (lag(extract(epoch from time)) over w)::int8 as etime_lag,\n time\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere dl >= dl_lag and etime > etime_lag\ngroup by 1\norder by 1\n", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "numbackends" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] }, { "alias": "Deadlocks (1h rate)", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "query": "", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg((tb-tb_lag) / (etime - lag_etime)) as \"Temp bytes ($agg_interval avg)\"\nfrom (\n select \n (data->>'temp_bytes')::int8 as tb, lag((data->>'temp_bytes')::int8) over w as tb_lag,\n (extract(epoch from time))::int8 as etime,\n (lag(extract(epoch from time)) over w)::int8 as lag_etime,\n time\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time)\n) x\nwhere tb >= tb_lag\ngroup by 1\norder by 1\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "Sessions + Deadlocks + Temp bytes", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "Transactions per Second / Queries per Second", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": true, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 0, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 12, "x": 12, "y": 10 }, "id": 15, "interval": "5m", "options": { "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "TPS", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg(((c - c_lag) + (r - r_lag)) / extract(epoch from time - time_lag)) as \"TPS\"\nfrom (\n select \n (data->>'xact_commit')::int8 as c, lag((data->>'xact_commit')::int8) over w as c_lag,\n (data->>'xact_rollback')::int8 as r, lag((data->>'xact_rollback')::int8) over w as r_lag,\n time, lag(time) over w as time_lag\n from db_stats\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time) \n) x\nwhere c >= c_lag and r >= r_lag and time > time_lag\ngroup by 1\norder by 1", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] }, { "alias": "QPS", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "null" ], "type": "fill" } ], "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n avg((c - c_lag) / extract(epoch from time - time_lag)) as \"QPS\"\nfrom (\n select \n (data->>'calls')::int8 as c, lag((data->>'calls')::int8) over w as c_lag,\n time, lag(time) over w as time_lag\n from stat_statements_calls\n where dbname = '$dbname' and $__timeFilter(time)\n window w as (order by time) \n) x\nwhere c >= c_lag and time > time_lag\ngroup by 1\norder by 1\n", "refId": "B", "resultFormat": "time_series", "select": [ [ { "params": [ "value" ], "type": "field" }, { "params": [], "type": "mean" } ] ], "tags": [], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "TPS / QPS ($agg_interval avg.)", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 1, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 12, "x": 0, "y": 14 }, "id": 16, "interval": "5m", "options": { "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "seq_scan", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "none" ], "type": "fill" } ], "measurement": "table_stats", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n time,\n sum(seq_scan) as seq_scan\nfrom (\n select\n $__timeGroup(time, $agg_interval),\n table_full_name,\n avg((((scan - scan_lag) * (extract(epoch from '$agg_interval'::interval))) / extract(epoch from time - time_lag))) as seq_scan\n from (\n select \n (data->>'seq_scan')::int8 as scan, lag((data->>'seq_scan')::int8) over w as scan_lag,\n time, lag(time) over w as time_lag,\n tag_data->>'table_full_name' as table_full_name\n from table_stats\n where dbname = '$dbname' and $__timeFilter(time)\n and (data->>'table_size_b')::int8 > 10000000\n window w as (partition by tag_data->>'table_full_name' order by time) \n ) x\n where scan >= scan_lag and time > time_lag\n group by 1, 2\n) y\ngroup by 1\norder by 1\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "seq_scan" ], "type": "field" }, { "params": [], "type": "mean" }, { "params": [ "1m" ], "type": "non_negative_derivative" } ] ], "tags": [ { "key": "dbname", "operator": "=~", "value": "/^$dbname$/" } ], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "Seq. scans ($agg_interval rate, >10MB tables)", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "description": "", "fieldConfig": { "defaults": { "color": { "mode": "palette-classic" }, "custom": { "axisBorderShow": false, "axisCenteredZero": false, "axisColorMode": "text", "axisLabel": "", "axisPlacement": "auto", "barAlignment": 0, "drawStyle": "line", "fillOpacity": 10, "gradientMode": "none", "hideFrom": { "legend": false, "tooltip": false, "viz": false }, "insertNulls": false, "lineInterpolation": "linear", "lineWidth": 1, "pointSize": 5, "scaleDistribution": { "type": "linear" }, "showPoints": "never", "spanNulls": false, "stacking": { "group": "A", "mode": "none" }, "thresholdsStyle": { "mode": "off" } }, "decimals": 0, "mappings": [], "min": 0, "thresholds": { "mode": "absolute", "steps": [ { "color": "green", "value": null }, { "color": "red", "value": 80 } ] }, "unit": "short" }, "overrides": [] }, "gridPos": { "h": 4, "w": 12, "x": 12, "y": 14 }, "id": 11, "interval": "5m", "options": { "legend": { "calcs": [ "mean" ], "displayMode": "list", "placement": "bottom", "showLegend": true }, "tooltip": { "mode": "multi", "sort": "desc" } }, "pluginVersion": "10.4.1", "targets": [ { "alias": "$tag_lockmode", "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "format": "time_series", "group": [], "groupBy": [ { "params": [ "$__interval" ], "type": "time" }, { "params": [ "lockmode" ], "type": "tag" }, { "params": [ "none" ], "type": "fill" } ], "measurement": "locks_mode", "metricColumn": "none", "orderByTime": "ASC", "policy": "default", "rawQuery": true, "rawSql": "select\n $__timeGroup(time, $agg_interval),\n lockmode,\n max(lock_count) as lock_count\nfrom (\n select \n (data->>'count')::int8 as lock_count,\n tag_data->>'lockmode' as lockmode,\n time\n from locks_mode\n where dbname = '$dbname' and $__timeFilter(time)\n and tag_data->>'lockmode' LIKE '%Exclusive%'\n) x\ngroup by 1, 2\norder by 1, 2\n", "refId": "A", "resultFormat": "time_series", "select": [ [ { "params": [ "count" ], "type": "field" }, { "params": [], "type": "max" } ] ], "tags": [ { "key": "dbname", "operator": "=~", "value": "/^$dbname$/" }, { "condition": "AND", "key": "lockmode", "operator": "=~", "value": "/Exclusive/" } ], "timeColumn": "time", "where": [ { "name": "$__timeFilter", "params": [], "type": "macro" } ] } ], "title": "Exclusive locks ($agg_interval max.)", "type": "timeseries" }, { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "editable": true, "error": false, "gridPos": { "h": 7, "w": 12, "x": 0, "y": 18 }, "id": 14, "options": { "code": { "language": "plaintext", "showLineNumbers": false, "showMiniMap": false }, "content": "

Brought to you by

\"Cybertec
", "mode": "html" }, "pluginVersion": "10.4.1", "targets": [ { "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "refId": "A" } ], "transparent": true, "type": "text" } ], "schemaVersion": 39, "tags": [ "pgwatch" ], "templating": { "list": [ { "current": { "isNone": true, "selected": false, "text": "None", "value": "" }, "datasource": { "type": "grafana-postgresql-datasource", "uid": "pgwatch-metrics" }, "definition": "", "hide": 0, "includeAll": false, "multi": false, "name": "dbname", "options": [], "query": "SELECT DISTINCT dbname FROM admin.all_distinct_dbname_metrics ORDER BY 1;", "refresh": 1, "regex": "", "skipUrlSync": false, "sort": 0, "type": "query", "useTags": false }, { "auto": false, "auto_count": 30, "auto_min": "10s", "current": { "selected": false, "text": "5m", "value": "5m" }, "hide": 0, "name": "agg_interval", "options": [ { "selected": false, "text": "1s", "value": "1s" }, { "selected": false, "text": "1m", "value": "1m" }, { "selected": true, "text": "5m", "value": "5m" }, { "selected": false, "text": "10m", "value": "10m" }, { "selected": false, "text": "15m", "value": "15m" }, { "selected": false, "text": "30m", "value": "30m" }, { "selected": false, "text": "1h", "value": "1h" }, { "selected": false, "text": "6h", "value": "6h" }, { "selected": false, "text": "12h", "value": "12h" }, { "selected": false, "text": "1d", "value": "1d" } ], "query": "1s,1m,5m,10m,15m,30m,1h,6h,12h,1d", "refresh": 2, "skipUrlSync": false, "type": "interval" } ] }, "time": { "from": "now-3h", "to": "now" }, "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": "DB overview Unprivileged / Developer mode", "uid": "db-overview-developer", "version": 1, "weekStart": "" }