2067 lines
129 KiB
JSON
2067 lines
129 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 Session of 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":[
|
|
{
|
|
"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"}]}},
|
|
"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":0},
|
|
"id":172,
|
|
"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" },
|
|
{ "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" }
|
|
],
|
|
"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":"PGSQL Session : ${__data.fields.Instance}","url":"/d/pgsql-session?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"} },
|
|
{ "id":"links" ,"value":[{"title":"PGSQL Service for ${cls}-${__data.fields.Status}","url":"/d/pgsql-service?var-svc=${__data.fields.Cluster}-${__data.fields.Status}&${__url_time_range}"}] }
|
|
]
|
|
},{
|
|
"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"},{"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"},{"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"},{"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"},{"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"},{"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"},{"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"},{"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"},{"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"},{"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"},{"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"},{"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":18,"x":6,"y":0},
|
|
"id":159,
|
|
"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":"pg_in_recovery{cls=\"$cls\"}" ,"format":"table", "instant":true,"interval":"","legendFormat":"","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"ins:pressure1{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"}, "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":false,"instant":true,"interval":"","legendFormat":"","refId":"F" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (ins) (pg:ins:conn_usage{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"G" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (ins) (pgbouncer:ins:query_rate1m{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"I" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (ins) (pgbouncer:ins:waiting_clients{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"J" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (ins) (pg:ins:lag_bytes{cls=\"$cls\", ins=~'$cls.*'})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"K" },
|
|
{ "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":false,
|
|
"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"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":7},"id":119,"panels":[],"title":"Overview","type":"row"},
|
|
{
|
|
"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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"decimals":1,
|
|
"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":"purple","value":0.9}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":8},
|
|
"id":111,
|
|
"options":{"legend":{"calcs":["last","max"],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.0.0",
|
|
"targets":[{"exemplar":false,"expr":"pg:ins:conn_usage{ins=\"$ins\"}","interval":"","legendFormat":"Postgres","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":7,"w":12,"x":12,"y":8},
|
|
"id":168,
|
|
"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":"12.0.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":"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":[],
|
|
"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":8,"w":12,"x":0,"y":15},
|
|
"id":166,
|
|
"options":{"legend":{"calcs":["last"],"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":"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":8,"w":12,"x":12,"y":15},
|
|
"id":101,
|
|
"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":"12.0.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":8,"w":12,"x":0,"y":23},
|
|
"id":167,
|
|
"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":"12.0.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":8,"w":12,"x":12,"y":23},
|
|
"id":170,
|
|
"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":"12.0.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":"max by pg_stat_activity transaction 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":8,"w":12,"x":0,"y":31},
|
|
"id":171,
|
|
"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":"12.0.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 (Max Xact Lifespan)",
|
|
"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":8,"w":12,"x":12,"y":31},
|
|
"id":169,
|
|
"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":"12.0.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"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":39},"id":105,"panels":[],"title":"Database","type":"row"},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"links":[],"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"}]},"unit":"none"},"overrides":[]},
|
|
"gridPos":{"h":6,"w":4,"x":0,"y":40},
|
|
"id":99,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.0.0",
|
|
"targets":[{"exemplar":false,"expr":"pg_setting_max_connections{ins=\"$ins\"}","instant":true,"interval":"","legendFormat":"Max Connection","refId":"A"},{"exemplar":false,"expr":"pg_setting_max_worker_processes{ins=\"$ins\"}","hide":false,"instant":true,"interval":"","legendFormat":"Max Worker Process","refId":"B"}],
|
|
"title":"",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}},
|
|
"overrides":[
|
|
{
|
|
"matcher":{"id":"byName","options":"Database"},
|
|
"properties":[
|
|
{ "id":"links" ,"value":[{"title":"PGSQL Cluster Database ${__data.fields.Database}","url":"/d/pgsql-database?var-cls=${cls}&var-ins=${ins}&var-datname=${__data.fields.Database}&${__url_time_range}"}] },
|
|
{ "id":"mappings" ,"value":[{"options":{"postgres":{"color":"#3e668f","index":2},"template0":{"color":"#f79f64","index":0},"template1":{"color":"#fcdb72","index":1}},"type":"value"}] },
|
|
{ "id":"custom.cellOptions","value":{"type":"auto"} },
|
|
{ "id":"color" ,"value":{"fixedColor":"text","mode":"fixed"} }
|
|
]
|
|
},{
|
|
"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":50},{"id":"color","value":{"mode":"thresholds"}},{"id":"decimals","value":1}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Session"},
|
|
"properties":[
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#848484"},{"color":"#3e668f","value":0},{"color":"#EAB839","value":20},{"color":"#f79f64","value":40},{"color":"red","value":80},{"color":"#b783af","value":100},{"color":"text","value":400},{"color":"#6ED0E0","value":410}]} },
|
|
{ "id":"color" ,"value":{"mode":"thresholds"} },
|
|
{ "id":"custom.width" ,"value":70 },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} }
|
|
]
|
|
},{
|
|
"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":"/PG CONN|PGB CONN/"},
|
|
"properties":[{"id":"unit","value":"percentunit"},{"id":"custom.width","value":90},{"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"}}]
|
|
},{
|
|
"matcher":{"id":"byRegexp","options":"/Disabled|Paused/"},
|
|
"properties":[
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"red","value":0.5}]} },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} },
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"mappings" ,"value":[{"options":{"0":{"color":"#346f36cc","index":1,"text":"False"},"1":{"color":"red","index":2,"text":"True"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"N/A"}},"type":"special"}] }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":20,"x":4,"y":40},
|
|
"id":97,
|
|
"options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":true,"displayName":"Session"}]},
|
|
"pluginVersion":"12.0.0",
|
|
"targets":[
|
|
{ "exemplar":false,"expr":"sum by (datname) (pg_size_bytes{ins=\"$ins\", datname!~\"wal|log\"})" ,"format":"table", "instant":true,"interval":"","legendFormat":"Age" ,"refId":"A" },
|
|
{ "exemplar":false,"expr":"max by (datname) (pg:db:age{ins=\"$ins\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Commit" ,"refId":"B" },
|
|
{ "exemplar":false,"expr":"max by (datname) (1 - pg_db_is_template{ins=\"$ins\"} + pg_db_allow_conn{ins=\"$primary\"} * 2)","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Status" ,"refId":"C" },
|
|
{ "exemplar":false,"expr":"sum by (datname) (pg_activity_count{ins=\"$ins\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Session" ,"refId":"D" },
|
|
{ "exemplar":false,"expr":"sum by (datname) (pg:db:xact_commit_rate1m{ins=\"$ins\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"TPS" ,"refId":"E" },
|
|
{ "exemplar":false,"expr":"max by (datname) (pg_db_conn_limit{ins=\"$ins\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Limit" ,"refId":"F" },
|
|
{ "exemplar":false,"expr":"max by (datname) (pgbouncer:db:conn_usage{ins=\"$ins\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Pool Usage" ,"refId":"G" },
|
|
{ "exemplar":false,"expr":"max by (datname) (pg:db:conn_usage{ins=\"$ins\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"PG Conn Usage","refId":"H" },
|
|
{ "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_disabled{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Disabled" ,"refId":"I" },
|
|
{ "exemplar":false,"expr":"sum by (datname) (pgbouncer_database_paused{ins=\"$ins\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Paused" ,"refId":"J" }
|
|
],
|
|
"title":"",
|
|
"transformations":[
|
|
{"id":"seriesToColumns","options":{"byField":"datname"}},
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{"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},
|
|
"indexByName":{"Time 1":11,"Time 10":20,"Time 2":12,"Time 3":13,"Time 4":14,"Time 5":15,"Time 6":16,"Time 7":17,"Time 8":18,"Time 9":19,"Value #A":1,"Value #B":2,"Value #C":7,"Value #D":6,"Value #E":3,"Value #F":5,"Value #G":4,"Value #H":8,"Value #I":9,"Value #J":10,"datname":0},
|
|
"renameByName":{"Time 1":"","Time 7":"","Value #A":"Size","Value #B":"Age","Value #C":"Status","Value #D":"Session","Value #E":"TPS","Value #F":"ConnLimit","Value #G":"PG CONN","Value #H":"PGB CONN","Value #I":"Disabled","Value #J":"Paused","datname":"Database","host":"Target","real_datname":"Datname"}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"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 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":"#3e668f"},{"color":"green","value":0.1},{"color":"yellow","value":0.3},{"color":"orange","value":0.5},{"color":"red","value":0.7},{"color":"purple","value":0.9}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":46},
|
|
"id":113,
|
|
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"pg:db:conn_usage{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"PG Conn 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",
|
|
"axisSoftMax":1.2,
|
|
"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 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":"#3e668f"},{"color":"green","value":0.1},{"color":"yellow","value":0.3},{"color":"orange","value":0.5},{"color":"red","value":0.7},{"color":"purple","value":0.9}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":46},
|
|
"id":114,
|
|
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"pgbouncer:db:conn_usage{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Pgbouncer Conn 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":60,
|
|
"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 backend"} ,"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","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":"super-light-blue","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byName","options":"idle"} ,"properties":[{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.5)","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"active"} ,"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byName","options":"disabled"} ,"properties":[{"id":"color","value":{"fixedColor":"#fcdb72","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"idle in transaction (aborted)"},"properties":[{"id":"color","value":{"fixedColor":"#b783af","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byName","options":"idle in transaction"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":53},
|
|
"id":103,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"sum by (datname) (pg_activity_count{ins=\"$ins\"})","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Session 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":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"super-light-green"}]}
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":53},
|
|
"id":143,
|
|
"options":{"legend":{"calcs":["mean"],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"sum (increase(pg_db_sessions{ins=\"$ins\"}[1m]))","interval":"","legendFormat":"New Session in Last 1 minute","refId":"A"}],
|
|
"title":"New Sessions 1m (PG14)",
|
|
"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"}
|
|
},
|
|
"mappings":[],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"},{"color":"red","value":80}]}
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":60},
|
|
"id":106,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"pg_activity_count{ins=\"$ins\", state=\"active\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Active Backend",
|
|
"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":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"}
|
|
},
|
|
"mappings":[],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"red","value":1}]}
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":60},
|
|
"id":107,
|
|
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"sum by (datname) (pg_activity_count{ins=\"$ins\", state=~\"idle in.*\"})","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"iXact Backend",
|
|
"type":"timeseries"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":67},"id":145,"panels":[],"title":"Session Time","type":"row"},
|
|
{
|
|
"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"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"super-light-green"}]}
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":68},
|
|
"id":146,
|
|
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"increase(pg_db_sessions{ins=\"$ins\"}[1m])","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"New Sessions in 1m",
|
|
"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"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"super-light-green"}]}
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":68},
|
|
"id":147,
|
|
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[
|
|
{ "exemplar":false,"expr":"increase(pg_db_sessions_abandoned{ins=\"$ins\"}[1m])", "interval":"","legendFormat":"[Abandoned] : {{ datname }}","refId":"A" },{ "exemplar":false,"expr":"increase(pg_db_sessions_fatal{ins=\"$ins\"}[1m])" ,"hide":false,"interval":"","legendFormat":"[Fatal] : {{ datname }}" ,"refId":"B" },
|
|
{ "exemplar":false,"expr":"increase(pg_db_sessions_killed{ins=\"$ins\"}[1m])" ,"hide":false,"interval":"","legendFormat":"[Killed] : {{ datname }}" ,"refId":"C" }
|
|
],
|
|
"title":"Sessions Failure in 1m",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Time spent by database sessions 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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"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-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":8,"x":0,"y":75},
|
|
"id":148,
|
|
"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"},"exemplar":false,"expr":"rate(pg_db_session_time{ins=\"$ins\"}[1m])","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Session Time",
|
|
"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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"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-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":8,"x":8,"y":75},
|
|
"id":151,
|
|
"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"},"exemplar":false,"expr":"rate(pg_db_active_time{ins=\"$ins\"}[1m])","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Active Time",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Time spent idling while in a transaction 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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"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-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":8,"x":16,"y":75},
|
|
"id":152,
|
|
"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"},"exemplar":false,"expr":"rate(pg_db_ixact_time{ins=\"$ins\"}[1m])","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Idle in Xact Time",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Time spent by database sessions in this database",
|
|
"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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"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-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[{"matcher":{"id":"byName","options":"1"},"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}},{"id":"custom.stacking","value":{"group":"A","mode":"none"}},{"id":"custom.lineWidth","value":1},{"id":"custom.fillOpacity","value":0}]}]
|
|
},
|
|
"gridPos":{"h":7,"w":8,"x":0,"y":82},
|
|
"id":153,
|
|
"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"},"exemplar":false,"expr":"rate(pg_db_session_time{ins=\"$ins\"}[1m]) / on(ins) group_left() pg:ins:num_backends{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"},{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"1","hide":false,"interval":"","legendFormat":"1","refId":"B"}],
|
|
"title":"Session Time (avg by backend)",
|
|
"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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"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-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":8,"x":8,"y":82},
|
|
"id":154,
|
|
"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"},"exemplar":false,"expr":"rate(pg_db_active_time{ins=\"$ins\"}[1m]) / on(ins) group_left() pg:ins:num_backends{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Active Time (avg by backend)",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Time spent idling while in a transaction 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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"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-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":8,"x":16,"y":82},
|
|
"id":155,
|
|
"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"},"exemplar":false,"expr":"rate(pg_db_ixact_time{ins=\"$ins\"}[1m]) / on(ins) group_left() pg:ins:num_backends{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Idle in Xact Time (avg by backend)",
|
|
"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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"links":[{"title":"PGSQL Database for ${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${__field.labels.datname}&${__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":7,"w":8,"x":0,"y":89},
|
|
"id":157,
|
|
"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"},"exemplar":false,"expr":"rate(pg_db_active_time{ins=\"$ins\"}[1m]) / on(ins) group_left() sum by (ins)(rate(node_cpu_seconds_total{ins=\"$ins\"}[1m]))","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Active Ratio (of CPU Time)",
|
|
"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":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"links":[{"title":"PGSQL Database for ${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${__field.labels.datname}&${__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":7,"w":8,"x":8,"y":89},
|
|
"id":156,
|
|
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"rate(pg_db_active_time{ins=\"$ins\"}[1m]) / rate(pg_db_session_time{ins=\"$ins\"}[1m])","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Active Ratio (of Session Time)",
|
|
"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",
|
|
"axisSoftMax":0.2,
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":47,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"links":[{"title":"PGSQL Database for ${__field.labels.datname}","url":"/d/pgsql-database?var-ins=${ins}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"color":"orange","value":0.01},{"color":"red","value":0.1}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":8,"x":16,"y":89},
|
|
"id":158,
|
|
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
|
|
"pluginVersion":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"rate(pg_db_ixact_time{ins=\"$ins\"}[1m]) / rate(pg_db_session_time{ins=\"$ins\"}[1m])","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Idle in Xact Ratio (of Session Time)",
|
|
"type":"timeseries"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":96},"id":121,"panels":[],"title":"Pgbouncer","type":"row"},
|
|
{
|
|
"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"},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}},
|
|
"overrides":[
|
|
{"matcher":{"id":"byRegexp","options":"/Pool.*/"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f"},{"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"},{"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"},{"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"},{"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":24,"x":0,"y":97},
|
|
"id":161,
|
|
"options":{"cellHeight":"sm","footer":{"countRows":false,"fields":"","reducer":["sum"],"show":false},"showHeader":true,"sortBy":[{"desc":false,"displayName":"Database"}]},
|
|
"pluginVersion":"11.6.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":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}},"overrides":[{"matcher":{"id":"byName","options":"Conn Usage"},"properties":[{"id":"unit","value":"percentunit"}]}]},
|
|
"gridPos":{"h":3,"w":24,"x":0,"y":104},
|
|
"id":132,
|
|
"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":"11.6.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" }
|
|
],
|
|
"title":"",
|
|
"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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"decimals":1,
|
|
"mappings":[],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f"},{"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":107},
|
|
"id":125,
|
|
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
|
|
},
|
|
"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":"#3e668f","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byName","options":"Clients"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":107},
|
|
"id":163,
|
|
"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":"-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"},
|
|
"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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green"},{"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":0,"y":114},
|
|
"id":126,
|
|
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
|
|
"pluginVersion":"11.6.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"},
|
|
"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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
|
|
},
|
|
"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":114},
|
|
"id":162,
|
|
"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":"pgbouncer_stat_avg_server_assignment_count{ins=\"$ins\"}","interval":"","legendFormat":"{{ datname }}","range":true,"refId":"A"}],
|
|
"title":"Pgbouncer 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",
|
|
"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":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]}
|
|
},
|
|
"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":121},
|
|
"id":102,
|
|
"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":"pgbouncer:ins:active_servers{ins=\"$ins\"}", "interval":"","legendFormat":"Active","range":true,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"pgbouncer:ins:used_servers{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Used" , "refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"pgbouncer:ins:idle_servers{ins=\"$ins\"}" ,"hide":false,"interval":"","legendFormat":"Idle" , "refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"pgbouncer:ins:tested_servers{ins=\"$ins\"}","hide":false,"interval":"","legendFormat":"Tested", "refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green"}]}
|
|
},
|
|
"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":121},
|
|
"id":123,
|
|
"options":{"legend":{"calcs":["max"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
|
|
},
|
|
"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":128},
|
|
"id":140,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
|
|
},
|
|
"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":128},
|
|
"id":141,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.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":135},"id":130,"panels":[],"title":"Pool","type":"row"},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}},
|
|
"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":136},
|
|
"id":139,
|
|
"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":"11.6.0",
|
|
"targets":[{"exemplar":false,"expr":"pgbouncer_pool_active_clients{ins=\"$ins\"}","interval":"","legendFormat":"[{{ pool_mode }}]] {{ user }}@{{ datname }}","refId":"A"}],
|
|
"title":"",
|
|
"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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
|
|
},
|
|
"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":136},
|
|
"id":128,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
|
|
},
|
|
"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":143},
|
|
"id":124,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.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",
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc"}]}
|
|
},
|
|
"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":143},
|
|
"id":127,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"11.6.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"
|
|
}
|
|
],
|
|
"preload":false,
|
|
"refresh":"",
|
|
"schemaVersion":41,
|
|
"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 Session",
|
|
"uid":"pgsql-session",
|
|
"version":1
|
|
} |