Skip to content

Commit 0cba351

Browse files
authored
[-] fix sql of Shared Buffers hit pct panel (#1058)
1 parent 7aaace4 commit 0cba351

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

grafana/postgres/v12/0-health-check.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1020,7 +1020,7 @@
10201020
"orderByTime": "ASC",
10211021
"policy": "default",
10221022
"rawQuery": true,
1023-
"rawSql": "select\n time,\n ((hit-hit_lag)::numeric / ((hit-hit_lag) + (read-read_lag)))*100 as \"Shared buffers hit 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\norder by 1",
1023+
"rawSql": "select\n time,\n ((hit-hit_lag)::numeric / ((hit-hit_lag) + (read-read_lag)))*100 as \"Shared buffers hit 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 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\norder by 1",
10241024
"refId": "A",
10251025
"resultFormat": "time_series",
10261026
"select": [

0 commit comments

Comments
 (0)