observability.svc.plus/files/grafana/pgsql/pgrds-instance.json
2026-02-01 20:53:55 +08:00

2987 lines
184 KiB
JSON

{
"annotations":{"list":[{"builtIn":1,"datasource":{"type":"datasource","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"}]},
"author":"Ruohang Feng (rh@vonng.com)",
"description":"PostgreSQL Monitoring for Remote RDS instances (with limited metrics)",
"editable":true,
"fiscalYearStartMonth":0,
"graphTooltip":0,
"id":null,
"license":"https://pigsty.io/docs/about/license/",
"links":[
{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Overview"],"targetBlank":false,"title":"Overview","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Cluster"] ,"targetBlank":false,"title":"Cluster" ,"tooltip":"","type":"dashboards","url":"" },
{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Instance"],"targetBlank":false,"title":"Instance","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Database"],"targetBlank":false,"title":"Database","tooltip":"","type":"dashboards","url":"" }
],
"panels":[
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":86,"panels":[],"title":"Overview","type":"row"},
{
"datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},
"description":"",
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#6986a3"}]}},
"overrides":[{"matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance : ${ins}","url":"/d/pgsql-instance?var-ins=${ins}&${__url_time_range}"}]}]},{"matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&${__url_time_range}"}]}]}]
},
"gridPos":{"h":4,"w":6,"x":0,"y":1},
"id":210,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"titleSize":16,"valueSize":16},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Instance","type":"string","values":["$ins"]}],"meta":{},"name":""} ,"hide":false,"refId":"A" },
{ "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Cluster","type":"string","values":["${cls}"]}],"meta":{},"name":""},"hide":false,"refId":"B" }
],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"All instances among pgsql cluster ${cls}\n\nInstance: Goto PGSQL Instance\n\nIP: Goto PGSQL Node\n\nStatus: Goto PGSQL Service\n\nLoad: max(cpu,postgres,pgbouncer)\n\nSpace: Disk space usage max(all device)\n\nProxy: session number, Goto Haproxy Admin Page",
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"inspect":false},"mappings":[],"max":1.2,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},
"overrides":[
{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGRDS Instance ${__data.fields.Instance}","url":"/d/pgrds-instance?var-ins=${__data.fields.Instance}&${__url_time_range}"}]},{"id":"custom.width"}]},{"matcher":{"id":"byName","options":"Host"},"properties":[{"id":"links","value":[]}]},
{
"matcher":{"id":"byName","options":"Role"},
"properties":[
{ "id":"custom.width" ,"value":80 },{ "id":"mappings" ,"value":[{"options":{"0":{"color":"#3e668f","index":0,"text":"primary"},"1":{"color":"#346f36cc","index":1,"text":"replica"}},"type":"value"}] },
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} },{ "id":"links" ,"value":[{"title":"PGSQL Service for ${cls}-${__data.fields.Role}","url":"/d/pgsql-service?var-svc=${cls}-${__data.fields.Role}&${__url_time_range}"}] }
]
},{
"matcher":{"id":"byName","options":"Load"},
"properties":[
{ "id":"custom.cellOptions","value":{"type":"auto"} },
{ "id":"color" ,"value":{"mode":"thresholds"} },
{ "id":"unit" ,"value":"short" },
{ "id":"custom.width" ,"value":120 },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]} },
{ "id":"decimals" ,"value":2 },
{ "id":"mappings" ,"value":[{"options":{"-1":{"color":"transparent","index":0,"text":"N/A"}},"type":"value"}] }
]
},
{"matcher":{"id":"byName","options":"Cluster"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster for ${__data.fields.Cluster}","url":"/d/pgsql-cluster?var-cls=${__data.fields.Cluster}&${__url_time_range}"}]}]},
{"matcher":{"id":"byName","options":"TPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{
"matcher":{"id":"byName","options":"DB Conn"},
"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":4},{"color":"#EAB839","value":20},{"color":"#EF843C","value":40},{"color":"#E24D42","value":80},{"color":"#b783af","value":100},{"color":"text","value":400}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
},{
"matcher":{"id":"byName","options":"RT"},
"properties":[
{ "id":"custom.width" ,"value":80 },
{ "id":"unit" ,"value":"s" },
{ "id":"mappings" ,"value":[{"options":{"match":"nan","result":{"index":1,"text":"-"}},"type":"special"}] },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]} },
{ "id":"custom.cellOptions","value":{"type":"color-text"} }
]
},
{"matcher":{"id":"byName","options":"Session"},"properties":[{"id":"custom.width","value":72},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":1000},{"color":"#f79f64","value":2000},{"color":"red","value":3000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{"matcher":{"id":"byName","options":"Queue"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"red","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{"matcher":{"id":"byName","options":"HAProxy"},"properties":[{"id":"links","value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}"}]}]},
{"matcher":{"id":"byName","options":"Up"},"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Dead"},"1":{"color":"#346f36cc","index":1,"text":"Alive"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}}]},
{"matcher":{"id":"byName","options":"UPTime"},"properties":[{"id":"unit","value":"s"},{"id":"decimals","value":1},{"id":"custom.width","value":100},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"red"},{"color":"#f79f64","value":300},{"color":"#eab839","value":3600},{"color":"#346f36cc","value":86400}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]}
]
},
"gridPos":{"h":6,"w":18,"x":6,"y":1},
"id":191,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&${__url_time_range}"}],
"options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":false,"displayName":"Instance"}]},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (pg_up{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (pg:ins:active_time_rate1m{cls=\"$cls\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (ins) (pg:ins:xact_total_rate1m{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"C" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (pg_in_recovery{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"D" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (ins) (pg:ins:num_backends{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"E" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (ins) (pgbouncer:ins:xact_rt_1m{cls=\"$cls\"})" ,"format":"table","hide":true ,"instant":true,"interval":"","legendFormat":"","refId":"F" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (pg_uptime{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"G" }
],
"title":"",
"transformations":[
{"id":"seriesToColumns","options":{"byField":"ins"}},
{
"id":"organize",
"options":{
"excludeByName":{
"Time":true,
"Time 1":true,
"Time 10":true,
"Time 2":true,
"Time 3":true,
"Time 4":true,
"Time 6":true,
"Time 8":true,
"Time 9":true,
"Value #A":false,
"Value #B":false,
"Value #H":false,
"__name__":true,
"__name__ 1":true,
"__name__ 2":true,
"__name__ 3":true,
"__name__ 5":true,
"__name__ 7":true,
"cls":true,
"cls 1":true,
"cls 2":true,
"cls 3":true,
"cls 4":true,
"cls 5":true,
"cls 6":true,
"cls 7":true,
"instance":false,
"instance 1":true,
"instance 2":false,
"instance 3":true,
"instance 4":true,
"instance 5":true,
"instance 6":true,
"ip 2":true,
"ip 3":true,
"ip 4":true,
"ip 5":true,
"ip 6":true,
"ip 7":true,
"job":true,
"job 1":true,
"job 2":true,
"job 3":true,
"job 4":true,
"job 5":true,
"job 6":true,
"job 7":true
},
"indexByName":{"Time 1":7,"Time 2":8,"Time 3":9,"Time 4":10,"Time 5":11,"Value #A":2,"Value #B":4,"Value #C":5,"Value #D":3,"Value #E":6,"ins":0,"ip 1":1,"ip 2":12},
"renameByName":{"Time 4":"","Value #A":"Up","Value #B":"Load","Value #C":"TPS","Value #D":"Role","Value #E":"Session","Value #F":"RT","Value #G":"UPTime","Value #H":"LB","Value #I":"QPS","Value #J":"LB Clients","Value #K":"Lag","cls 1":"","cls 2":"","ins":"Instance","instance":"HAProxy","instance 2":"","ip":"IP","ip 1":"Host"}
}
}
],
"type":"table"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#6986a3"}]}},"overrides":[]},
"gridPos":{"h":2,"w":6,"x":0,"y":5},
"id":190,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{"valueSize":20},"textMode":"value","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (address) (label_join(pg_meta_info{ins=\"$ins\"}, \"address\", \":\", \"ip\", \"listen_port\"))","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"__auto","queryType":"measurements","refId":"A"}],
"title":"",
"transformations":[
{
"id":"organize",
"options":{
"excludeByName":{ "Time":true,"Value":true,"__name__":true,"cls":true ,"cluster_id":true ,"ins":true ,"ip":false ,"instance":true, "job":true,"version":true ,"ver_num":true,"wal_level":true },
"indexByName" :{ "Time":0 ,"Value":9 ,"__name__":1 ,"cls":2 ,"cluster_id":3 ,"ins":4 ,"ip":10 ,"instance":12 ,"listen_port":11 ,"job":5 ,"version":6 ,"ver_num":8 ,"wal_level":7 },
"renameByName" :{ "cls":"Cluster","cluster_id":"Cluster ID","ins":"Leader","ip":"Host", "listen_port":"Port", "version":"Version", "wal_level":"WAL Level" }
}
},
{"id":"filterFieldsByName","options":{}}
],
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#6986a3"}]}},
"overrides":[
{"matcher":{"id":"byName","options":"Leader"},"properties":[{"id":"links","value":[{"title":"PGRDS Leader : ${primary}","url":"/d/pgrds-instance?var-ins=${primary}&${__url_time_range}"}]}]},
{
"matcher":{"id":"byName","options":"Kernel"},
"properties":[
{
"id":"mappings",
"value":[
{ "options":{"pattern":".*Percona.*","result":{"color":"dark-orange","index":0,"text":"Percona"}} ,"type":"regex" },{ "options":{"pattern":".*wiltondb.*","result":{"color":"#d82024e3","index":1,"text":"Babelfish"}},"type":"regex" },{ "options":{"pattern":".*PolarDB.*","result":{"color":"#f25009","index":2,"text":"PolarDB"}} ,"type":"regex" },
{ "options":{"pattern":".*IvorySQL.*","result":{"color":"#ee9832","index":3,"text":"IvorySQL"}} ,"type":"regex" },{ "options":{"pattern":"PostgreSQL.*","result":{"color":"#3e668f","index":4,"text":"PostgreSQL"}} ,"type":"regex" },{ "options":{"pattern":"openHalo.*","result":{"color":"#ba5bb8","index":5,"text":"OpenHalo"}} ,"type":"regex" },
{ "options":{"pattern":"OrioleDB.*","result":{"color":"#1f4085","index":6,"text":"OrioleDB"}} ,"type":"regex" }
]
}
]
}
]
},
"gridPos":{"h":6,"w":6,"x":0,"y":7},
"id":209,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":16},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_meta_info{ins=\"$ins\"}","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"__auto","queryType":"measurements","refId":"A"}],
"title":"",
"transformations":[
{
"id":"organize",
"options":{
"excludeByName":{"Time":true,"Value":true,"__name__":true,"cls":true,"cluster_id":false,"cluster_name":true,"conf_path":false,"data_dir":false,"extensions":true,"hba_path":true,"ins":true,"instance":true,"ip":true,"job":true,"listen_port":true,"primary_conninfo":true,"ver_num":false,"ver_str":false,"version":true},
"includeByName":{},
"indexByName":{"Time":3,"Value":13,"__name__":4,"cls":5,"cluster_id":12,"cluster_name":17,"conf_path":11,"data_dir":10,"encoding":9,"extensions":19,"hba_path":18,"ins":6,"instance":16,"ip":14,"job":7,"listen_port":15,"ver_num":1,"ver_str":0,"version":2,"wal_level":8},
"renameByName":{"cls":"Cluster","cluster_id":"Cluster ID","conf_path":"Config","data_dir":"Data","encoding":"Encoding","hba_path":"HBA","ins":"Leader","ip":"Host","listen_port":"Port","ver_num":"Version","ver_str":"Kernel","version":"Version","wal_level":"WAL Level"}
}
}
],
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"links":[{"title":"PGSQL Replication for ${cls}","url":"/d/pgsql-replication?var-cls=${cls}&${__url_time_range}"}],"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}},
"overrides":[
{"matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"#f79f64","index":0,"text":"Primary"},"1":{"color":"#346f36cc","index":1,"text":"Replica"}},"type":"value"}]},{"id":"displayName","value":"Role"}]},
{"matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"#3e668f","index":0,"text":"No"},"1":{"color":"#346f36cc","index":1,"text":"Yes"}},"type":"value"}]}]},{"matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":1}]}}]},
{
"matcher":{"id":"byFrameRefID","options":"D"},
"properties":[
{ "id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc"}]} },{ "id":"mappings" ,"value":[{"options":{"0":{"color":"#f79f64","index":0,"text":"Leading"},"1":{"color":"#3e668f","index":1,"text":"Follow"}},"type":"value"}] },
{ "id":"links" ,"value":[{"title":"Node Instance : ${__field.labels.sender_host}","url":"/d/node-instance?var-id=${__field.labels.sender_host}&${__url_time_range}"}] }
]
},
{"matcher":{"id":"byFrameRefID","options":"E"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":1}]}}]},{"matcher":{"id":"byFrameRefID","options":"F"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":1}]}}]}
]
},
"gridPos":{"h":6,"w":3,"x":6,"y":7},
"id":194,
"links":[{"title":"PGSQL Replication : ${cls}","url":"/d/pgsql-replication?var-cls=${cls}&${__url_time_range}"}],
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":10,"valueSize":10},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"pg_in_recovery{ins=\"$ins\"}" , "instant":true,"interval":"","legendFormat":"recovery" ,"queryType":"measurements","refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"(pg_recv_init_lsn{ins=\"$ins\"} > bool 0) or on() vector(0)" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ sender_host }} ","queryType":"measurements","refId":"D" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(pg_repl_lsn{ins=\"$ins\"}) or on() vector(0)" ,"hide":false,"instant":true,"interval":"","legendFormat":"Downstream" ,"queryType":"measurements","refId":"C" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_sync_standby_enabled{ins=\"$ins\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"Sync Commit" ,"queryType":"measurements","refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count by (ins)(pg_pubrel_count{ins=\"$ins\"}) > bool 0 or on() vector(0)","hide":false,"instant":true,"interval":"","legendFormat":"Publication" ,"queryType":"measurements","refId":"E" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count by (ins)(pg_sub_id{ins=\"$ins\"}) or on() vector(0)" ,"hide":false,"instant":true,"interval":"","legendFormat":"Subscription" ,"queryType":"measurements","refId":"F" }
],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"match":"null+nan","result":{"color":"transparent","index":1}},"type":"special"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}},
"overrides":[
{ "matcher":{"id":"byName","options":"WAL Paused"} ,"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"Running"},"1":{"color":"#f79f64","index":1,"text":"Paused"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]}] },
{ "matcher":{"id":"byName","options":"WAL"} ,"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"Proceed"},"1":{"color":"#f79f64","index":1,"text":"Paused"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]}] },
{ "matcher":{"id":"byName","options":"PG Uptime"} ,"properties":[{"id":"unit","value":"s"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#cc4637d9"},{"color":"#f79f64","value":300},{"color":"#fcdb72","value":3600},{"color":"#346f36cc","value":86400}]}}] },
{ "matcher":{"id":"byName","options":"Aliveness"} ,"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Dead"},"1":{"color":"#346f36cc","index":1,"text":"Alive"}},"type":"value"}]}] },
{ "matcher":{"id":"byName","options":"Last Reload"},"properties":[{"id":"unit","value":"s"}] }
]
},
"gridPos":{"h":6,"w":3,"x":9,"y":7},
"id":193,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":10,"valueSize":10},"textMode":"auto","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_up{ins=\"$ins\"}" ,"format":"table", "instant":true,"legendFormat":"__auto","range":false,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_uptime{ins=\"$ins\"}" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_version{ins=\"$ins\"}" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"C" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_conf_reload_time{ins=\"$ins\"}" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"D" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:timeline{ins=\"$ins\"}" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"E" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_is_wal_replay_paused{ins=\"$ins\"}","format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"F" }
],
"title":"",
"transformations":[
{"id":"joinByField","options":{"byField":"ins","mode":"outer"}},
{
"id":"organize",
"options":{
"excludeByName":{"Time":true,"Time 1":true,"Time 10":true,"Time 11":true,"Time 12":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"Value #C":false,"Value #E":false,"Value #H":true,"Value #I":true,"Value #K":true,"__name__ 1":false,"cls":true,"ins":true,"scope":false},
"indexByName":{
"Time 1":6,
"Time 2":7,
"Time 3":8,
"Time 4":9,
"Time 5":10,
"Time 6":11,
"Value #A":0,
"Value #B":2,
"Value #C":5,
"Value #D":3,
"Value #E":4,
"Value #F":1,
"__name__ 1":12,
"__name__ 2":18,
"__name__ 3":23,
"__name__ 4":28,
"__name__ 5":33,
"__name__ 6":38,
"cls 1":14,
"cls 2":19,
"cls 3":24,
"cls 4":29,
"cls 5":34,
"cls 6":39,
"ins":13,
"instance 1":15,
"instance 2":20,
"instance 3":25,
"instance 4":30,
"instance 5":35,
"instance 6":40,
"ip 1":16,
"ip 2":21,
"ip 3":26,
"ip 4":31,
"ip 5":36,
"ip 6":41,
"job 1":17,
"job 2":22,
"job 3":27,
"job 4":32,
"job 5":37,
"job 6":42
},
"renameByName":{"Value #A":"Aliveness","Value #B":"PG Uptime","Value #C":"Version","Value #D":"Last Reload","Value #E":"Timeline","Value #F":"WAL Paused","Value #G":"","Value #H":"","Value #I":"","Value #J":"","Value #K":"","Value #L":"Up","cls":"Cluster","ins":"Instance","scope":"Shard"}
}
}
],
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database of this cluster ${cls}\n\nLoad: active_time / backends (PG14 only)\n\nQuery RT : max query rt of this database\n\nClient: Pgbouncer Active Clients\n\nServer: Pgbouncer Active Servers\n\nBackend: Postgres num backends\n\nT = is Template?\n\nD = Disabled in Pgbouncer ?\n\nP = Paused in Pgbouncer ?",
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"mode":"gradient","type":"color-background"},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0"}]}},
"overrides":[
{
"matcher":{"id":"byName","options":"Database"},
"properties":[
{ "id":"links" ,"value":[{"title":"PGSQL Database : ${ins}.${__data.fields.Database}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${__data.fields.Database}&${__url_time_range}"}] },
{ "id":"mappings" ,"value":[{"options":{"postgres":{"color":"#808080","index":2},"template0":{"color":"#c0c0c0e0","index":0},"template1":{"color":"#a8a8a8e0","index":1}},"type":"value"}] },
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"color" ,"value":{"fixedColor":"#3e668f","mode":"fixed"} },
{ "id":"filterable" }
]
},{
"matcher":{"id":"byName","options":"Size"},
"properties":[
{ "id":"custom.width" ,"value":80 },
{ "id":"unit" ,"value":"decbytes" },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":1000000000},{"color":"#fcdb72","value":1000000000000},{"color":"#f79f64","value":10000000000000}]} },
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"color" ,"value":{"mode":"thresholds"} },
{ "id":"decimals" ,"value":0 }
]
},{
"matcher":{"id":"byName","options":"Age"},
"properties":[
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":60000000},{"color":"#EAB839","value":200000000},{"color":"#f79f64","value":600000000},{"color":"red","value":1000000000},{"color":"#b783af","value":2000000000},{"color":"text","value":2137483647}]} },
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"unit" ,"value":"percentunit" },
{ "id":"custom.width" ,"value":60 },
{ "id":"color" ,"value":{"mode":"thresholds"} },
{ "id":"decimals" ,"value":1 }
]
},
{"matcher":{"id":"byName","options":"TPS"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#f79f64","value":30000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.width","value":70},{"id":"color","value":{"mode":"thresholds"}},{"id":"decimals","value":1}]},
{
"matcher":{"id":"byName","options":"T"},
"properties":[{"id":"custom.width","value":40},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":1,"text":"F"},"1":{"color":"#f79f64","index":2,"text":"T"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"#e3e3e3e0","index":0,"text":"N"}},"type":"special"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
},
{"matcher":{"id":"byName","options":"Backend"},"properties":[{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":4},{"color":"#f79f64","value":1000}]}},{"id":"color","value":{"mode":"thresholds"}},{"id":"custom.width","value":75},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{
"matcher":{"id":"byName","options":"ConnLimit"},
"properties":[
{ "id":"custom.width" ,"value":85 },
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"color" },
{ "id":"mappings" ,"value":[{"options":{"-1":{"color":"#3e668f","index":1,"text":"NO LIMIT"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"N/A"}},"type":"special"},{"options":{"from":0,"result":{"color":"#f79f64","index":2},"to":99999999},"type":"range"}] }
]
},{
"matcher":{"id":"byRegexp","options":"Conn%"},
"properties":[
{ "id":"unit" ,"value":"percentunit" },
{ "id":"custom.width" ,"value":80 },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":0.99}]} },
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"decimals" ,"value":1 }
]
},
{"matcher":{"id":"byName","options":"Client"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#fcdb72","value":1000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{"matcher":{"id":"byName","options":"Server"},"properties":[{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":4},{"color":"#fcdb72","value":1000}]}}]},
{
"matcher":{"id":"byName","options":"RT"},
"properties":[
{ "id":"custom.width" ,"value":80 },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]} },
{ "id":"mappings" ,"value":[{"options":{"match":"null+nan","result":{"index":0,"text":"-"}},"type":"special"}] },
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"unit" ,"value":"s" }
]
},{
"matcher":{"id":"byName","options":"Load"},
"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"unit","value":"short"},{"id":"decimals","value":1},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":0.1}]}},{"id":"mappings","value":[{"options":{"match":"null+nan","result":{"index":0,"text":"-"}},"type":"special"}]}]
},
{"matcher":{"id":"byName","options":"PoolSize"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"auto"}}]},
{
"matcher":{"id":"byName","options":"OID"},
"properties":[
{ "id":"custom.width" ,"value":80 },{ "id":"links" ,"value":[{"title":"PGCAT Database : ${ins}.${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${ins}.${__data.fields.Database}"}] },
{ "id":"mappings" ,"value":[{"options":{"from":0,"result":{"color":"#bfbfbf4d","index":0},"to":10},"type":"range"}] },{ "id":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f"}]} }
]
}
]
},
"gridPos":{"h":6,"w":12,"x":12,"y":7},
"id":192,
"options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":true,"displayName":"OID"}]},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pg_size_bytes{cls=\"$cls\", datname!~\"wal|log\"})","format":"table", "instant":true,"interval":"","legendFormat":"Age" ,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg:db:age{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Commit" ,"refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg_db_is_template{cls=\"$cls\", ins=\"$primary\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"isTemplate" ,"refId":"C" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_activity_count{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Backend" ,"refId":"D" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pg:db:xact_commit_rate1m{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"TPS" ,"refId":"E" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg_db_conn_limit{ins=\"$primary\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Limit" ,"refId":"F" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg:db:conn_usage{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"PG Conn Usage","refId":"H" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg:db:active_time_rate1m{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Load" ,"refId":"L" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (datname) (pg_db_datid{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"OID" ,"refId":"O" }
],
"title":"",
"transformations":[
{"id":"seriesToColumns","options":{"byField":"datname"}},
{
"id":"organize",
"options":{
"excludeByName":{"Time 1":true,"Time 10":true,"Time 11":true,"Time 12":true,"Time 13":true,"Time 14":true,"Time 15":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"Value #G":false,"Value #H":false,"host":true},
"indexByName":{"Time 1":10,"Time 2":11,"Time 3":12,"Time 4":13,"Time 5":14,"Time 6":15,"Time 7":16,"Time 8":17,"Time 9":18,"Value #A":3,"Value #B":4,"Value #C":9,"Value #D":5,"Value #E":6,"Value #F":8,"Value #H":7,"Value #L":2,"Value #O":1,"datname":0},
"renameByName":{"Time 1":"","Time 7":"","Value #A":"Size","Value #B":"Age","Value #C":"T","Value #D":"Backend","Value #E":"TPS","Value #F":"ConnLimit","Value #G":"RT","Value #H":"Conn%","Value #I":"D","Value #J":"P","Value #K":"PoolSize","Value #L":"Load","Value #M":"Client","Value #N":"Server","Value #O":"OID","datname":"Database","host":"Target","real_datname":"Datname"}
}
}
],
"type":"table"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGSQL Instance : TPS by Instance","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=94&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":32},{"color":"#f79f64","value":32000}]},
"unit":"none"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":0,"y":13},
"id":46,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:xact_commit_rate1m{ins=\"$ins\"}","interval":"","legendFormat":"Commit","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGSQL Instance : Rollback","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=169&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":4},{"color":"red","value":8}]},
"unit":"none"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":2,"y":13},
"id":57,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:xact_rollback_rate1m{ins=\"$ins\"}","interval":"","legendFormat":"Rollback","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGSQL Instance : RT","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=109&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]},
"unit":"s"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":4,"y":13},
"id":59,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:active_time_rate1m{ins=\"$ins\"} / pg:ins:xact_total_rate1m{ins=\"$ins\"}","interval":"","legendFormat":"RT","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGRDS Instance : Conn Usage","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=90&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":6,"y":13},
"id":106,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max(pg:db:conn_usage{cls=\"$cls\"})","interval":"","legendFormat":"Conn%","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGRDS Instance : Backend by Instance","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=96&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":4},{"color":"#f79f64","value":2000}]},
"unit":"none"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":8,"y":13},
"id":64,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"exemplar":false,"expr":"sum by (cls) (pg_db_numbackends{cls=\"$cls\"})","interval":"","legendFormat":"Backend","refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGRDS Instance : Session by State","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=149&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":4},{"color":"#f79f64","value":2000}]},
"unit":"none"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":10,"y":13},
"id":107,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:active_backends{ins=\"$ins\"}","interval":"","legendFormat":"Active Conn","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGRDS Instance : Idle in Transaction Conn","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=159&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#f79f64","value":1},{"color":"red","value":8}]},
"unit":"none"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":12,"y":13},
"id":203,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max(pg:ins:ixact_backends{ins=\"$ins\"})","interval":"","legendFormat":"iXact Conn","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"decimals":2,
"links":[{"title":"PGSQL Instance : Row Fetched","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=127&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":32},{"color":"#f79f64","value":32000}]},
"unit":"rowsps"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":14,"y":13},
"id":204,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":12},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:tup_fetched_rate1m{ins=\"$ins\"}","interval":"","legendFormat":"Row Fetch","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"decimals":2,
"links":[{"title":"PGRDS Instance : Row Changed","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=128&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":32},{"color":"#f79f64","value":32000}]},
"unit":"rowsps"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":16,"y":13},
"id":205,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":12},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:tup_modified_rate1m{ins=\"$ins\"}","interval":"","legendFormat":"Row Change","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGSQL Instance : Blocks Read Bandwidth","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=182&${__url_time_range}"}],
"mappings":[],
"min":0,
"noValue":"\u2205",
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":10000000},{"color":"#fcdb72","value":100000000},{"color":"#f79f64","value":500000000},{"color":"red","value":1000000000},{"color":"#b783af","value":2000000000},{"color":"text","value":4000000000}]},
"unit":"Bps"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":18,"y":13},
"id":206,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":14},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(pg:db:blks_read_1m{ins=\"$ins\"}) * 4096","interval":"","legendFormat":"Blks Read","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"decimals":2,
"links":[{"title":"PGRDS Instance : Age of Databases","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=208&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"max":1,
"min":0,
"thresholds":{"mode":"percentage","steps":[{"color":"#346f36cc"},{"color":"#fcdb72","value":2},{"color":"#f79f64","value":10},{"color":"red","value":30},{"color":"#b783af","value":90},{"color":"text","value":100}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":20,"y":13},
"id":63,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:age{ins=\"$ins\"} / 2147483647","interval":"","legendFormat":"Age","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"thresholds"},
"links":[{"title":"PGRDS Instance : Database Size","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=176&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":1000000000},{"color":"#fcdb72","value":1000000000000},{"color":"#f79f64","value":10000000000000}]},
"unit":"decbytes"
},
"overrides":[]
},
"gridPos":{"h":3,"w":2,"x":22,"y":13},
"id":202,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(pg_size_bytes{ins=\"$ins\"})","interval":"","legendFormat":"Size","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Load, 1 = 100% one cpu core usage.\nCalculated by session active time (PG14+)",
"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"decimals":2,"links":[{"title":"PGRDS Instance : Load","url":"/d/pgrds-instance?var-ins=${ins}&viewPanel=147&${__url_time_range}"}],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":0.1}]},"unit":"short"},"overrides":[]},
"gridPos":{"h":5,"w":3,"x":0,"y":16},
"id":199,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:cls:active_time_rate1m{cls=\"$cls\"}","interval":"","legendFormat":"Load","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Load for Instances / Databases in last 5 minutes\nload 1 = 100% usage of 1 core cpu time",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":20,
"gradientMode":"none",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineStyle":{"fill":"solid"},
"lineWidth":1,
"pointSize":3,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGRDS Instance : ${__field.labels.ins}","url":"/d/pgrds-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},
"unit":"short"
},
"overrides":[]
},
"gridPos":{"h":5,"w":9,"x":3,"y":16},
"id":196,
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:active_time_rate1m{ins=\"$ins\", datname!~'template\\\\d'}","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"links":[{"targetBlank":true,"title":"PGSQL Alert for Cluster ${cls}","url":"/alertmgr/#/alerts?filter=%7Bcls%3D%22${cls}%22%7D"}],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":3},{"color":"#b783af","value":4}]}},"overrides":[]},
"gridPos":{"h":5,"w":3,"x":12,"y":16},
"id":198,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(ALERTS{ins=\"$ins\", alertstate=\"firing\"}) or on() vector(0)","interval":"","legendFormat":"Alert","range":true,"refId":"A"}],
"title":"",
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Alerting event graph. Each stripe represent an alerting Event. Gray transparent stipe are pending alerts.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"hidden",
"axisSoftMax":1.2,
"axisSoftMin":0,
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":98,
"gradientMode":"none",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"decimals":0,
"links":[
{ "targetBlank":true,"title":"AlertInfo ${__field.labels.alertname} on Instance ${ins}","url":"/alertmgr/#/alerts?filter=%7Bins%3D%22${ins}%22%2C%20alertname%3D%22${__field.labels.alertname}%22%7D" },
{ "targetBlank":true,"title":"Silence ${__field.labels.alertname} on Cluster ${ins}" ,"url":"/alertmgr/#/silences/new?filter=%7Bins%3D%22${ins}%22%2C%20alertname%3D%22${__field.labels.alertname}%22%7D" },
{ "title":"PGSQL Cluster for ${__field.labels.cls} : Alerts" ,"url":"/d/pgsql-cluster?var-cls=${__field.labels.cls}&${__url_time_range}" },
{ "title":"PGSQL Node for ${__field.labels.ins}" ,"url":"/d/node-instance?var-ins=${__field.labels.ins}&${__url_time_range}" }
],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"none"
},
"overrides":[
{ "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"custom.fillOpacity","value":66},{"id":"mappings","value":[{"options":{"1":{"index":0,"text":"Firing\ud83d\udd25"}},"type":"value"}]}] },
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"custom.fillOpacity","value":25},{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.5)","mode":"fixed"}},{"id":"mappings","value":[{"options":{"1":{"color":"gray","index":0,"text":"Pend\u23f0"}},"type":"value"}]}] },
{ "matcher":{"id":"byType","options":"time"} ,"properties":[{"id":"custom.axisPlacement","value":"auto"}] },
{ "matcher":{"id":"byName","options":"Alert"} ,"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}}] }
]
},
"gridPos":{"h":5,"w":9,"x":15,"y":16},
"id":197,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"ALERTS{ins=\"$ins\", alertstate=\"firing\"}" , "interval":"","legendFormat":"[{{ severity }}\ud83d\udd25] {{alertname}}","range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"ALERTS{ins=\"$ins\", alertstate=\"pending\"} ","hide":false,"interval":"","legendFormat":"[{{ severity }}\u23f0] {{alertname}}" , "refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"0" ,"hide":false,"interval":"","legendFormat":"Alert" , "refId":"C" }
],
"title":"",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":21},"id":133,"panels":[],"title":"Activity","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Rate in last 5min of:\n\n\npg_stat_database. xact_commit: Number of transactions in this database that have been committed\n\npg_stat_database. xact_rollback: Number of transactions in this database that have been rolled back\n\non this postgres instance.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":20,
"gradientMode":"hue",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"short"
},
"overrides":[
{ "matcher":{"id":"byFrameRefID","options":"A"} ,"properties":[{"id":"color","value":{"fixedColor":"red","mode":"fixed"}},{"id":"custom.axisPlacement","value":"auto"}] },{ "matcher":{"id":"byName","options":"Commits"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Rollbacks"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] }
]
},
"gridPos":{"h":6,"w":12,"x":0,"y":22},
"id":169,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=169&${__url_time_range}"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (pg:ins:xact_commit_rate5m{ins=\"$ins\"})" ,"hide":false,"interval":"","intervalFactor":1,"legendFormat":"Commits" ,"range":true,"refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (pg:ins:xact_rollback_rate5m{ins=\"$ins\"})","hide":false,"interval":"","intervalFactor":1,"legendFormat":"Rollbacks","range":true,"refId":"A" }
],
"title":"Transaction Commits / Rollbacks (rate5m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"pg_stat_database: active_time / (xact_commit + xact_rollback)\n\n\nTime spent executing SQL statements in this instance / Number of transactions in this instance in last 1 minute\n\n\nOnly available on PG14+",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":10,
"gradientMode":"opacity",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"s"
},
"overrides":[
{ "matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"custom.fillOpacity","value":21},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.gradientMode","value":"hue"},{"id":"links","value":[{"title":"PGSQL Instance : ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
{ "matcher":{"id":"byFrameRefID","options":"B"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Database : ${__field.labels.ins}.${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}&viewPanel=137"}]}] }
]
},
"gridPos":{"h":6,"w":12,"x":12,"y":22},
"id":109,
"links":[{"title":"PGRDS Cluster Transaction RT: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=109&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:active_time_rate1m{ins=\"$ins\"} / pg:ins:xact_total_rate1m{ins=\"$ins\"}" , "interval":"","intervalFactor":1,"legendFormat":"Instance" ,"range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:active_time_rate1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'} / pg:db:xact_total_rate1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ datname }}","range":true,"refId":"B" }
],
"title":"Transaction RT (1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Transaction Committed rate in last 1 minute, group on database level",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":20,
"gradientMode":"hue",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Xacts for ${__field.labels.ins}","url":"/d/pgsql-xacts?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"short"
},
"overrides":[{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"custom.lineWidth","value":0},{"id":"custom.fillOpacity","value":20}]}]
},
"gridPos":{"h":6,"w":12,"x":0,"y":28},
"id":94,
"links":[{"title":"PGRDS Cluster TPS: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=94&${__url_time_range}"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:xact_commit_rate1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ datname }}","range":true,"refId":"B"}],
"title":"TPS by Database (rate1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Postgres Load Index in last 1 minutes\n\nrate(pg_stat_database.active_time[5m])\n\nload 1 = 100% usage of one cpu core.\n\nCalculated by session active time (PG14+) @ database level.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":40,
"gradientMode":"none",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineStyle":{"fill":"solid"},
"lineWidth":1,
"pointSize":3,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGRDS Instance : ${__field.labels.ins}","url":"/d/pgrds-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},
"unit":"short"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":28},
"id":147,
"links":[{"title":"PGRDS Cluster Load: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=147&${__url_time_range}"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:active_time_rate1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Postgres Load (rate1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Tuples fetched from databases r/s in last minute, group by database on this instance.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":3,
"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"}
},
"links":[{"title":"PGRDS Instance : ${__field.labels.ins}","url":"/d/pgrds-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"cps"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":34},
"id":127,
"links":[{"title":"PGRDS Cluster Row Fetched: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=127&${__url_time_range}"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (rate(pg_db_tup_fetched{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}[1m]))","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Row Fetched (rate1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Tuples fetched, inserted, updated, delete r/s in last minute, on this instance",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":50,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"cps"
},
"overrides":[{"matcher":{"id":"byName","options":"DELETED"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"INSERTED"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"UPDATED"},"properties":[{"id":"color","value":{"fixedColor":"#fcdb72","mode":"fixed"}}]}]
},
"gridPos":{"h":6,"w":12,"x":12,"y":34},
"id":128,
"links":[{"title":"PGRDS Cluster Row Modified: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=128&${__url_time_range}"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(pg_db_tup_inserted{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}[1m]))","hide":false,"interval":"","intervalFactor":2,"legendFormat":"INSERTED","range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(pg_db_tup_updated{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}[1m]))" ,"hide":false,"interval":"","intervalFactor":2,"legendFormat":"UPDATED" ,"range":true,"refId":"C" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(pg_db_tup_deleted{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}[1m]))" ,"hide":false,"interval":"","intervalFactor":2,"legendFormat":"DELETED" ,"range":true,"refId":"D" }
],
"title":"Row Modified (rate1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Table lock categorized in to 3 major categories:\nRead locks, Write Locks, and Exclusive locks.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"bars",
"fillOpacity":100,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":true,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"decimals":0,
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"red","value":80}]},
"unit":"short"
},
"overrides":[{"matcher":{"id":"byName","options":"Read"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Write"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Exclusive"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]}]
},
"gridPos":{"h":6,"w":12,"x":0,"y":40},
"id":180,
"links":[{"title":"PGRDS Cluster Locks by Category: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=180&${__url_time_range}"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Name","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:xlock_count{ins=\"$ins\"}","interval":"","legendFormat":"Exclusive","range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:wlock_count{ins=\"$ins\"}","interval":"","legendFormat":"Write" ,"range":true,"refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:rlock_count{ins=\"$ins\"}","interval":"","legendFormat":"Read" ,"range":true,"refId":"C" }
],
"title":"Locks by Category",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Table Locks in 8 different mode, on this instance",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"bars",
"fillOpacity":55,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":true,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"decimals":0,
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},
"unit":"short"
},
"overrides":[
{ "matcher":{"id":"byName","options":"AccessShareLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#56A64B","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"RowShareLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#8AB8FF","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"RowExclusiveLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#3274D9","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"ShareUpdateExclusiveLock"},"properties":[{"id":"color","value":{"fixedColor":"#F2CC0C","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"ShareLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#CC9D00","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"ShareRowExclusiveLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#FF780A","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"ExclusiveLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#E02F44","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"AccessExclusiveLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#A352CC","mode":"fixed"}}] }
]
},
"gridPos":{"h":12,"w":12,"x":12,"y":40},
"id":154,
"links":[{"title":"PGRDS Cluster Locks : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=154&${__url_time_range}"}],
"options":{"legend":{"calcs":["max","mean","last"],"displayMode":"table","placement":"bottom","showLegend":true,"sortBy":"Max","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.0.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (mode) (pg_lock_count{ins=\"$ins\"})","interval":"","legendFormat":"{{ mode }}","range":true,"refId":"A"}],
"title":"Locks",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Very long transactions, max elapse time (y) group by session state. On this postgres instance",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":0,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"s"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":46},
"id":152,
"links":[{"title":"PGRDS Cluster Long Lived Xact: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=152&${__url_time_range}"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (state) (pg_activity_max_tx_duration{ins=\"$ins\", state!~\"(idle.*|disabled)\"})","interval":"","legendFormat":"{{ state }}","range":true,"refId":"A"}],
"title":"Long Lived Xact",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":52},"id":132,"panels":[],"title":"Session","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Ratio of database session / max allowed sesion per database. the limit is min of max_connections and database's connection limit.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMin":0,
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":0,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"area"}
},
"decimals":1,
"links":[{"title":"PGSQL Session : ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"green","value":0.1},{"color":"yellow","value":0.3},{"color":"orange","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":53},
"id":90,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=90&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:conn_usage{ins=\"$ins\", datname!~'template\\\\d'}","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Connection Usage",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Idle in Transaction backend number of all databases in this instance.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMax":2,
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":71,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"area"}
},
"links":[{"title":"PGSQL Session : ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":1}]}
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":53},
"id":159,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=159&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_activity_count{ins=\"$ins\", state=~\"idle in.*\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Idle in Transaction Backends",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Number of database backend process / session by database.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Session : ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":59},
"id":96,
"links":[{"title":"PGRDS Cluster Backends: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=96&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_activity_count{ins=\"$ins\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Backends",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Newly established session on each database.\nIncrease number of last 1 minute",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":71,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Session : ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"super-light-green"}]}
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":59},
"id":153,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=153&${__url_time_range}"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (increase(pg_db_sessions{ins=\"$ins\"}[1m]))","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
"title":"New Sessions (increase1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Group by pg_stat_activity.state on instance level",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGRDS Instance : ${__field.labels.ins}","url":"/d/pgrds-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"idle"} ,"properties":[{"id":"color","value":{"fixedColor":"#808080","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"disabled"} ,"properties":[{"id":"color","value":{"fixedColor":"#7f7f7fe0","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"active"} ,"properties":[{"id":"color","value":{"fixedColor":"#56A64B","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"fastpath function call"} ,"properties":[{"id":"color","value":{"fixedColor":"#fcdb72","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"idle in transaction"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"idle in transaction (aborted)"},"properties":[{"id":"color","value":{"fixedColor":"#b783af","mode":"fixed"}}] }
]
},
"gridPos":{"h":6,"w":12,"x":0,"y":65},
"id":149,
"links":[{"title":"PGRDS Cluster: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=149&${__url_time_range}"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (state) (pg_activity_count{ins=\"$ins\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Backends by State",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Backend number group by backend type in this instance.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"client backend"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"autovacuum launcher"} ,"properties":[{"id":"color","value":{"fixedColor":"#b783af","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"background writer"} ,"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"checkpointer"} ,"properties":[{"id":"color","value":{"fixedColor":"super-light-orange","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"logical replication launcher"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"walwriter"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"archiver"} ,"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"TimescaleDB Background Worker Launcher"},"properties":[{"id":"color","value":{"fixedColor":"#fcdb72","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"NULL"} ,"properties":[{"id":"color","value":{"fixedColor":"#808080","mode":"fixed"}}] }
]
},
"gridPos":{"h":6,"w":12,"x":12,"y":65},
"id":150,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=150&${__url_time_range}"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (type) (pg_backend_count{ins=\"$ins\"})","interval":"","legendFormat":"{{ type }}","range":true,"refId":"A"}],
"title":"Backends by Type",
"transformations":[{"id":"renameByRegex","options":{"regex":"(Value)","renamePattern":"NULL"}}],
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"max by pg_stat_activity connection duration on instance level",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":0,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"s"
},
"overrides":[
{ "matcher":{"id":"byName","options":"idle"} ,"properties":[{"id":"color","value":{"fixedColor":"#808080","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"disabled"} ,"properties":[{"id":"color","value":{"fixedColor":"#7f7f7fe0","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"active"} ,"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"fastpath function call"} ,"properties":[{"id":"color","value":{"fixedColor":"#fcdb72","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"idle in transaction"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"idle in transaction (aborted)"},"properties":[{"id":"color","value":{"fixedColor":"#b783af","mode":"fixed"}}] }
]
},
"gridPos":{"h":6,"w":12,"x":0,"y":71},
"id":151,
"links":[{"title":"PGRDS Cluster: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=151&${__url_time_range}"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Max","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (state) (pg_activity_max_conn_duration{ins=\"$ins\", state!=\"idle|disabled\"})","interval":"","legendFormat":"{{ state }}","range":true,"refId":"A"}],
"title":"Max Conn Lifespan",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Group by pg_stat_activity.wait_event_type on instance level",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":71,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"Client"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"NULL"} ,"properties":[{"id":"color","value":{"fixedColor":"#808080","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Extension"},"properties":[{"id":"color","value":{"fixedColor":"#7771a4","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"IPC"} ,"properties":[{"id":"color","value":{"fixedColor":"#5b9cd5","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"IO"} ,"properties":[{"id":"color","value":{"fixedColor":"#f7cb67","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Lock"} ,"properties":[{"id":"color","value":{"fixedColor":"#e02f44","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"LWLock"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Timeout"} ,"properties":[{"id":"color","value":{"fixedColor":"#7f7f7f9e","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Running"} ,"properties":[{"id":"color","value":{"fixedColor":"super-light-green","mode":"fixed"}}] }
]
},
"gridPos":{"h":6,"w":12,"x":12,"y":71},
"id":165,
"links":[{"title":"PGRDS Cluster: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=165&${__url_time_range}"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (event) (pg_wait_count{ins=\"$ins\"})","interval":"","legendFormat":"{{ event }}","range":true,"refId":"A"}],
"title":"Backends by Wait Event Type",
"transformations":[{"id":"renameByRegex","options":{"regex":"(Value)","renamePattern":"NULL"}}],
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Time spent executing SQL statements in this database",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":9,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"area"}
},
"links":[{"title":"PGSQL Session : ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"orange","value":0.5},{"color":"red","value":0.7},{"color":"purple","value":0.9}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":77},
"id":183,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=183&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (rate(pg_db_active_time{ins=\"$ins\"}[1m]))\n/ sum by (datname) (rate(pg_db_session_time{ins=\"$ins\"}[1m]))","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Active% (of Session Time)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Abandon: Number of database sessions to this database that were terminated because connection to the client was lost\n\n\nFatal: Number of database sessions to this database that were terminated by fatal errors\n\n\nKilled: Number of database sessions to this database that were terminated by operator intervention\n\n\navailable on PG 14+",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":71,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Session : ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"super-light-green"}]}
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":77},
"id":184,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=184&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Max","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (increase(pg_db_sessions_abandoned{ins=\"$ins\"}[1m]))", "interval":"","legendFormat":"[Abandoned] : {{ datname }}","range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (increase(pg_db_sessions_fatal{ins=\"$ins\"}[1m]))" ,"hide":false,"interval":"","legendFormat":"[Fatal] : {{ datname }}" ,"range":true,"refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (increase(pg_db_sessions_killed{ins=\"$ins\"}[1m]))" ,"hide":false,"interval":"","legendFormat":"[Killed] : {{ datname }}" ,"range":true,"refId":"C" }
],
"title":"Sessions Failure in 1m",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":83},"id":171,"panels":[],"title":"Persist","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Rate of lsn in last minute",
"fieldConfig":{
"defaults":{
"color":{"fixedColor":"#f79f64","mode":"fixed"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":20,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":3,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGRDS Instance : ${__field.labels.ins}","url":"/d/pgrds-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"Bps"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":84},
"id":207,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=140&${__url_time_range}"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:lsn_rate1m{ins=\"$ins\"}","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
"title":"LSN Progress (rate1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"XID Usage of each databases in this instance.",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":0,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"area"}
},
"links":[{"title":"PGSQL Database : ${datname}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${datname}&${__url_time_range}"}],
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"yellow","value":2},{"color":"orange","value":10},{"color":"red","value":30},{"color":"purple","value":90},{"color":"text","value":100}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":84},
"id":208,
"links":[{"title":"PGRDS Cluster Age: ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=161&${__url_time_range}"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Max","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (datname) (pg:db:age{cls=\"$cls\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Age Usage",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":30,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Persist : ${__field.labels.ins}","url":"/d/pgsql-persist?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},
"unit":"decbytes"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":90},
"id":176,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=176&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_size_bytes{ins=\"$ins\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Database Cluster Size",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":8,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Persist : ${__field.labels.ins}","url":"/d/pgsql-persist?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},
"unit":"decbytes"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":90},
"id":178,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=178&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_size_bytes{ins=\"$ins\", datname=~\"(log|wal)\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Database WAL/Log Size",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"}]}
},
"overrides":[{"matcher":{"id":"byName","options":"Scheduled"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Requested"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}]}]
},
"gridPos":{"h":6,"w":12,"x":0,"y":96},
"id":160,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=160&${__url_time_range}\n"}],
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_checkpointer_timed{ins=\"$ins\"}","hide":false,"interval":"","legendFormat":"Scheduled","range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_checkpointer_req{ins=\"$ins\"} " ,"hide":false,"interval":"","legendFormat":"Requested","range":true,"refId":"B" }
],
"title":"Checkpoint Scheduled / Requested",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":30,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Database for ${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"ms"
},
"overrides":[{"matcher":{"id":"byName","options":"Sync"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Write"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]}]
},
"gridPos":{"h":6,"w":12,"x":12,"y":96},
"id":174,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=174&${__url_time_range}\n"}],
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_checkpointer_sync_time{ins=\"$ins\"}[1m])" , "interval":"","legendFormat":"Sync" ,"range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"- rate(pg_checkpointer_write_time{ins=\"$ins\"}[1m])","hide":false,"interval":"","legendFormat":"Write","range":true,"refId":"B" }
],
"title":"Checkpoint Time : Sync/Write",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"decbytes"
},
"overrides":[{"matcher":{"id":"byName","options":"Clean"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Backend"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Checkpoint"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]}]
},
"gridPos":{"h":6,"w":12,"x":0,"y":102},
"id":172,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=172&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_bgwriter_buffers_clean{ins=\"$ins\"}[1m]) * 8192" , "interval":"", "legendFormat":"Clean" ,"range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_bgwriter_buffers_checkpoint{ins=\"$ins\"}[1m]) * 8192","hide":false,"interval":"", "legendFormat":"Checkpoint","range":true,"refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_bgwriter_buffers_backend{ins=\"$ins\"}[1m]) * 8192" ,"hide":false,"interval":"","instant":true,"legendFormat":"Backend" , "refId":"C" }
],
"title":"BGWriter Buffer Flush",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"decbytes"
},
"overrides":[
{ "matcher":{"id":"byName","options":"Clean"} ,"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Backend"} ,"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Checkpoint"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Alloc"} ,"properties":[{"id":"color","value":{"fixedColor":"super-light-red","mode":"fixed"}}] }
]
},
"gridPos":{"h":6,"w":12,"x":12,"y":102},
"id":173,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=173&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_bgwriter_buffers_alloc{ins=\"$ins\"}[1m]) * 8192","interval":"","legendFormat":"Alloc","range":true,"refId":"A"}],
"title":"BGWriter Buffer Alloc",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database 4k blocks access",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Persist : ${__field.labels.ins}","url":"/d/pgsql-persist?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"decbytes"
},
"overrides":[{"matcher":{"id":"byName","options":"Clean"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Backend"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Checkpoint"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]}]
},
"gridPos":{"h":6,"w":12,"x":0,"y":108},
"id":179,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=179&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Name","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg:db:blks_access_1m{ins=\"$ins\"}) * 4096","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Blocks Access 1m",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database 4k blocks hit ratio in last 1 minute",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMax":1,
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":2,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"decimals":2,
"links":[{"title":"PGSQL Persist : ${__field.labels.ins}","url":"/d/pgsql-persist?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}\n"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":108},
"id":170,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=170&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Max","sortDesc":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:blks_hit_ratio1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}","hide":false,"interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Blocks Hit Ratio (1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database 4k blocks access",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Persist : ${__field.labels.ins}","url":"/d/pgsql-persist?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}\n"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"decbytes"
},
"overrides":[{"matcher":{"id":"byName","options":"Clean"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Backend"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Checkpoint"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]}]
},
"gridPos":{"h":6,"w":12,"x":0,"y":114},
"id":182,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=182&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Name","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg:db:blks_read_1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'}) * 4096","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Blocks Read (1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":true,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":5,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Persist : ${__field.labels.ins}","url":"/d/pgsql-persist?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":114},
"id":181,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=181&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg:db:blk_read_time_seconds_rate1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'})" , "interval":"","legendFormat":"\u25b2 {{ datname }}","range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"- sum by (datname) (pg:db:blk_write_time_seconds_rate1m{ins=\"$ins\", datname!~'rdsadmin|polardb_admin|template\\\\d'})","hide":false,"interval":"","legendFormat":"\u25bc {{ datname }}","range":true,"refId":"B" }
],
"title":"Blocks Read/Write Time Spent Rate1m",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":120},"id":162,"panels":[],"title":"Database","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database size on cluster primary",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":35,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},
"unit":"decbytes"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":121},
"id":175,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=175&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_size_bytes{ins=\"$ins\", datname!~'wal|log|template\\\\d'}","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Database Size",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database Size Change on Cluster Primary in Last 10 minutes",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":35,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":1,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]},
"unit":"decbytes"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":121},
"id":185,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=185&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"delta(pg_size_bytes{ins=\"$ins\", datname!~'wal|log|template\\\\d'}[10m])","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Database Size Delta 10m",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database Transaction Commit Rate in last 1 minute",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":20,
"gradientMode":"hue",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}\n"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"short"
},
"overrides":[{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"custom.lineWidth","value":0},{"id":"custom.fillOpacity","value":20}]}]
},
"gridPos":{"h":6,"w":12,"x":0,"y":127},
"id":144,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=144&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg:db:xact_commit_rate1m{ins=\"$ins\", datname!~'template\\\\d'})","hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ datname }}","range":true,"refId":"B"}],
"title":"TPS by Database (rate1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Active processs for each database in this cluster",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":60,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}\n"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":127},
"id":148,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=148&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Last","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_activity_count{ins=\"$ins\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Session by Database",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database 4k blocks hit ratio in last 1 minute",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMax":1,
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":2,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"decimals":2,
"links":[{"title":"PGSQL Database : ${__field.labels.ins}.${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":133},
"id":155,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=155&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Max","sortDesc":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:blks_hit_ratio1m{ins=\"$ins\", datname!~'template\\\\d'}","hide":false,"interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Database Blocks Hit Ratio (1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"number of dangerous idle in transaction backend in different database amoung this cluster",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMax":2,
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":71,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"area"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}\n"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":1}]}
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":133},
"id":167,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=167&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Max","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_activity_count{ins=\"$ins\", state=~\"idle in.*\"})","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Idle in Transaction Backends",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Connection used ratio of min(\n max_connections @ instance level,\n connlimit @ database level\n)",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMin":0,
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":0,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":1,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"area"}
},
"decimals":1,
"links":[{"title":"PGSQL Database : ${__field.labels.ins}.${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${__field.labels.ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9}]},
"unit":"percentunit"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":139},
"id":168,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=168&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:db:conn_usage{ins=\"$ins\", datname!~'template\\\\d'}","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Connection Usage",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":71,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Session : ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"super-light-green"}]}
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":139},
"id":166,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=166&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Mean","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"increase(pg_db_sessions{ins=\"$ins\", datname!~'template\\\\d'}[1m])","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"New Sessions (incr1m)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Tuples fetched from databases among this cluster",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":3,
"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"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}\n"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"cps"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":145},
"id":163,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=163&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Mean","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (rate(pg_db_tup_fetched{ins=\"$ins\", datname!~'template\\\\d'}[1m]))","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Row Fetched",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Tuples fetched, inserted, updated, delete among this cluster group by database",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":50,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}\n"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"cps"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":145},
"id":164,
"links":[{"title":"PGRDS Cluster : ${cls}","url":"/d/pgrds-cluster?var-cls=${cls}&viewPanel=164&${__url_time_range}\n"}],
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Mean","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(pg_db_tup_inserted{ins=\"$ins\", datname!~'template\\\\d'}[1m])) by (datname)","hide":false,"interval":"","intervalFactor":2,"legendFormat":"INSERT.{{ datname }}","range":true,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(pg_db_tup_updated{ins=\"$ins\", datname!~'template\\\\d'}[1m])) by (datname)" ,"hide":false,"interval":"","intervalFactor":2,"legendFormat":"UPDATE.{{ datname }}","range":true,"refId":"C" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(pg_db_tup_deleted{ins=\"$ins\", datname!~'template\\\\d'}[1m])) by (datname)" ,"hide":false,"interval":"","intervalFactor":2,"legendFormat":"DELETE.{{ datname }}","range":true,"refId":"D" }
],
"title":"Row Modified",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":151},"id":124,"panels":[],"title":"Table & Query","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Index Scan + Seq Scan on this table per second",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":2,
"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"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"short"
},
"overrides":[]
},
"gridPos":{"h":7,"w":12,"x":0,"y":152},
"id":125,
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Mean","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname,relname) (\n pg:table:scan_rate1m{ins=\"$ins\", datname!~'template\\\\d'}\n)","interval":"","intervalFactor":2,"legendFormat":"{{ datname }}.{{ relname }}","range":true,"refId":"A"}],
"title":"Table Scan (scan/s)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":2,
"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"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"short"
},
"overrides":[]
},
"gridPos":{"h":7,"w":12,"x":12,"y":152},
"id":126,
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true,"sortBy":"Mean","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname,relname) (\n rate(pg_table_tup_read{ins=\"$ins\", datname!~'template\\\\d'}[1m])\n)","interval":"","intervalFactor":2,"legendFormat":"{{ datname }}.{{ relname }}","range":true,"refId":"A"}],
"title":"Tuple Read (rows/s)",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":0,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"ops"
},
"overrides":[]
},
"gridPos":{"h":11,"w":12,"x":0,"y":159},
"id":187,
"options":{"legend":{"calcs":["max","mean","last"],"displayMode":"table","placement":"bottom","showLegend":true,"sortBy":"Max","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:query:call_rate1m{ins=\"$ins\", datname!~'template\\\\d'}","interval":"","intervalFactor":2,"legendFormat":"{{ datname }}.{{ query }}","range":true,"refId":"B"}],
"title":"Query Call",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Top Query Time Spent among this cluster",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":40,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Databases : ${cls}.${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
"unit":"s"
},
"overrides":[]
},
"gridPos":{"h":11,"w":12,"x":12,"y":159},
"id":111,
"options":{"legend":{"calcs":["max","mean","last"],"displayMode":"table","placement":"bottom","showLegend":true,"sortBy":"Mean","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"11.6.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_query_exec_time{ins=\"$ins\", datname!~'template\\\\d'}[1m])","interval":"","intervalFactor":2,"legendFormat":"{{ datname }}.{{ query }}","range":true,"refId":"B"}],
"title":"Query Time",
"type":"timeseries"
}
],
"preload":false,
"refresh":"",
"schemaVersion":41,
"tags":["Pigsty","PGSQL","Instance","PGRDS"],
"templating":{
"list":[
{"current":{},"datasource":{"type":"prometheus","uid":"ds-prometheus"},"definition":"label_values(pg_up, ins)","description":"Unique instance identifier (e.g pg-meta-1)","includeAll":false,"label":"Instance","name":"ins","options":[],"query":{"query":"label_values(pg_up, ins)","refId":"StandardVariableQuery"},"refresh":1,"regex":"","sort":1,"type":"query"},
{"current":{},"datasource":{"type":"prometheus","uid":"ds-prometheus"},"definition":"label_values(pg_up{ins=\"$ins\"} , ip)","description":"IP address of this postgres instance","hide":2,"includeAll":false,"label":"IP","name":"ip","options":[],"query":{"query":"label_values(pg_up{ins=\"$ins\"} , ip)","refId":"StandardVariableQuery"},"refresh":1,"regex":"","sort":1,"type":"query"},
{
"current":{},
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"definition":"label_values(pg_up{ins=\"$ins\"}, ins)",
"description":"Sequence number of this instance, which is an unique integer among a postgres cluster",
"hide":2,
"includeAll":false,
"label":"Sequence",
"name":"seq",
"options":[],
"query":{"query":"label_values(pg_up{ins=\"$ins\"}, ins)","refId":"StandardVariableQuery"},
"refresh":1,
"regex":"/^[a-zA-Z0-9-_]+-(\\d+)$/",
"sort":1,
"type":"query"
},{
"current":{},
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"definition":"label_values(pg_up{ins=\"$ins\"}, cls)",
"description":"Cluster identifier for this postgres instance, cls should be unique among entire environment. such as pg-meta, pg-test",
"hide":2,
"includeAll":false,
"label":"Cluster",
"name":"cls",
"options":[],
"query":{"query":"label_values(pg_up{ins=\"$ins\"}, cls)","refId":"StandardVariableQuery"},
"refresh":1,
"regex":"",
"sort":1,
"type":"query"
},{
"current":{},
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"definition":"label_values(node_uname_info{ip=\"$ip\"},nodename)",
"description":"Node name of current postgres instance",
"hide":2,
"includeAll":false,
"label":"Node",
"name":"node",
"options":[],
"query":{"query":"label_values(node_uname_info{ip=\"$ip\"},nodename)","refId":"PrometheusVariableQueryEditor-VariableQuery"},
"refresh":1,
"regex":"",
"sort":1,
"type":"query"
},{
"current":{},
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"definition":"label_values(pg_db_age{ins=\"$ins\", datname!~\"template0|template1|postgres|rdsadmin|polardb_admin\"},datname)",
"description":"Non-trivial database in this instance",
"hide":2,
"includeAll":false,
"label":"Database",
"name":"datname",
"options":[],
"query":{"query":"label_values(pg_db_age{ins=\"$ins\", datname!~\"template0|template1|postgres|rdsadmin|polardb_admin\"},datname)","refId":"PrometheusVariableQueryEditor-VariableQuery"},
"refresh":1,
"regex":"",
"sort":1,
"type":"query"
}
]
},
"time":{"from":"now-1h","to":"now"},
"timepicker":{},
"timezone":"browser",
"title":"PGRDS Instance",
"uid":"pgrds-instance",
"version":1
}