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

1569 lines
96 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 Queries for single Instance",
"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":74,"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":"#3e668f","value":0}]}},
"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":"PGSQL Cluster : ${cls}","url":"/d/pgsql-cluster?var-cls=${cls}&${__url_time_range}"}]}] },
{ "matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"links","value":[{"title":"Node Instance : ${ip}","url":"/d/node-instance?var-id=${ip}&${__url_time_range}"}]}] },{ "matcher":{"id":"byFrameRefID","options":"D"},"properties":[{"id":"links","value":[{"title":"Node Instance : ${node}","url":"/d/node-instance?var-id=${node}&${__url_time_range}"}]}] }
]
},
"gridPos":{"h":7,"w":6,"x":0,"y":1},
"id":126,
"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.3.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" },
{ "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Node IP","type":"string","values":["${ip}"]}],"meta":{},"name":""} ,"hide":false,"refId":"C" },
{ "datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Hostname","type":"string","values":["${node}"]}],"meta":{}} ,"hide":false,"refId":"D" }
],
"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"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"max":1.2,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
"overrides":[
{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGSQL Pgbouncer : ${__data.fields.Instance}","url":"/d/pgsql-pgbouncer?var-ins=${__data.fields.Instance}&${__url_time_range}"}]}]},
{"matcher":{"id":"byName","options":"IP"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"PGSQL Node for ${__data.fields.IP}","url":"/d/node-instance?var-id=${__data.fields.IP}&${__url_time_range}"}]}]},
{
"matcher":{"id":"byName","options":"Role"},
"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"0":{"color":"#3e668f","index":1,"text":"primary"},"1":{"color":"#346f36cc","index":0,"text":"replica"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
},{
"matcher":{"id":"byName","options":"Load"},
"properties":[
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
{ "id":"color" ,"value":{"mode":"thresholds"} },
{ "id":"unit" ,"value":"percentunit" },
{ "id":"custom.width" ,"value":120 },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"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":1 }
]
},
{"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":"Space"},
"properties":[
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.05},{"color":"#fcdb72","value":0.8},{"color":"#f79f64","value":0.85},{"color":"red","value":0.9},{"color":"#b783af","value":0.95},{"color":"text","value":0.99}]} },
{ "id":"unit" ,"value":"percentunit" },
{ "id":"custom.width" ,"value":120 },
{ "id":"decimals" ,"value":1 }
]
},{
"matcher":{"id":"byName","options":"Proxy"},
"properties":[
{ "id":"custom.width" ,"value":80 },
{ "id":"links" ,"value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}/"}] },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0},{"color":"#3275d9bf","value":0},{"color":"#55a64bbf","value":1},{"color":"#f2cc0c","value":1000},{"color":"#f79f64","value":2000},{"color":"red","value":3000}]} },
{ "id":"custom.cellOptions","value":{"type":"color-text"} }
]
},
{"matcher":{"id":"byName","options":"TPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{"matcher":{"id":"byName","options":"QPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{
"matcher":{"id":"byName","options":"Backend"},
"properties":[{"id":"custom.width","value":90},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"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":"Query 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","value":0},{"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":"Conn%"},
"properties":[{"id":"unit","value":"percentunit"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"red","value":1}]}},{"id":"decimals","value":0},{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}}]
},
{"matcher":{"id":"byName","options":"LB"},"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"1":{"index":0,"text":"Admin"}},"type":"value"}]},{"id":"links","value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}/"}]}]},
{"matcher":{"id":"byName","options":"Queue"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{
"matcher":{"id":"byName","options":"Lag"},
"properties":[{"id":"custom.width","value":72},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#EAB839","value":1000},{"color":"#f79f64","value":100000},{"color":"#b783af","value":100000},{"color":"red","value":1000000},{"color":"text","value":100000000}]}},{"id":"unit","value":"decbytes"},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
},
{"matcher":{"id":"byName","options":"Up"},"properties":[{"id":"custom.width","value":90},{"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"}}]}
]
},
"gridPos":{"h":7,"w":8,"x":6,"y":1},
"id":105,
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Instance"}]},
"pluginVersion":"12.3.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_in_recovery{cls=\"$cls\"}" ,"format":"table", "instant":true,"interval":"","legendFormat":"","refId":"A" },
{ "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"}, "exemplar":false,"expr":"max by (ins) (pgbouncer:ins:xact_rt_1m{cls=\"$cls\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"F" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins) (up{cls=\"$cls\", job=\"pgsql\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"D" }
],
"title":"Postgres Instances",
"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":true,
"instance 1":true,
"instance 2":true,
"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":10,"Time 2":13,"Time 3":16,"Time 4":17,"Time 5":19,"Time 6":20,"Value #A":1,"Value #B":4,"Value #C":5,"Value #D":0,"Value #E":7,"Value #G":6,"__name__ 1":11,"__name__ 2":14,"__name__ 3":22,"cls 1":18,"cls 2":8,"cls 3":23,"ins":2,"instance 1":21,"instance 2":24,"ip 1":3,"ip 2":9,"ip 3":25,"job 1":12,"job 2":15,"job 3":26},
"renameByName":{"Time 4":"","Value #A":"Role","Value #B":"Load","Value #C":"TPS","Value #D":"Up","Value #E":"Backend","Value #F":"Query RT","Value #G":"Conn%","Value #H":"LB","Value #I":"QPS","Value #J":"Queue","Value #K":"Lag","cls 1":"","cls 2":"","ins":"Instance","ip":"IP","ip 1":"IP"}
}
}
],
"type":"table"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Database in Pgbouncer of this instance ${ins}",
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
"overrides":[
{"matcher":{"id":"byRegexp","options":"/Pool.*/"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
{
"matcher":{"id":"byName","options":"Conn"},
"properties":[{"id":"custom.width","value":65},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":10},{"color":"#EAB839","value":30},{"color":"#f79f64","value":50},{"color":"red","value":70},{"color":"#b783af","value":90},{"color":"text","value":100}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
},{
"matcher":{"id":"byName","options":"Conn Max"},
"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"red","value":0},{"color":"#f79f64","value":10},{"color":"#fcdb72","value":64},{"color":"#346f36cc","value":100},{"color":"semi-dark-green","value":200},{"color":"dark-green","value":400}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.width","value":85}]
},{
"matcher":{"id":"byName","options":"Conn Usage"},
"properties":[
{ "id":"custom.width" ,"value":110 },
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"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":"custom.cellOptions","value":{"type":"color-text"} },
{ "id":"unit" ,"value":"percentunit" }
]
},{
"matcher":{"id":"byRegexp","options":"/Disabled|Paused/"},
"properties":[{"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":"gray","index":0,"text":"N/A"}},"type":"special"}]},{"id":"custom.cellOptions","value":{"mode":"basic","type":"color-background"}}]
},
{"matcher":{"id":"byName","options":"Database"},"properties":[{"id":"links","value":[{"title":"PGSQL Database for ${__data.fields.Database}","url":"/d/pgsql-database?var-ins=${ins}&var-cls=${cls}&var-datname=${__data.fields.Database}&${__url_time_range}"}]},{"id":"custom.align","value":"left"}]},{"matcher":{"id":"byName","options":"Disabled"},"properties":[{"id":"custom.width","value":75}]},
{"matcher":{"id":"byName","options":"Paused"},"properties":[{"id":"custom.width","value":70}]},{"matcher":{"id":"byName","options":"Pool Resv"},"properties":[{"id":"custom.width","value":90}]},{"matcher":{"id":"byName","options":"Lifetime"},"properties":[{"id":"unit","value":"s"},{"id":"custom.width","value":75}]}
]
},
"gridPos":{"h":7,"w":10,"x":14,"y":1},
"id":103,
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Database"}]},
"pluginVersion":"12.3.0",
"targets":[
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname,host,real_datname) (pgbouncer_database_pool_size{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table", "instant":true,"interval":"","legendFormat":"Pool Size" ,"refId":"A" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_reserve_pool{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Pool Resv" ,"refId":"B" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_current_connections{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn" ,"refId":"C" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_max_connections{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Max" ,"refId":"D" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_current_connections{ins=\"$ins\", datname!=\"pgbouncer\"}) / sum by (datname) (pgbouncer_database_max_connections{ins=\"$ins\", datname!=\"pgbouncer\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Usage","refId":"E" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_disabled{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Disabled" ,"refId":"F" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_paused{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Paused" ,"refId":"G" },
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pgbouncer_database_server_lifetime{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Paused" ,"refId":"H" }
],
"title":"Databases in Pgbouncer",
"transformations":[
{"id":"seriesToColumns","options":{"byField":"datname"}},
{
"id":"organize",
"options":{
"excludeByName":{"Time":true,"Time 1":true,"Time 10":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},
"includeByName":{},
"indexByName":{"Time 1":11,"Time 2":12,"Time 3":13,"Time 4":14,"Time 5":15,"Time 6":16,"Time 7":17,"Time 8":18,"Value #A":2,"Value #B":3,"Value #C":5,"Value #D":6,"Value #E":7,"Value #F":8,"Value #G":9,"Value #H":4,"datname":0,"host":10,"real_datname":1},
"renameByName":{"Time 1":"","Time 7":"","Value":"Pool Size","Value #A":"Pool Size","Value #B":"Pool Resv","Value #C":"Conn","Value #D":"Conn Max","Value #E":"Conn Usage","Value #F":"Disabled","Value #G":"Paused","Value #H":"Lifetime","Value #I":"Disable","Value #J":"Pause","datname":"Database","host":"Host","real_datname":"Realname"}
}
}
],
"type":"table"
},
{
"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":"opacity",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"short"
},
"overrides":[
{ "matcher":{"id":"byName","options":"15m"},"properties":[{"id":"custom.fillOpacity","value":20},{"id":"custom.lineWidth","value":1},{"id":"color","value":{"fixedColor":"super-light-blue","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"5m"} ,"properties":[{"id":"custom.lineWidth","value":2},{"id":"color","value":{"fixedColor":"super-light-orange","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"1m"} ,"properties":[{"id":"color","value":{"fixedColor":"super-light-green","mode":"fixed"}},{"id":"custom.showPoints","value":"always"},{"id":"custom.pointSize","value":3},{"id":"custom.lineWidth","value":0}] }
]
},
"gridPos":{"h":7,"w":12,"x":0,"y":8},
"id":69,
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[
{ "exemplar":false,"expr":"pgbouncer:ins:query_rate5m{ins=\"$ins\"}" ,"interval":"","intervalFactor":1,"legendFormat":"QPS" ,"refId":"A" },{ "exemplar":false,"expr":"pgbouncer:ins:query_rate5m{ins=\"$ins\"} OFFSET 1d","interval":"","intervalFactor":1,"legendFormat":"Yesterday","refId":"B" },
{ "exemplar":false,"expr":"pgbouncer:ins:query_rate5m{ins=\"$ins\"} OFFSET 2d","interval":"","intervalFactor":1,"legendFormat":"2 Day Ago","refId":"C" }
],
"title":"QPS Seasonality",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"fixedColor":"semi-dark-blue","mode":"fixed"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":51,
"gradientMode":"opacity",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"light-blue","value":0}]},
"unit":"short"
},
"overrides":[]
},
"gridPos":{"h":7,"w":12,"x":12,"y":8},
"id":70,
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:ins:query_rate1m{ins=\"$ins\"} / pgbouncer:ins:xact_rate1m{ins=\"$ins\"}","interval":"","intervalFactor":1,"legendFormat":"Q","refId":"A"}],
"title":"Average Queries per Xact",
"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":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"s"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":0,"y":15},
"id":97,
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"sum by (state) (pg_activity_max_duration{ins=\"$ins\", state!~\"(idle.*|disabled)\"})","interval":"","legendFormat":"{{ state }}","refId":"A"}],
"title":"Long Run Queries",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"fixedColor":"semi-dark-blue","mode":"fixed"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":51,
"gradientMode":"opacity",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"light-blue","value":0}]},
"unit":"short"
},
"overrides":[]
},
"gridPos":{"h":6,"w":12,"x":12,"y":15},
"id":98,
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:ins:query_rate1m{ins=\"$ins\"} / on(ins) group_left() pg:ins:xact_commit_rate1m{ins=\"$ins\"}","interval":"","intervalFactor":1,"legendFormat":"Q","refId":"A"}],
"title":"Average Queries per Commit",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":21},"id":72,"panels":[],"title":"QPS / Query RT","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Pgbouncer Queries per second according to last 1m, 5m, 15m",
"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":"opacity",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"short"
},
"overrides":[
{ "matcher":{"id":"byName","options":"15m"},"properties":[{"id":"custom.fillOpacity","value":20},{"id":"custom.lineWidth","value":1},{"id":"color","value":{"fixedColor":"super-light-blue","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"5m"} ,"properties":[{"id":"custom.lineWidth","value":2},{"id":"color","value":{"fixedColor":"super-light-orange","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"1m"} ,"properties":[{"id":"color","value":{"fixedColor":"super-light-green","mode":"fixed"}},{"id":"custom.showPoints","value":"always"},{"id":"custom.pointSize","value":3},{"id":"custom.lineWidth","value":0}] }
]
},
"gridPos":{"h":10,"w":12,"x":0,"y":22},
"id":66,
"options":{"legend":{"calcs":["mean","min","max","last"],"displayMode":"table","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[
{ "exemplar":false,"expr":"pgbouncer:ins:query_rate1m{ins=\"$ins\"}" ,"interval":"","intervalFactor":1,"legendFormat":"1m" ,"refId":"A" },{ "exemplar":false,"expr":"pgbouncer:ins:query_rate5m{ins=\"$ins\"}" ,"interval":"","intervalFactor":1,"legendFormat":"5m" ,"refId":"B" },
{ "exemplar":false,"expr":"pgbouncer:ins:query_rate15m{ins=\"$ins\"}","interval":"","intervalFactor":1,"legendFormat":"15m","refId":"C" }
],
"title":"QPS",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"Pgbouncer query average response time in last 1m, 5m, 15m",
"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":"opacity",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"s"
},
"overrides":[
{ "matcher":{"id":"byName","options":"15m"},"properties":[{"id":"custom.fillOpacity","value":20},{"id":"custom.lineWidth","value":1},{"id":"color","value":{"fixedColor":"super-light-blue","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"5m"} ,"properties":[{"id":"custom.lineWidth","value":2},{"id":"color","value":{"fixedColor":"super-light-orange","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"1m"} ,"properties":[{"id":"color","value":{"fixedColor":"super-light-purple","mode":"fixed"}},{"id":"custom.showPoints","value":"always"},{"id":"custom.pointSize","value":3},{"id":"custom.lineWidth","value":0}] }
]
},
"gridPos":{"h":10,"w":12,"x":12,"y":22},
"id":68,
"options":{"legend":{"calcs":["mean","min","max","last"],"displayMode":"table","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[
{ "exemplar":false,"expr":"pgbouncer:ins:query_rt_1m{ins=\"$ins\"}" , "interval":"","intervalFactor":1,"legendFormat":"1m" ,"refId":"A" },{ "exemplar":false,"expr":"pgbouncer:ins:query_rt_5m{ins=\"$ins\"}" ,"hide":false,"interval":"","intervalFactor":1,"legendFormat":"5m" ,"refId":"B" },
{ "exemplar":false,"expr":"pgbouncer:ins:query_rt_15m{ins=\"$ins\"}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"15m","refId":"C" }
],
"title":"RT",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"fixedColor":"#346f36cc","mode":"fixed"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"hidden",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":33,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"none"
},
"overrides":[{"matcher":{"id":"byName","options":"QPS Divergence"},"properties":[{"id":"custom.lineWidth","value":1},{"id":"custom.pointSize","value":2},{"id":"custom.showPoints","value":"always"}]},{"matcher":{"id":"byType","options":"time"},"properties":[{"id":"custom.axisPlacement","value":"auto"}]}]
},
"gridPos":{"h":5,"w":12,"x":0,"y":32},
"id":62,
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"(avg_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[5m]) / stddev_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[5m])) ^ 2","interval":"","legendFormat":"QPS Divergence","refId":"A"}],
"title":"QPS Divergence",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"fixedColor":"#f79f64","mode":"fixed"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"hidden",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":35,
"gradientMode":"none",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"none"
},
"overrides":[{"matcher":{"id":"byName","options":"RT Divergence"},"properties":[{"id":"custom.lineWidth","value":1},{"id":"custom.pointSize","value":2},{"id":"custom.showPoints","value":"always"}]},{"matcher":{"id":"byType","options":"time"},"properties":[{"id":"custom.axisPlacement","value":"auto"}]}]
},
"gridPos":{"h":5,"w":12,"x":12,"y":32},
"id":64,
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"(avg_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[5m]) / stddev_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[5m])) ^ 2","interval":"","legendFormat":"RT Divergence","refId":"A"}],
"title":"RT Divergence",
"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",
"lineStyle":{"fill":"solid"},
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"none"
},
"overrides":[
{
"matcher":{"id":"byName","options":"QPS"},
"properties":[{"id":"custom.lineWidth","value":1},{"id":"custom.pointSize","value":2},{"id":"custom.showPoints","value":"always"},{"id":"custom.drawStyle","value":"line"},{"id":"custom.pointSize","value":2},{"id":"color","value":{"fixedColor":"rgba(50, 117, 217, 0.4)","mode":"fixed"}},{"id":"custom.lineInterpolation","value":"linear"},{"id":"custom.lineStyle","value":{"fill":"solid"}}]
},
{"matcher":{"id":"byName","options":"\u00b5"},"properties":[{"id":"custom.lineWidth","value":1},{"id":"custom.lineStyle","value":{"dash":[10,10],"fill":"dash"}},{"id":"custom.lineWidth","value":2},{"id":"color","value":{"fixedColor":"rgba(36, 41, 46, 0.66)","mode":"fixed"}}]},
{"matcher":{"id":"byName","options":"+\u03c3"},"properties":[{"id":"custom.fillBelowTo","value":"-\u03c3"},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"rgba(150, 217, 141, 0.8)","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"-\u03c3"},"properties":[{"id":"custom.lineWidth","value":0}]},
{"matcher":{"id":"byName","options":"+3\u03c3"},"properties":[{"id":"custom.fillBelowTo","value":"-3\u03c3"},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"rgba(255, 179, 87, 0.5)","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"-3\u03c3"},"properties":[{"id":"custom.lineWidth","value":0}]}
]
},
"gridPos":{"h":10,"w":12,"x":0,"y":37},
"id":56,
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m]) + 3 * stddev_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m])","interval":"","legendFormat":"+3\u03c3","refId":"E" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m]) - 3 * stddev_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m])","interval":"","legendFormat":"-3\u03c3","refId":"F" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m]) + stddev_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m])" ,"interval":"","legendFormat":"+\u03c3" ,"refId":"C" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m]) - stddev_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m])" ,"interval":"","legendFormat":"-\u03c3" ,"refId":"D" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rate1m{ins=\"$ins\"}[15m])" ,"interval":"","legendFormat":"\u00b5" ,"refId":"B" },
{ "exemplar":false,"expr":"pgbouncer:ins:query_rate1m{ins=\"$ins\"}" ,"interval":"","legendFormat":"QPS" ,"refId":"A" }
],
"title":"QPS Distribution",
"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",
"lineStyle":{"fill":"solid"},
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"s"
},
"overrides":[
{
"matcher":{"id":"byName","options":"v"},
"properties":[{"id":"custom.lineWidth","value":1},{"id":"custom.pointSize","value":2},{"id":"custom.showPoints","value":"always"},{"id":"custom.drawStyle","value":"line"},{"id":"custom.pointSize","value":2},{"id":"color","value":{"fixedColor":"rgba(50, 117, 217, 0.5)","mode":"fixed"}},{"id":"custom.lineInterpolation","value":"linear"},{"id":"custom.lineStyle","value":{"fill":"solid"}}]
},
{"matcher":{"id":"byName","options":"\u00b5"},"properties":[{"id":"custom.lineWidth","value":1},{"id":"custom.lineStyle","value":{"dash":[15,10],"fill":"dash"}},{"id":"custom.lineWidth","value":2},{"id":"color","value":{"fixedColor":"rgba(36, 41, 46, 0.66)","mode":"fixed"}}]},
{"matcher":{"id":"byName","options":"+\u03c3"},"properties":[{"id":"custom.fillBelowTo","value":"-\u03c3"},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"rgba(85, 166, 75, 0.5)","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"-\u03c3"},"properties":[{"id":"custom.lineWidth","value":0}]},
{"matcher":{"id":"byName","options":"+3\u03c3"},"properties":[{"id":"custom.fillBelowTo","value":"-3\u03c3"},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"rgba(255, 179, 87, 0.5)","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"-3\u03c3"},"properties":[{"id":"custom.lineWidth","value":0}]}
]
},
"gridPos":{"h":10,"w":12,"x":12,"y":37},
"id":59,
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m]) + 3 * stddev_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m])" ,"interval":"","legendFormat":"+3\u03c3","refId":"E" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m]) - 3 * stddev_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m]) ","interval":"","legendFormat":"-3\u03c3","refId":"F" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m]) + stddev_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m])" ,"interval":"","legendFormat":"+\u03c3" ,"refId":"C" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m]) - stddev_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m])" ,"interval":"","legendFormat":"-\u03c3" ,"refId":"D" },
{ "exemplar":false,"expr":"avg_over_time(pgbouncer:ins:query_rt_1m{ins=\"$ins\"}[15m])" ,"interval":"","legendFormat":"\u00b5" ,"refId":"B" },
{ "exemplar":false,"expr":"pgbouncer:ins:query_rt_1m{ins=\"$ins\"}" ,"interval":"","legendFormat":"v" ,"refId":"A" }
],
"title":"RT Distribution",
"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":42,
"gradientMode":"hue",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Database for ${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${ins}&var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"short"
},
"overrides":[{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"custom.stacking","value":{"group":"A","mode":"none"}},{"id":"custom.lineWidth","value":0}]}]
},
"gridPos":{"h":7,"w":12,"x":0,"y":47},
"id":80,
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:ins:query_rate5m{ins=\"$ins\"}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"Instance","refId":"B"},{"exemplar":false,"expr":"pgbouncer:db:query_rate5m{ins=\"$ins\"}","interval":"","intervalFactor":1,"legendFormat":"{{ datname }}","refId":"A"}],
"title":"QPS by Database",
"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":15,
"gradientMode":"hue",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"links":[{"title":"PGSQL Instance for ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&var-cls=${__field.labels.cls}&${__url_time_range}"}],
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"short"
},
"overrides":[{"matcher":{"id":"byName","options":"Cluster"},"properties":[{"id":"custom.stacking","value":{"group":"A","mode":"none"}},{"id":"custom.lineWidth","value":0}]}]
},
"gridPos":{"h":7,"w":12,"x":12,"y":47},
"id":81,
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:cls:query_rate5m{cls=\"$cls\"}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"Cluster","refId":"B"},{"exemplar":false,"expr":"pgbouncer:ins:query_rate5m{cls=\"$cls\"}","interval":"","intervalFactor":1,"legendFormat":"{{ ins }}","refId":"A"}],
"title":"QPS by Instance",
"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":0,
"gradientMode":"opacity",
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"smooth",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"s"
},
"overrides":[
{ "matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"custom.fillOpacity","value":20},{"id":"custom.lineWidth","value":1},{"id":"color","value":{"fixedColor":"super-light-blue","mode":"fixed"}}] },
{ "matcher":{"id":"byFrameRefID","options":"B"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Database for ${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}]}] }
]
},
"gridPos":{"h":10,"w":12,"x":0,"y":54},
"id":100,
"options":{"legend":{"calcs":["mean","min","max","last"],"displayMode":"table","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:ins:query_rt_1m{ins=\"$ins\"}","interval":"","intervalFactor":1,"legendFormat":"Instance","refId":"A"},{"exemplar":false,"expr":"pgbouncer:db:query_rt_1m{ins=\"$ins\"}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ datname }}","refId":"B"}],
"title":"Query RT by Database",
"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":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",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"s"
},
"overrides":[
{ "matcher":{"id":"byName","options":"Cluster"},"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 Cluster for ${__field.labels.cls}","url":"/d/pgsql-instance?var-cls=${__field.labels.cls}&${__url_time_range}"}]}] },
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance for ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] }
]
},
"gridPos":{"h":10,"w":12,"x":12,"y":54},
"id":102,
"options":{"legend":{"calcs":["mean","min","max","last"],"displayMode":"table","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:cls:query_rt_1m{cls=\"$cls\"}","interval":"","intervalFactor":1,"legendFormat":"Cluster","refId":"A"},{"exemplar":false,"expr":"pgbouncer:ins:query_rt_1m{cls=\"$cls\"}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ ins }}","refId":"B"}],
"title":"Query RT by Instance",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":64},"id":107,"panels":[],"title":"Session","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},"overrides":[{"matcher":{"id":"byName","options":"Conn Usage"},"properties":[{"id":"unit","value":"percentunit"}]}]},
"gridPos":{"h":3,"w":24,"x":0,"y":65},
"id":113,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"auto","wideLayout":true},
"pluginVersion":"12.3.0",
"targets":[
{ "exemplar":false,"expr":"pgbouncer:ins:pool_databases{ins=\"$ins\"}", "interval":"","legendFormat":"Database" ,"refId":"A" },{ "exemplar":false,"expr":"pgbouncer:ins:pool_users{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"User" ,"refId":"B" },
{ "exemplar":false,"expr":"pgbouncer:ins:pools{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Pools" ,"refId":"C" },{ "exemplar":false,"expr":"pgbouncer:ins:free_servers{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Free Srv" ,"refId":"D" },
{ "exemplar":false,"expr":"pgbouncer:ins:active_servers{ins=\"$ins\"}","hide":false,"interval":"","legendFormat":"Active Srv" ,"refId":"E" },{ "exemplar":false,"expr":"pgbouncer:ins:active_clients{ins=\"$ins\"}","hide":false,"interval":"","legendFormat":"Active Clients","refId":"F" },
{ "exemplar":false,"expr":"pgbouncer:ins:free_clients{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Free Clients" ,"refId":"G" },{ "exemplar":false,"expr":"pgbouncer:ins:used_clients{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Used Clients" ,"refId":"H" },
{ "exemplar":false,"expr":"pgbouncer:ins:login_clients{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Login Clients" ,"refId":"I" },{ "exemplar":false,"expr":"max(pgbouncer:db:conn_usage{ins=\"$ins\"})","hide":false,"interval":"","legendFormat":"Conn Usage" ,"refId":"J" }
],
"type":"stat"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMax":1,
"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":2,
"pointSize":2,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"area"}
},
"decimals":1,
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"green","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":7,"w":12,"x":0,"y":68},
"id":114,
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:db:conn_usage{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
"title":"Pgbouncer Connection Usage",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"New Conn Rate/s in last Minute: Number of assignment for server assigned to client",
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"barAlignment":0,
"barWidthFactor":0.6,
"drawStyle":"line",
"fillOpacity":65,
"gradientMode":"hue",
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"stepBefore",
"lineWidth":0,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"Active"} ,"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Used"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Idle"} ,"properties":[{"id":"color","value":{"fixedColor":"rgba(200, 200, 200, 0.3)","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Tested"} ,"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Login"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"servers"},"properties":[{"id":"color","value":{"fixedColor":"#3d668ffc","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Clients"},"properties":[{"id":"color","value":{"fixedColor":"#f5a773fa","mode":"fixed"}}] }
]
},
"gridPos":{"h":7,"w":12,"x":12,"y":68},
"id":122,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[
{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"-pgbouncer:ins:active_servers{ins=\"$ins\"}-\npgbouncer:ins:idle_servers{ins=\"$ins\"}-\npgbouncer:ins:used_servers{ins=\"$ins\"}-\npgbouncer:ins:tested_servers{ins=\"$ins\"}-\npgbouncer:ins:login_servers{ins=\"$ins\"}\n","interval":"","legendFormat":"servers","range":true,"refId":"A"},
{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pgbouncer:ins:active_clients{ins=\"$ins\"}+\npgbouncer:ins:waiting_clients{ins=\"$ins\"}\n","hide":false,"interval":"","legendFormat":"Clients","range":true,"refId":"B"}
],
"title":"Pgbouncer Servers & Clients",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"description":"New Conn Rate/s in last Minute: Number of assignment for server assigned to client",
"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",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Used"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Idle"} ,"properties":[{"id":"color","value":{"fixedColor":"rgba(200, 200, 200, 0.3)","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Tested"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Login"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] }
]
},
"gridPos":{"h":7,"w":12,"x":0,"y":75},
"id":120,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pgbouncer_stat_avg_server_assignment_count{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
"title":"Server Assignment Rate",
"type":"timeseries"
},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{
"color":{"mode":"palette-classic"},
"custom":{
"axisBorderShow":false,
"axisCenteredZero":false,
"axisColorMode":"text",
"axisLabel":"",
"axisPlacement":"auto",
"axisSoftMax":0.004,
"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",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"none"},
"thresholdsStyle":{"mode":"area"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0},{"color":"yellow","value":0.001},{"color":"orange","value":0.01},{"color":"red","value":0.1},{"color":"purple","value":1},{"color":"text","value":10}]},
"unit":"s"
},
"overrides":[]
},
"gridPos":{"h":7,"w":12,"x":12,"y":75},
"id":115,
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:pool:maxwait{ins=\"$ins\"}","interval":"","legendFormat":"{{ user }}@{{ datname }}","refId":"A"}],
"title":"Max Wait",
"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":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Used"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Idle"} ,"properties":[{"id":"color","value":{"fixedColor":"rgba(200, 200, 200, 0.3)","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Tested"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Login"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] }
]
},
"gridPos":{"h":7,"w":12,"x":0,"y":82},
"id":116,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[
{ "exemplar":false,"expr":"pgbouncer:ins:active_servers{ins=\"$ins\"}", "interval":"","legendFormat":"Active","refId":"A" },{ "exemplar":false,"expr":"pgbouncer:ins:used_servers{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Used" ,"refId":"B" },
{ "exemplar":false,"expr":"pgbouncer:ins:idle_servers{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Idle" ,"refId":"C" },{ "exemplar":false,"expr":"pgbouncer:ins:tested_servers{ins=\"$ins\"}","hide":false,"interval":"","legendFormat":"Tested","refId":"D" },
{ "exemplar":false,"expr":"pgbouncer:ins:login_servers{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Login" ,"refId":"E" }
],
"title":"Pgbouncer Server State",
"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":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]}
},
"overrides":[{"matcher":{"id":"byName","options":"Waiting"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]}]
},
"gridPos":{"h":7,"w":12,"x":12,"y":82},
"id":117,
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:ins:active_clients{ins=\"$ins\"}","interval":"","legendFormat":"Active","refId":"A"},{"exemplar":false,"expr":"pgbouncer:pool:waiting_clients{ins=\"$ins\"}","hide":false,"interval":"","legendFormat":"Waiting","refId":"B"}],
"title":"Pgbouncer Client State",
"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":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Used"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Idle"} ,"properties":[{"id":"color","value":{"fixedColor":"rgba(200, 200, 200, 0.3)","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Tested"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Login"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] }
]
},
"gridPos":{"h":7,"w":12,"x":0,"y":89},
"id":118,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:db:active_servers{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
"title":"Active Server by Database",
"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":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
},
"overrides":[
{ "matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Used"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Idle"} ,"properties":[{"id":"color","value":{"fixedColor":"rgba(200, 200, 200, 0.3)","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"Tested"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] },
{ "matcher":{"id":"byName","options":"Login"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] }
]
},
"gridPos":{"h":7,"w":12,"x":12,"y":89},
"id":119,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:db:active_clients{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
"title":"Active Clients by Database",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":96},"id":108,"panels":[],"title":"Pool","type":"row"},
{
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
"fieldConfig":{
"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
"overrides":[
{ "matcher":{"id":"byRegexp","options":"/\\[statement\\].*/"} ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },{ "matcher":{"id":"byRegexp","options":"/\\[transaction\\].*/"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },
{ "matcher":{"id":"byRegexp","options":"/\\[session\\].*/"} ,"properties":[{"id":"color","value":{"fixedColor":"#fcdb72","mode":"fixed"}}] }
]
},
"gridPos":{"h":7,"w":12,"x":0,"y":97},
"id":109,
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12},"textMode":"auto","wideLayout":true},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer_pool_active_clients{ins=\"$ins\"}","interval":"","legendFormat":"[{{ pool_mode }}]] {{ user }}@{{ datname }}","refId":"A"}],
"type":"stat"
},
{
"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":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
},
"overrides":[{"matcher":{"id":"byName","options":"idle"},"properties":[{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.5)","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Waiting"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]}]
},
"gridPos":{"h":7,"w":12,"x":12,"y":97},
"id":110,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"sum by (user) (pgbouncer:pool:active_clients{ins=\"$ins\"})","interval":"","legendFormat":"{{ user }}","refId":"A"}],
"title":"Clients by User",
"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":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
},
"overrides":[{"matcher":{"id":"byName","options":"idle"},"properties":[{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.5)","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Waiting"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]}]
},
"gridPos":{"h":7,"w":12,"x":0,"y":104},
"id":111,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"pgbouncer:pool:active_clients{ins=\"$ins\"}","interval":"","legendFormat":"{{ user }}@{{ datname }}","refId":"A"}],
"title":"Clients by Pool",
"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":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"auto",
"showValues":false,
"spanNulls":false,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"mappings":[],
"min":0,
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
},
"overrides":[{"matcher":{"id":"byName","options":"idle"},"properties":[{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.5)","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Waiting"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]},{"matcher":{"id":"byName","options":"Active"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]}]
},
"gridPos":{"h":7,"w":12,"x":12,"y":104},
"id":112,
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"exemplar":false,"expr":"sum by (datname) (pgbouncer:pool:active_clients{ins=\"$ins\"})","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
"title":"Clients by Database",
"type":"timeseries"
},
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":111},"id":123,"panels":[],"title":"Pgbouncer Logs: ${ins}","type":"row"},
{
"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
"description":"Pgbouncer Logs Count",
"fieldConfig":{
"defaults":{
"color":{"fixedColor":"#346f36cc","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":{"graph":false,"legend":false,"tooltip":false,"viz":false},
"insertNulls":false,
"lineInterpolation":"linear",
"lineWidth":1,
"pointSize":5,
"scaleDistribution":{"type":"linear"},
"showPoints":"never",
"showValues":false,
"spanNulls":true,
"stacking":{"group":"A","mode":"normal"},
"thresholdsStyle":{"mode":"off"}
},
"decimals":0,
"mappings":[],
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
"unit":"none"
},
"overrides":[]
},
"gridPos":{"h":5,"w":24,"x":0,"y":112},
"id":124,
"interval":"1s",
"links":[{"title":"PGBouncer Logs for ${ins}","url":"/d/logs-instance?var-ins=$ins&var-src=pgbouncer&${__url_time_range}"}],
"options":{"legend":{"calcs":["sum"],"displayMode":"table","placement":"right","showLegend":false},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
"pluginVersion":"12.3.0",
"targets":[{"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:syslog ip:$ip app:pgbouncer | stats count() as count","legendFormat":"pgbouncer","queryType":"statsRange","refId":"A"}],
"title":"Pgbouncer Logs",
"type":"timeseries"
},
{
"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
"description":"",
"gridPos":{"h":12,"w":24,"x":0,"y":117},
"id":125,
"options":{"dedupStrategy":"none","enableInfiniteScrolling":true,"enableLogDetails":true,"fontSize":"small","prettifyLogMessage":false,"showCommonLabels":false,"showControls":true,"showLabels":true,"showTime":true,"sortOrder":"Descending","syntaxHighlighting":true,"wrapLogMessage":false},
"pluginVersion":"12.3.0",
"targets":[{"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:syslog ip:$ip app:pgbouncer","instant":false,"queryType":"instant","range":true,"refId":"A"}],
"type":"logs"
}
],
"preload":false,
"refresh":"",
"schemaVersion":42,
"tags":["Pigsty","PGSQL","Instance"],
"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\"} , instance)",
"description":"IP address of this postgres instance",
"hide":2,
"includeAll":false,
"label":"IP",
"name":"ip",
"options":[],
"query":{"query":"label_values(pg_up{ins=\"$ins\"} , instance)","refId":"StandardVariableQuery"},
"refresh":1,
"regex":"/([0-9\\.]+)\\:\\d+/",
"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{ins=\"$ins\"}, nodename)",
"description":"Node name of current postgres instance",
"hide":2,
"includeAll":false,
"label":"Node",
"name":"node",
"options":[],
"query":{"query":"label_values(node_uname_info{ins=\"$ins\"}, nodename)","refId":"StandardVariableQuery"},
"refresh":1,
"regex":"",
"sort":1,
"type":"query"
}
]
},
"time":{"from":"now-1h","to":"now"},
"timepicker":{},
"timezone":"browser",
"title":"PGSQL Pgbouncer",
"uid":"pgsql-pgbouncer",
"version":1,
"weekStart":""
}