2544 lines
227 KiB
JSON
2544 lines
227 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 Cluster Dashboard",
|
|
"editable":true,
|
|
"fiscalYearStartMonth":0,
|
|
"graphTooltip":0,
|
|
"id":null,
|
|
"license":"https://pigsty.io/docs/about/license/",
|
|
"links":[
|
|
{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Overview"],"targetBlank":false,"title":"Overview","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Cluster"] ,"targetBlank":false,"title":"Cluster" ,"tooltip":"","type":"dashboards","url":"" },
|
|
{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Instance"],"targetBlank":false,"title":"Instance","tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"external link","includeVars":true,"keepTime":true,"tags":["Pigsty","PGSQL","Database"],"targetBlank":false,"title":"Database","tooltip":"","type":"dashboards","url":"" }
|
|
],
|
|
"panels":[
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":163,"panels":[],"title":"Overview","type":"row"},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"links":[{"title":"PGSQL Overview","url":"/d/pgsql-overview?${__url_time_range}"}],"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},
|
|
"overrides":[
|
|
{"matcher":{"id":"byName","options":"Leader"},"properties":[{"id":"links","value":[{"title":"PGRDS Leader : ${primary}","url":"/d/pgrds-instance?var-ins=${primary}&${__url_time_range}"}]}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Kernel"},
|
|
"properties":[
|
|
{
|
|
"id":"mappings",
|
|
"value":[
|
|
{ "options":{"pattern":".*Percona.*","result":{"color":"dark-orange","index":0,"text":"Percona"}} ,"type":"regex" },{ "options":{"pattern":".*wiltondb.*","result":{"color":"#d82024e3","index":1,"text":"Babelfish"}},"type":"regex" },{ "options":{"pattern":".*PolarDB.*","result":{"color":"#f25009","index":2,"text":"PolarDB"}} ,"type":"regex" },
|
|
{ "options":{"pattern":".*IvorySQL.*","result":{"color":"#ee9832","index":3,"text":"IvorySQL"}} ,"type":"regex" },{ "options":{"pattern":"PostgreSQL.*","result":{"color":"#3e668f","index":4,"text":"PostgreSQL"}} ,"type":"regex" },{ "options":{"pattern":"openHalo.*","result":{"color":"#ba5bb8","index":5,"text":"OpenHalo"}} ,"type":"regex" },
|
|
{ "options":{"pattern":"OrioleDB.*","result":{"color":"#1f4085","index":6,"text":"OrioleDB"}} ,"type":"regex" }
|
|
]
|
|
}
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos":{"h":3,"w":3,"x":0,"y":1},
|
|
"id":182,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":16},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_meta_info{ins=\"$primary\"}","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"__auto","queryType":"measurements","refId":"A"}],
|
|
"transformations":[
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{"Time":true,"Value":true,"__name__":true,"cls":true,"cluster_id":true,"cluster_name":true,"conf_path":true,"data_dir":true,"encoding":true,"extensions":true,"hba_path":true,"ins":true,"instance":true,"ip":true,"job":true,"listen_port":true,"primary_conninfo":true,"ver_num":false,"ver_str":false,"version":true,"wal_level":true},
|
|
"includeByName":{},
|
|
"indexByName":{"Time":3,"Value":10,"__name__":4,"cls":5,"cluster_id":9,"cluster_name":14,"conf_path":15,"data_dir":16,"extensions":17,"hba_path":18,"ins":6,"instance":13,"ip":11,"job":7,"listen_port":12,"ver_num":1,"ver_str":0,"version":2,"wal_level":8},
|
|
"renameByName":{"cls":"Cluster","cluster_id":"Cluster ID","ins":"Leader","ip":"Host","listen_port":"Port","ver_num":"Version","ver_str":"Kernel","version":"Version","wal_level":"WAL Level"}
|
|
}
|
|
}
|
|
],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},
|
|
"description":"",
|
|
"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},"overrides":[{"matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"Node Cluster : ${node_cls}","url":"/d/node-cluster?var-cls=${node_cls}&${__url_time_range}"}]}]}]},
|
|
"gridPos":{"h":3,"w":6,"x":3,"y":1},
|
|
"id":183,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{},"textMode":"value","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"marcusolsson-static-datasource","uid":"ds-static"},"frame":{"fields":[{"config":{},"name":"Cluster","type":"string","values":["${cls}"]}],"meta":{},"name":""},"hide":false,"refId":"B"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"All instances among pgsql cluster ${cls}\n\nInstance: Goto PGSQL Instance\n\nIP: Goto PGSQL Node\n\nStatus: Goto PGSQL Service\n\nLoad: max(cpu,postgres,pgbouncer)\n\nSpace: Disk space usage max(all device)\n\nProxy: session number, Goto Haproxy Admin Page",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"max":1.2,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
|
|
"overrides":[
|
|
{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance ${__data.fields.Instance}","url":"/d/pgsql-instance?var-ins=${__data.fields.Instance}&${__url_time_range}"}]},{"id":"custom.width"}]},
|
|
{"matcher":{"id":"byName","options":"IP"},"properties":[{"id":"custom.width","value":110},{"id":"links","value":[{"title":"Node Instance : ${__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":0,"text":"primary"},"1":{"color":"#346f36cc","index":1,"text":"replica"}},"type":"value"}] },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} },{ "id":"links" ,"value":[{"title":"PGSQL Service for ${cls}-${__data.fields.Role}","url":"/d/pgsql-service?var-svc=${cls}-${__data.fields.Role}&${__url_time_range}"}] }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Load"},
|
|
"properties":[
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
|
|
{ "id":"color" ,"value":{"mode":"thresholds"} },
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"custom.width" ,"value":120 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]} },
|
|
{ "id":"decimals" ,"value":1 },
|
|
{ "id":"mappings" ,"value":[{"options":{"-1":{"color":"transparent","index":0,"text":"N/A"}},"type":"value"}] }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"Cluster"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster for ${__data.fields.Cluster}","url":"/d/pgsql-cluster?var-cls=${__data.fields.Cluster}&${__url_time_range}"}]}]},
|
|
{"matcher":{"id":"byName","options":"TPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{"matcher":{"id":"byName","options":"QPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"DB Conn"},
|
|
"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#EAB839","value":20},{"color":"#EF843C","value":40},{"color":"#E24D42","value":80},{"color":"#b783af","value":100},{"color":"text","value":400}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"RT"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"unit" ,"value":"s" },
|
|
{ "id":"mappings" ,"value":[{"options":{"match":"nan","result":{"index":1,"text":"-"}},"type":"special"}] },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]} },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"LB Conn"},"properties":[{"id":"custom.width","value":72},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":1000},{"color":"#f79f64","value":2000},{"color":"red","value":3000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{"matcher":{"id":"byName","options":"Queue"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{"matcher":{"id":"byName","options":"HAProxy"},"properties":[{"id":"links","value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}"}]}]},
|
|
{"matcher":{"id":"byName","options":"Up"},"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Dead"},"1":{"color":"#346f36cc","index":1,"text":"Alive"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}}]}
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":11,"x":9,"y":1},
|
|
"id":155,
|
|
"links":[{"title":"PGSQL Instance : ${primary}","url":"/d/pgsql-instance?var-ins=${primary}&${__url_time_range}"}],
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Instance"}]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (up{job=\"pgsql\", cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (pg:ins:load1{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (ins) (pg:ins:xact_total_rate1m{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (pg_in_recovery{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (ins) (pg:ins:num_backends{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (ins) (pgbouncer:ins:xact_rt_1m{cls=\"$cls\"})" ,"format":"table","hide":true ,"instant":true,"interval":"","legendFormat":"","refId":"F" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (ins,instance) (haproxy_backend_current_sessions{cls=\"$cls\", proxy!=\"stats\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"G" }
|
|
],
|
|
"transformations":[
|
|
{"id":"seriesToColumns","options":{"byField":"ins"}},
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{
|
|
"Time":true,
|
|
"Time 1":true,
|
|
"Time 10":true,
|
|
"Time 2":true,
|
|
"Time 3":true,
|
|
"Time 4":true,
|
|
"Time 6":true,
|
|
"Time 8":true,
|
|
"Time 9":true,
|
|
"Value #A":false,
|
|
"Value #B":false,
|
|
"Value #H":false,
|
|
"__name__":true,
|
|
"__name__ 1":true,
|
|
"__name__ 2":true,
|
|
"__name__ 3":true,
|
|
"__name__ 5":true,
|
|
"__name__ 7":true,
|
|
"cls":true,
|
|
"cls 1":true,
|
|
"cls 2":true,
|
|
"cls 3":true,
|
|
"cls 4":true,
|
|
"cls 5":true,
|
|
"cls 6":true,
|
|
"cls 7":true,
|
|
"instance":false,
|
|
"instance 1":true,
|
|
"instance 2":false,
|
|
"instance 3":true,
|
|
"instance 4":true,
|
|
"instance 5":true,
|
|
"instance 6":true,
|
|
"ip 2":true,
|
|
"ip 3":true,
|
|
"ip 4":true,
|
|
"ip 5":true,
|
|
"ip 6":true,
|
|
"ip 7":true,
|
|
"job":true,
|
|
"job 1":true,
|
|
"job 2":true,
|
|
"job 3":true,
|
|
"job 4":true,
|
|
"job 5":true,
|
|
"job 6":true,
|
|
"job 7":true
|
|
},
|
|
"indexByName":{"Time 1":9,"Time 2":10,"Time 3":11,"Time 4":12,"Time 5":13,"Time 6":15,"Value #A":0,"Value #B":4,"Value #C":5,"Value #D":1,"Value #E":7,"Value #G":6,"ins":2,"instance":8,"ip 1":3,"ip 2":14},
|
|
"renameByName":{"Time 4":"","Value #A":"Up","Value #B":"Load","Value #C":"TPS","Value #D":"Role","Value #E":"DB Conn","Value #F":"RT","Value #G":"LB Conn","Value #H":"LB","Value #I":"QPS","Value #J":"LB Clients","Value #K":"Lag","cls 1":"","cls 2":"","ins":"Instance","instance":"HAProxy","instance 2":"","ip":"IP","ip 1":"IP"}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"mode":"gradient","type":"color-background"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
|
|
"overrides":[
|
|
{
|
|
"matcher":{"id":"byName","options":"Database"},
|
|
"properties":[
|
|
{ "id":"links" ,"value":[{"title":"PGSQL Cluster Database : ${cls}.${__data.fields.Database}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__data.fields.Database}&${__url_time_range}"}] },
|
|
{ "id":"mappings" ,"value":[{"options":{"postgres":{"color":"#808080","index":2},"template0":{"color":"#c0c0c0e0","index":0},"template1":{"color":"#a8a8a8e0","index":1}},"type":"value"}] },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
|
|
{ "id":"color" ,"value":{"fixedColor":"#3e668f","mode":"fixed"} },
|
|
{ "id":"filterable" },
|
|
{ "id":"custom.minWidth" ,"value":120 }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"OID"},
|
|
"properties":[
|
|
{ "id":"links" ,"value":[{"title":"PGCAT Database : ${primary}.${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${primary}.${__data.fields.Database}"}] },{ "id":"mappings" ,"value":[{"options":{"from":0,"result":{"color":"#bfbfbf4d","index":0},"to":10},"type":"range"}] },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} },{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]} },
|
|
{ "id":"custom.minWidth" ,"value":80 },{ "id":"custom.width" ,"value":80 }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":4,"x":20,"y":1},
|
|
"id":177,
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"OID"}]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (datname) (pg_db_datid{cls=\"$cls\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"OID","refId":"O"}],
|
|
"transformations":[
|
|
{"id":"seriesToColumns","options":{"byField":"datname"}},
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{"Time":true,"Time 1":true,"Time 10":true,"Time 11":true,"Time 12":true,"Time 13":true,"Time 14":true,"Time 15":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"Value #G":false,"Value #H":false,"host":true},
|
|
"indexByName":{
|
|
"Time 1":17,
|
|
"Time 10":26,
|
|
"Time 11":27,
|
|
"Time 12":28,
|
|
"Time 13":29,
|
|
"Time 14":30,
|
|
"Time 15":31,
|
|
"Time 2":18,
|
|
"Time 3":19,
|
|
"Time 4":20,
|
|
"Time 5":21,
|
|
"Time 6":22,
|
|
"Time 7":23,
|
|
"Time 8":24,
|
|
"Time 9":25,
|
|
"Value #A":2,
|
|
"Value #B":3,
|
|
"Value #C":15,
|
|
"Value #D":4,
|
|
"Value #E":5,
|
|
"Value #F":11,
|
|
"Value #G":6,
|
|
"Value #H":10,
|
|
"Value #I":13,
|
|
"Value #J":14,
|
|
"Value #K":12,
|
|
"Value #L":9,
|
|
"Value #M":8,
|
|
"Value #N":7,
|
|
"Value #O":1,
|
|
"datname":0,
|
|
"host":16
|
|
},
|
|
"renameByName":{"Time 1":"","Time 7":"","Value":"OID","Value #A":"Size","Value #B":"Age","Value #C":"T","Value #D":"Backend","Value #E":"TPS","Value #F":"ConnLimit","Value #G":"RT","Value #H":"Conn%","Value #I":"D","Value #J":"P","Value #K":"PoolSize","Value #L":"Load","Value #M":"Client","Value #N":"Server","Value #O":"OID","datname":"Database","host":"Target","real_datname":"Datname"}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byRegexp","options":"/Mem|Disk|Data/"},"properties":[{"id":"unit","value":"bytes"}] },
|
|
{ "matcher":{"id":"byName","options":"Instance"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Instance","url":"/d/pgsql-instance?${__url_time_range}"}]},{"id":"unit","value":"short"},{"id":"decimals","value":0}] },
|
|
{ "matcher":{"id":"byName","options":"Service"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Service","url":"/d/pgsql-service?${__url_time_range}"}]},{"id":"decimals","value":0}] },
|
|
{ "matcher":{"id":"byName","options":"Node"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Node","url":"/d/node-instance?${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byName","options":"Database"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Database","url":"/d/pgsql-database?${__url_time_range}"}]},{"id":"unit","value":"short"},{"id":"decimals","value":0}] },
|
|
{ "matcher":{"id":"byName","options":"Mem"} ,"properties":[{"id":"decimals","value":1}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":3,"x":0,"y":4},
|
|
"id":148,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":12},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(pg_up{cls=\"$cls\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"Instance","queryType":"measurements","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(count by (proxy) (haproxy_server_status{proxy=~\"$cls-.*\"}))" ,"hide":false,"instant":true,"interval":"","legendFormat":"Service" ,"queryType":"measurements","refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(max by (cls,datname) (pg_db_age{cls=\"$cls\"}))" ,"hide":false,"instant":true,"interval":"","legendFormat":"Database","queryType":"measurements","refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(group by (ins) (haproxy_backend_current_sessions{cls='$cls'}))","hide":false,"instant":true,"interval":"","legendFormat":"Proxy" ,"queryType":"measurements","refId":"H" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"count(count by (ip) (pg_up{cls=\"$cls\"}))" , "instant":true,"interval":"","legendFormat":"Node" ,"queryType":"measurements","refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum(pg:cls:cpu_count{cls=\"$cls\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"Core" ,"queryType":"measurements","refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum(node_memory_MemTotal_bytes{ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"Mem" ,"queryType":"measurements","refId":"F" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum(node:fs:size_bytes{ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"Disk" ,"queryType":"measurements","refId":"G" }
|
|
],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Blue = PostgreSQL\n\nGreen = Pgbouncer\n\nYellow = Agent (Patroni / PG Exporters)",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"links":[],"mappings":[{"options":{"match":"null+nan","result":{"index":0,"text":"No Instances"}},"type":"special"}],"max":1.1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#aaaaaa","value":1}]}},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#3e668f","value":1}]}},{"id":"links","value":[{"title":"PGSQL Primary : ${primary}","url":"/d/pgsql-instance?var-ins=${primary}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#346f36cc","value":1}]}},{"id":"links","value":[{"title":"PGSQL Pgbouncer : ${primary}","url":"/d/pgsql-pgbouncer?var-ins=${primary}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#5b9cd5","value":1}]}},{"id":"links","value":[{"title":"PGSQL Patroni : ${cls}","url":"/d/pgsql-patroni?var-cls=${cls}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"D"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#b783af","value":1}]}},{"id":"links","value":[{"title":"PGSQL Exporter : ${primary}","url":"/d/pgsql-exporter?var-ins=${primary}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"E"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#7771a4","value":1}]}},{"id":"links","value":[{"title":"PGSQL Exporter : ${primary}","url":"/d/pgsql-exporter?var-ins=${primary}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"F"},"properties":[{"id":"links","value":[{"title":"Node Cluster : ${cls}","url":"/d/node-cluster?var-cls=${cls}&${__url_time_range}"}]},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#e6b03ee6","value":1}]}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"S"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#252f34","value":0},{"color":"#42606b","value":1}]}},{"id":"links","value":[{"title":"PGSQL Backup : ${__field.labels.cls}","url":"/d/pgsql-pitr?var-cls=${cls}&${__url_time_range}"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":3,"x":3,"y":4},
|
|
"id":175,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":12},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":" sum by (cls) (pg_up{cls=\"$cls\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"postgres" ,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":" sum by (cls) (pgbouncer_up{cls=\"$cls\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"pgbouncer" ,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":" sum by (cls) (patroni_up{cls=\"$cls\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"patroni" ,"refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":" sum by (cls) (pg_exporter_agent_up{cls=\"$cls\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"pg_exporter" ,"refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":" sum by (cls) (pgbouncer_exporter_agent_up{cls=\"$cls\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"pgb_exporter","refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":" sum by (cls) (pgbackrest_exporter_agent_up{cls=\"$cls\"})","hide":false,"instant":true,"interval":"","legendFormat":"pgbackrest" ,"refId":"S" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":" sum(node_up{ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"node" ,"refId":"F" }
|
|
],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Ping RT",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"},{"options":{"from":7,"result":{"color":"text","index":1,"text":"\u221e"},"to":9999999},"type":"range"}],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.0002},{"color":"#f79f64","value":0.001},{"color":"red","value":0.01},{"color":"text","value":7}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"title":"Node Instance : ${__field.labels.ip}","url":"/d/node-instance?var-id=${__field.labels.ip}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"Node VIP : ${__field.labels.vip}","url":"/d/node-vip?var-vip=${__field.labels.vip}&${__url_time_range}"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":3,"x":6,"y":4},
|
|
"id":178,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"avg by (job,vip) (probe_duration_seconds{ip=~\"$members\", job=~\".*vip\"})","hide":false,"instant":true,"interval":"","legendFormat":"{{ vip }} @ {{ job }}","refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"probe_duration_seconds{ip=~\"$members\", job=\"ping\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ip }} : {{ ins }}" ,"refId":"A" }
|
|
],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"custom":{"axisPlacement":"auto","fillOpacity":60,"hideFrom":{"legend":false,"tooltip":false,"viz":false},"insertNulls":false,"lineWidth":0,"spanNulls":false},
|
|
"links":[{"title":"PGSQL Service : ${__field.labels.proxy}","url":"/d/pgsql-service?var-svc=${__field.labels.proxy}&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"#808080","index":1}},"type":"special"}],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#cc4637d9","value":0},{"color":"#346f36cc","value":1}]}
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":4,"w":15,"x":9,"y":7},
|
|
"id":169,
|
|
"options":{"alignValue":"left","legend":{"displayMode":"list","placement":"bottom","showLegend":false},"mergeValues":true,"rowHeight":0.9,"showValue":"never","tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"sum by (cls,proxy) (haproxy_server_status{proxy=~\"$cls-.*\", state=\"UP\"}) > bool 0","instant":false,"legendFormat":"{{ proxy }}","range":true,"refId":"A"}],
|
|
"type":"state-timeline"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Instances among this cluster and their saturation (postgres or pgbouncer)",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"decimals":1,
|
|
"links":[{"title":"PGSQL Instance for ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}],
|
|
"mappings":[{"options":{"-1":{"color":"#696a6c99","index":0,"text":"N/A"}},"type":"value"}],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":10,"w":4,"x":0,"y":11},
|
|
"id":72,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:load1{cls=\"$cls\"}","hide":false,"instant":false,"interval":"","legendFormat":"{{ ins }}","range":true,"refId":"B"}],
|
|
"title":"Postgres",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Node of this cluster and their cpu usage.",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"decimals":1,
|
|
"links":[{"title":"PGSQL Node for ${__field.labels.ins}","url":"/d/node-instance?var-id=${__field.labels.ins}&${__url_time_range}"}],
|
|
"mappings":[{"options":{"-1":{"color":"#23529799","index":0,"text":"N/A"}},"type":"value"}],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":10,"w":4,"x":4,"y":11},
|
|
"id":126,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"node:ins:cpu_usage{ip=~\"$members\"}","interval":"","legendFormat":"{{ ip }}","range":true,"refId":"A"}],
|
|
"title":"Node",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Proxy backend session number among this cluster",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"decimals":0,
|
|
"links":[{"title":"PGSQL Proxy for ${__field.labels.ins}","url":"/d/pgsql-proxy?var-ins=${__field.labels.ins}&${__url_time_range}"}],
|
|
"mappings":[{"options":{"-1":{"color":"#23529799","index":0,"text":"N/A"}},"type":"value"}],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":1000},{"color":"#f79f64","value":2000},{"color":"red","value":3000}]},
|
|
"unit":"conn"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":10,"w":4,"x":8,"y":11},
|
|
"id":131,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (haproxy_backend_current_sessions{proxy=~'$cls.*'})","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
|
|
"title":"Proxy",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Load of different compoents.",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"decimals":1,
|
|
"links":[],
|
|
"mappings":[{"options":{"-1":{"color":"#808080","index":1,"text":"N/A"}},"type":"value"}],
|
|
"max":1.1,
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#EAB839","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byName","options":"Haproxy"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Service : ${cls}-primary","url":"/d/pgsql-service?var-svc=${cls}-primary&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byName","options":"Node"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Node for ${primary}","url":"/d/node-instance?var-ins=${primary}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byName","options":"Postgres"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Instance for ${cls} Leader","url":"/d/pgsql-instance?var-ins=${primary}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byName","options":"Pgbouncer"},"properties":[{"id":"links","value":[{"title":"PGSQL Pgbouncer for ${primary}","url":"/d/pgsql-pgbouncer?var-ins=${primary}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byName","options":"Exporter"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Exporter : ${primary}","url":"/d/pgsql-exporter?var-ins=${primary}&${__url_time_range}"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":10,"w":4,"x":12,"y":11},
|
|
"id":41,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"auto","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:cls:load1{cls=\"$cls\"}" , "interval":"","legendFormat":"Postgres" ,"range":true,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pgbouncer:cls:load1{cls=\"$cls\"}" ,"hide":false,"interval":"","legendFormat":"Pgbouncer","range":true,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(process_cpu_seconds_total{cls=\"$cls\"}[1m]))","hide":false,"interval":"","legendFormat":"Exporter" ,"range":true,"refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"avg by (cls) (haproxy:ins:usage{ip=~\"$members\"})" ,"hide":false,"interval":"","legendFormat":"Haproxy" ,"range":true,"refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"pg:cls:cpu_usage{cls=\"$cls\"}" ,"hide":false,"interval":"","legendFormat":"Node" , "refId":"C" }
|
|
],
|
|
"title":"Component",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Registered service among this cluster.\n\nClick goes to PGSQL Service Dashboard",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Service for ${__field.labels.proxy}","url":"/d/pgsql-service?var-svc=${__field.labels.proxy}&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"#818181bf","index":0,"text":"N/A"}},"type":"special"}],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#346f36cc","value":10},{"color":"#f79f64","value":1000},{"color":"red","value":3000},{"color":"#b783af","value":5000}]},
|
|
"unit":"c"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":10,"w":4,"x":16,"y":11},
|
|
"id":112,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sort_desc(sum by (proxy) (haproxy_backend_current_sessions{proxy=~'$cls-.*'}))","interval":"","legendFormat":"{{ proxy }}","range":true,"refId":"A"}],
|
|
"title":"Service",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"TPS of each database",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Databases : ${__field.labels.datname}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__field.labels.datname}&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"#808080","index":0,"text":"No Database"}},"type":"special"}],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":10},{"color":"#f79f64","value":20000},{"color":"red","value":40000},{"color":"#b783af","value":80000}]},
|
|
"unit":"reqps"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":10,"w":4,"x":20,"y":11},
|
|
"id":181,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (rate(pg_db_xact_total{cls=\"$cls\", datname!~'template\\\\d'}[1m]))","interval":"","legendFormat":"{{ proxy }}","range":true,"refId":"A"}],
|
|
"title":"Database",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"decimals":1,"links":[{"title":"PGSQL Activity : Pressure for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=104&${__url_time_range}"}],"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]},"unit":"none"},
|
|
"overrides":[
|
|
{
|
|
"matcher":{"id":"byName","options":"Commit"},
|
|
"properties":[{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":32},{"color":"#fcdb72","value":32000},{"color":"#f79f64","value":100000}]}},{"id":"links","value":[{"title":"PGSQL Activity : Pressure for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=104&${__url_time_range}"}]},{"id":"min","value":0}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Rollback"},
|
|
"properties":[{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":4},{"color":"red","value":8}]}},{"id":"links","value":[{"title":"PGSQL Activity : Rollback for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=106&${__url_time_range}"}]},{"id":"min","value":0}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"TPS"},
|
|
"properties":[{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":32},{"color":"#fcdb72","value":32000},{"color":"#f79f64","value":100000}]}},{"id":"links","value":[{"title":"PGSQL Activity : TPS for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=148&${__url_time_range}"}]}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"QPS"},
|
|
"properties":[{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":32},{"color":"#EAB839","value":32000},{"color":"#EF843C","value":100000}]}},{"id":"links","value":[{"title":"PGSQL Activity : QPS for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=112&${__url_time_range}"}]}]
|
|
}
|
|
]
|
|
},
|
|
"gridPos":{"h":3,"w":8,"x":0,"y":21},
|
|
"id":121,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum(rate(pg_db_xact_commit{cls=\"$cls\"}[1m]))\n# pg:cls:xact_commit_rate1m{cls=\"$cls\"}" , "interval":"","legendFormat":"Commit" ,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum(rate(pg_db_xact_rollback{cls=\"$cls\"}[1m]))\n# pg:cls:xact_commit_rate1m{cls=\"$cls\"}" ,"hide":false,"interval":"","legendFormat":"Rollback","refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum(rate(pgbouncer_stat_total_xact_count{cls=\"$cls\"}[1m])) \n# pgbouncer:cls:xact_rate1m{cls=\"$cls\"} " ,"hide":false,"interval":"","legendFormat":"TPS" ,"refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum(rate(pgbouncer_stat_total_query_count{cls=\"$cls\"}[1m])) \n# pgbouncer:cls:query_rate1m{cls=\"$cls\"} ","hide":false,"interval":"","legendFormat":"QPS" ,"refId":"D" }
|
|
],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Activity : Session for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=146&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#f79f64","value":2000}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":8,"y":21},
|
|
"id":64,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum by (cls) (pg_db_numbackends{cls=\"$cls\"})","interval":"","legendFormat":"Backend","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Activity : Pgbouncer Queue for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=145&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":10,"y":21},
|
|
"id":44,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum by (cls) (pgbouncer_pool_waiting_clients{cls=\"$cls\"})\n# pgbouncer:cls:waiting_clients{cls=\"$cls\"}","interval":"","legendFormat":"Queue","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Activity : RT for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&viewPanel=113&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":12,"y":21},
|
|
"id":59,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum(rate(pgbouncer_stat_total_query_time{cls=\"$cls\"}[1m])) / sum(rate(pgbouncer_stat_total_query_count{cls=\"$cls\"}[1m]))\n# pgbouncer:cls:query_rt_1m{cls=\"$cls\"}","interval":"","legendFormat":"Cluster RT","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Pgbouncer: ${primary}","url":"/d/pgsql-pgbouncer?var-ins=${primary}&viewPanel=68&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
|
|
"min":0,
|
|
"noValue":"\u2205",
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":14,"y":21},
|
|
"id":62,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"sum(rate(pgbouncer_stat_total_query_time{cls=\"$cls\", ins=\"$primary\"}[1m])) / sum(rate(pgbouncer_stat_total_query_count{cls=\"$cls\", ins=\"$primary\"}[1m]))\n# pgbouncer:ins:query_rt_1m{ins=\"$primary\"}","interval":"","legendFormat":"Primary RT","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Replication Detail in seconds for Cluster ${cls}","url":"/d/pgsql-replication?var-cls=${cls}&viewPanel=74&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"Lag(s) = \u2205"}},"type":"special"}],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":0.1},{"color":"#f79f64","value":1},{"color":"red","value":4},{"color":"#b783af","value":16},{"color":"text","value":64}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":16,"y":21},
|
|
"id":70,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"max(pg_repl_replay_lag{cls=\"$cls\", appname!~'walreceiver|pg_receivewal'})\n# pg:cls:lag_seconds{cls=\"$cls\"}","interval":"","legendFormat":"Lag (s)","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Replication lag in bytes for Cluster ${cls}","url":"/d/pgsql-replication?var-cls=${cls}&viewPanel=73&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"Lag(B) = \u2205"}},"type":"special"}],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1000},{"color":"#f79f64","value":100000},{"color":"red","value":1000000},{"color":"#b783af","value":10000000},{"color":"text","value":100000000}]},
|
|
"unit":"decbytes"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":18,"y":21},
|
|
"id":68,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"max(pg_repl_replay_diff{cls=\"$cls\", appname!~'walreceiver|pg_receivewal'})\n# pg:cls:lag_bytes{cls=\"$cls\"}","interval":"","legendFormat":"Lag (B)","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"decimals":2,
|
|
"links":[{"title":"PGSQL Persist : Age for ${cls}","url":"/d/pgsql-persist?var-ins=${primary}&viewPanel=228&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
|
|
"max":1,
|
|
"min":0,
|
|
"thresholds":{"mode":"percentage","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":2},{"color":"#f79f64","value":10},{"color":"red","value":30},{"color":"#b783af","value":90},{"color":"text","value":100}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":20,"y":21},
|
|
"id":63,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"max by (cls) (pg_db_age{cls=\"$cls\", datname!~\"template[0-9]\"}) / 2147483647\n# pg:cls:age{cls=\"$cls\"} / 2147483647","interval":"","legendFormat":"Age","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Node : Space for ${primary}","url":"/d/node-instance?var-ins=${primary}&viewPanel=199&${__url_time_range}"}],
|
|
"mappings":[{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"}],
|
|
"max":1,
|
|
"min":0,
|
|
"noValue":"\u2205",
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":0.8},{"color":"#f79f64","value":0.85},{"color":"red","value":0.9},{"color":"#b783af","value":0.95},{"color":"text","value":1}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":3,"w":2,"x":22,"y":21},
|
|
"id":49,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max(node:fs:space_usage{ip=~\"$members\"})","interval":"","legendFormat":"Space","range":true,"refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Overall pressure for this PostgreSQL Node and Instance. \nmax(node:ins:cpu_usage, pg:ins:load, pgbouncer:ins:load)",
|
|
"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":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineStyle":{"fill":"solid"},
|
|
"lineWidth":1,
|
|
"pointSize":3,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"links":[],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0},{"color":"red","value":0.7},{"color":"purple","value":1}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}},{"id":"custom.lineWidth","value":1},{"id":"links","value":[{"title":"PGSQL Cluster Primary Instance ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&var-cls=${cls}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byName","options":"cluster"},"properties":[{"id":"custom.drawStyle","value":"line"},{"id":"custom.fillOpacity","value":30},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.2)","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster follower instance ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&var-cls=${cls}&${__url_time_range}"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":12,"x":0,"y":24},
|
|
"id":75,
|
|
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:cls:load1{cls=\"$cls\"}" ,"hide":false,"interval":"","legendFormat":"cluster" ,"range":true,"refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:load1{cls=\"$cls\", ins=\"$primary\"}" , "interval":"","legendFormat":"{{ ins }} \u2b50\ufe0f","range":true,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:load1{cls=\"$cls\", ins!=\"$primary\"}","hide":false,"interval":"","legendFormat":"{{ ins }}" ,"range":true,"refId":"B" }
|
|
],
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Alerting event graph. Each stripe represent an alerting Event. Gray transparent stipe are pending alerts.",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"hidden",
|
|
"axisSoftMax":1.2,
|
|
"axisSoftMin":0,
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":98,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"stepBefore",
|
|
"lineWidth":0,
|
|
"pointSize":1,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"decimals":0,
|
|
"links":[
|
|
{ "targetBlank":true,"title":"AlertInfo ${__field.labels.alertname} on Cluster ${cls}","url":"/alertmgr/#/alerts?filter=%7Bcls%3D%22${cls}%22%2C%20alertname%3D%22${__field.labels.alertname}%22%7D" },
|
|
{ "targetBlank":true,"title":"Silence ${__field.labels.alertname} on Cluster ${cls}" ,"url":"/alertmgr/#/silences/new?filter=%7Bcls%3D%22${cls}%22%2C%20alertname%3D%22${__field.labels.alertname}%22%7D" },
|
|
{ "title":"PGSQL Instance for ${__field.labels.ins}" ,"url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}" },
|
|
{ "title":"PGSQL Node for ${__field.labels.ins}" ,"url":"/d/node-instance?var-ins=${__field.labels.ins}&${__url_time_range}" }
|
|
],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"custom.fillOpacity","value":66},{"id":"mappings","value":[{"options":{"1":{"index":0,"text":"Firing\ud83d\udd25"}},"type":"value"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"custom.fillOpacity","value":25},{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.5)","mode":"fixed"}},{"id":"mappings","value":[{"options":{"1":{"color":"gray","index":0,"text":"Pend\u23f0"}},"type":"value"}]}] },
|
|
{ "matcher":{"id":"byName","options":"Alert"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byType","options":"time"} ,"properties":[{"id":"custom.axisPlacement","value":"auto"}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":12,"x":12,"y":24},
|
|
"id":78,
|
|
"options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"ALERTS{cls=\"$cls\", alertstate=\"firing\"}" , "interval":"","legendFormat":"[{{ severity }}\ud83d\udd25] {{alertname}} @ {{ ins }}","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"ALERTS{cls=\"$cls\", alertstate=\"pending\"} ","hide":true ,"interval":"","legendFormat":"[{{ severity }}\u23f0] {{alertname}} @ {{ ins }}" ,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"0" ,"hide":false,"interval":"","legendFormat":"Alert" ,"refId":"C" }
|
|
],
|
|
"type":"timeseries"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":30},"id":159,"panels":[],"title":"Leadership","type":"row"},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"links":[{"title":"PGSQL Cluster Replication : ${cls}","url":"/d/pgsql-replication?var-cls=${cls}&viewPanel=56&${__url_time_range}"}],
|
|
"mappings":[{"options":{"1":{"color":"#3e668f","index":0,"text":"Leader"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"#cc4637d9","index":1,"text":"Loser"}},"type":"special"}],
|
|
"max":1,
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#cc4637d9","value":0},{"color":"#346f36cc","value":1}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":5,"w":6,"x":0,"y":31},
|
|
"id":123,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"valueSize":16},"textMode":"auto","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"pg:cls:leader{cls=\"$cls\"}","interval":"","legendFormat":"{{ ins }}","refId":"A"}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Leadership shows who is in charge of this cluster ${cls}",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"hidden",
|
|
"axisSoftMin":0,
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":57,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"stepBefore",
|
|
"lineWidth":0,
|
|
"pointSize":1,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"links":[{"title":"PGSQL Instance : ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"max":1,
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[{"matcher":{"id":"byType","options":"time"},"properties":[{"id":"custom.axisPlacement","value":"auto"}]}]
|
|
},
|
|
"gridPos":{"h":5,"w":6,"x":6,"y":31},
|
|
"id":158,
|
|
"links":[{"title":"PGSQL Replication : ${cls} ${__url_time_range}","url":"/d/pgsql-replication?var-cls=${cls}&${__url_time_range}"}],
|
|
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"(pg_in_recovery{cls=\"$cls\"} == 0) * 0 + 1","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
|
|
"title":"Leadership",
|
|
"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":25,
|
|
"gradientMode":"hue",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"stepBefore",
|
|
"lineWidth":1,
|
|
"pointSize":5,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"decimals":0,
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":5,"w":6,"x":12,"y":31},
|
|
"id":165,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"exemplar":false,"expr":"pg_timeline_id{cls=\"$cls\"}","interval":"","legendFormat":"{{ ins }}","refId":"A"}],
|
|
"title":"Timeline",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Haproxy will route $cls-primary traffic to which instance ?",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"bars",
|
|
"fillOpacity":64,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"stepBefore",
|
|
"lineWidth":0,
|
|
"pointSize":5,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":true,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"decimals":0,
|
|
"links":[{"title":"PGSQL Proxy for ${__field.labels.ins}","url":"/d/pgsql-proxy?var-ins=${__field.labels.ins}&${__url_time_range}"},{"title":"PGSQL Instance for ${__field.labels.server}","url":"/d/pgsql-instance?var-ins=${__field.labels.server}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":5,"w":6,"x":18,"y":31},
|
|
"id":161,
|
|
"options":{"legend":{"calcs":["lastNotNull"],"displayMode":"table","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (server) (haproxy_server_current_sessions{proxy=\"$cls-primary\"})","interval":"","legendFormat":"$cls-primary \u2794 {{ server }}","range":true,"refId":"A"}],
|
|
"title":"Traffic Routes (primary service instance)",
|
|
"type":"timeseries"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":36},"id":133,"panels":[],"title":"Member","type":"row"},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"",
|
|
"fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]},"unit":"string"},"overrides":[]},
|
|
"gridPos":{"h":1,"w":24,"x":0,"y":37},
|
|
"id":187,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":false},"showPercentChange":false,"text":{"titleSize":12,"valueSize":12},"textMode":"value","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_meta_info{cls=\"$cls\"}","format":"table","instant":true,"interval":"","legendFormat":"{{ ins }}","range":false,"refId":"A"}],
|
|
"transformations":[{"id":"filterFieldsByName","options":{"include":{"names":["ver_str"],"pattern":"ver_str"}}},{"id":"organize","options":{"excludeByName":{"ins":true},"includeByName":{},"indexByName":{},"renameByName":{"ins":"","ver_str":"Version"}}}],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"All nodes among cluster ${cls}",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"max":1.2,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
|
|
"overrides":[
|
|
{"matcher":{"id":"byName","options":"Hostname"},"properties":[{"id":"links","value":[{"title":"Node Instance: ${__data.fields.Hostname}","url":"/d/node-instance?var-id=${__data.fields.Hostname}&${__url_time_range}"}]},{"id":"custom.minWidth","value":180}]},
|
|
{"matcher":{"id":"byName","options":"IP"},"properties":[{"id":"custom.width","value":140},{"id":"links","value":[{"title":"Node Instance: ${__data.fields.IP}","url":"/d/node-instance?var-id=${__data.fields.IP}&${__url_time_range}"}]}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Core"},
|
|
"properties":[
|
|
{"id":"custom.width","value":40},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},
|
|
{
|
|
"id":"thresholds",
|
|
"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":1},{"color":"dark-blue","value":2},{"color":"super-light-green","value":4},{"color":"#346f36cc","value":8},{"color":"dark-green","value":16},{"color":"super-light-orange","value":32},{"color":"semi-dark-orange","value":48},{"color":"super-light-red","value":56},{"color":"semi-dark-red","value":64}]}
|
|
},
|
|
{"id":"mappings","value":[{"options":{"match":"null+nan","result":{"color":"transparent","index":0}},"type":"special"}]}
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"CPU%"},
|
|
"properties":[
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
|
|
{ "id":"color" ,"value":{"mode":"thresholds"} },
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"custom.width" ,"value":120 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]} },
|
|
{ "id":"decimals" ,"value":1 },
|
|
{ "id":"mappings" ,"value":[{"options":{"match":"null+nan","result":{"color":"transparent","index":1}},"type":"special"}] }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Mem"},
|
|
"properties":[
|
|
{
|
|
"id":"thresholds",
|
|
"value":{
|
|
"mode":"absolute",
|
|
"steps":[{"color":"#b3b5b7","value":0},{"color":"super-light-blue","value":1},{"color":"#3275d9c4","value":2},{"color":"dark-blue","value":4},{"color":"#346f36cc","value":8},{"color":"#346f36cc","value":16},{"color":"dark-green","value":32},{"color":"#fcdb72","value":62},{"color":"super-light-orange","value":64},{"color":"#f79f64","value":128},{"color":"#e02f44bf","value":256},{"color":"red","value":512}]
|
|
}
|
|
},
|
|
{"id":"unit","value":"gbytes"},{"id":"custom.width","value":70},{"id":"decimals","value":0},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"mappings","value":[{"options":{"match":"null+nan","result":{"color":"transparent","index":0}},"type":"special"}]}
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Mem%"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":120 },
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#f79f64","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":"Space"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"unit" ,"value":"gbytes" },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"super-light-blue","value":0},{"color":"#3e668f","value":32},{"color":"super-light-green","value":256},{"color":"#346f36cc","value":512},{"color":"light-yellow","value":1024},{"color":"#f79f64","value":4096},{"color":"light-red","value":8192}]} },
|
|
{ "id":"decimals" ,"value":1 },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-background"} },
|
|
{ "id":"mappings" ,"value":[{"options":{"match":"null+nan","result":{"color":"transparent","index":1}},"type":"special"}] }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Space%"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":120 },
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"decimals" ,"value":1 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.05},{"color":"#EAB839","value":0.8},{"color":"#f79f64","value":0.85},{"color":"red","value":0.9},{"color":"#b783af","value":0.95},{"color":"text","value":0.99}]} },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"OS Release"},"properties":[{"id":"custom.minWidth","value":150}]},{"matcher":{"id":"byName","options":"Targets"},"properties":[{"id":"custom.width","value":66}]},
|
|
{"matcher":{"id":"byName","options":"Cluster"},"properties":[{"id":"links","value":[{"title":"Node Cluster : ${__data.fields.Cluster}","url":"/d/node-cluster?var-cls=${__data.fields.Cluster}&${__url_time_range}"}]}]},
|
|
{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"Node Instance: ${__data.fields.Instance}","url":"/d/node-instance?var-ins=${__data.fields.Instance}&${__url_time_range}"}]}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Ping"},
|
|
"properties":[
|
|
{ "id":"unit" ,"value":"s" },
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.0002},{"color":"#fcdb72","value":0.0005},{"color":"#f79f64","value":0.001},{"color":"red","value":0.01},{"color":"text","value":1}]} },
|
|
{ "id":"mappings" ,"value":[{"options":{"from":7,"result":{"color":"text","index":0,"text":"\u221e"},"to":9999999},"type":"range"}] },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-background"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"HAProxy"},"properties":[{"id":"custom.width","value":140},{"id":"links","value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}"}]}]},{"matcher":{"id":"byName","options":"Conn"},"properties":[{"id":"custom.width","value":60}]},
|
|
{"matcher":{"id":"byName","options":"Alive"},"properties":[{"id":"custom.width","value":100},{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Down"},"1":{"color":"#346f36cc","index":1,"text":"UP"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}},{"id":"custom.width","value":60}]}
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":19,"x":0,"y":38},
|
|
"id":179,
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"node_up{ip=~\"$members\"}" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"L" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"group without(ins,cls,instance) (node_uname_info{ip=~\"$members\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ip) (node:ins:cpu_usage{ip=~\"$members\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ip) (node:ins:mem_usage{ip=~\"$members\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ip,instance) (node:ins:space_usage_max{ip=~\"$members\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ip) (node:ins:cpu_count{ip=~\"$members\"}) " ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ip) (node_memory_MemTotal_bytes{ip=~\"$members\"}) / 1073741824","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"F" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(node:fs:size_bytes{ip=~\"$members\"}) by (ip) / 1073741824" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"G" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count by (ip) (up{ip=~\"$members\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"H" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ip) (probe_duration_seconds{ip=~\"$members\", job=\"ping\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"I" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ip) (haproxy_backend_current_sessions{ip=~\"$members\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"J" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ip) (node_up{ip=~\"$members\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"K" }
|
|
],
|
|
"transformations":[
|
|
{"id":"seriesToColumns","options":{"byField":"ip"}},
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{
|
|
"Time":true,
|
|
"Time 1":true,
|
|
"Time 10":true,
|
|
"Time 11":true,
|
|
"Time 2":true,
|
|
"Time 3":true,
|
|
"Time 4":true,
|
|
"Time 5":true,
|
|
"Time 6":true,
|
|
"Time 7":true,
|
|
"Time 8":true,
|
|
"Time 9":true,
|
|
"Value #A":true,
|
|
"Value #B":false,
|
|
"Value #J":false,
|
|
"Value #L":true,
|
|
"__name__":true,
|
|
"__name__ 1":true,
|
|
"__name__ 2":true,
|
|
"__name__ 3":true,
|
|
"cls":true,
|
|
"cls 1":true,
|
|
"cls 2":false,
|
|
"cls 3":true,
|
|
"domainname":true,
|
|
"instance":false,
|
|
"instance 1":false,
|
|
"instance 2":true,
|
|
"instance 3":true,
|
|
"ip 2":true,
|
|
"ip 3":true,
|
|
"job":true,
|
|
"job 1":true,
|
|
"job 2":true,
|
|
"job 3":true,
|
|
"machine":true,
|
|
"maxmemory_policy":true,
|
|
"nodename":false,
|
|
"os":true,
|
|
"process_id":true,
|
|
"redis_build_id":true,
|
|
"release":false,
|
|
"run_id":true,
|
|
"sysname":true,
|
|
"tcp_port":true,
|
|
"version":true
|
|
},
|
|
"indexByName":{
|
|
"Time 1":16,
|
|
"Time 10":25,
|
|
"Time 11":26,
|
|
"Time 12":30,
|
|
"Time 2":17,
|
|
"Time 3":18,
|
|
"Time 4":19,
|
|
"Time 5":20,
|
|
"Time 6":21,
|
|
"Time 7":22,
|
|
"Time 8":23,
|
|
"Time 9":24,
|
|
"Value #A":36,
|
|
"Value #B":8,
|
|
"Value #C":10,
|
|
"Value #D":12,
|
|
"Value #E":7,
|
|
"Value #F":9,
|
|
"Value #G":11,
|
|
"Value #H":6,
|
|
"Value #I":13,
|
|
"Value #J":14,
|
|
"Value #K":0,
|
|
"Value #L":28,
|
|
"__name__":27,
|
|
"cls":2,
|
|
"domainname":32,
|
|
"ins":3,
|
|
"instance 1":4,
|
|
"instance 2":29,
|
|
"ip":1,
|
|
"job 1":31,
|
|
"job 2":33,
|
|
"machine":34,
|
|
"nodename":5,
|
|
"release":15,
|
|
"sysname":35,
|
|
"version":37
|
|
},
|
|
"renameByName":{
|
|
"Time 4":"",
|
|
"Value #A":"",
|
|
"Value #B":"CPU%",
|
|
"Value #C":"Mem%",
|
|
"Value #D":"Space%",
|
|
"Value #E":"Core",
|
|
"Value #F":"Mem",
|
|
"Value #G":"Space",
|
|
"Value #H":"Targets",
|
|
"Value #I":"Ping",
|
|
"Value #J":"Conn",
|
|
"Value #K":"Alive",
|
|
"cls":"Cluster",
|
|
"cls 1":"Cluster",
|
|
"cls 2":"Cluster",
|
|
"ins":"Instance",
|
|
"ins 2":"Instance",
|
|
"instance":"HAProxy",
|
|
"instance 1":"HAProxy",
|
|
"instance 3":"",
|
|
"ip":"IP",
|
|
"ip 1":"IP",
|
|
"job 1":"",
|
|
"nodename":"Hostname",
|
|
"redis_mode":"Mode",
|
|
"redis_version":"Version",
|
|
"release":"OS Release",
|
|
"role":"Role"
|
|
}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Blue = PostgreSQL\n\nGreen = Pgbouncer\n\nYellow = Agent (Patroni / PG Exporters)",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"links":[],"mappings":[{"options":{"0":{"color":"text","index":1,"text":"Dead"},"1":{"index":2,"text":"Up"}},"type":"value"},{"options":{"match":"null+nan","result":{"index":0}},"type":"special"}],"max":1.1,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#aaaaaa","value":1}]}},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byFrameRefID","options":"A"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#3e668f","value":1}]}},{"id":"links","value":[{"title":"PGSQL Instance : ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#3d668fd6","value":1}]}},{"id":"links","value":[{"title":"PGSQL Pgbouncer : ${__field.labels.ins}","url":"/d/pgsql-pgbouncer?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"C"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#5b9cd5","value":1}]}},{"id":"links","value":[{"title":"PGSQL Patroni : ${cls}","url":"/d/pgsql-patroni?var-cls=${cls}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"D"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#b783af","value":1}]}},{"id":"links","value":[{"title":"PGSQL Exporter : ${__field.labels.ins}","url":"/d/pgsql-exporter?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"E"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#7771a4","value":1}]}},{"id":"links","value":[{"title":"PGSQL Exporter : ${__field.labels.ins}","url":"/d/pgsql-exporter?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"F"} ,"properties":[{"id":"links","value":[{"title":"Node Instance : ${__field.labels.ins}","url":"/d/node-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#e6b03ee6","value":1}]}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"G"} ,"properties":[{"id":"links","value":[{"title":"Node HAProxy : ${__field.labels.ins}","url":"/d/node-haproxy?var-ins=${__field.labels.ins}&${__url_time_range}"}]},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#f79f64","value":1}]}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"H"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#1b6eb6d1","value":1}]}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"I"} ,"properties":[{"id":"links","value":[{"title":"Logs Instance : ${__field.labels.ins}","url":"/d/logs-instance?var-ins=${__field.labels.ins}&var-src=postgres&${__url_time_range}"}]},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#cc4637d9","value":1}]}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"JUICE"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#8fad88","value":1}]}},{"id":"links","value":[{"title":"Node JuiceFS : ${__field.labels.ins}","url":"/d/node-juice?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"NGINX"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#346f36cc","value":1}]}},{"id":"links","value":[{"title":"Nginx Instance : ${__field.labels.ins}","url":"/d/nginx-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"GRAFANA"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#f79f64","value":1}]}},{"id":"links","value":[{"title":"Grafana Instance : ${__field.labels.ins}","url":"/d/grafana-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"VMETRICS"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#a64d4d","value":1}]}},{"id":"links","value":[{"title":"VMetrics Instance : ${__field.labels.ins}","url":"/d/vmetrics-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"VLOGS"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#ba7552","value":1}]}},{"id":"links","value":[{"title":"VLogs Instance : ${__field.labels.ins}","url":"/d/vlogs-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"VTRACES"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#c4895c","value":1}]}},{"id":"links","value":[{"title":"VTraces Instance : ${__field.labels.ins}","url":"/d/vtraces-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"VMALERT"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#b3596d","value":1}]}},{"id":"links","value":[{"title":"VMAlert Instance : ${__field.labels.ins}","url":"/d/vmalert-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"ALERTMGR"},"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#db7070","value":1}]}},{"id":"links","value":[{"title":"AlertManager Instance : ${__field.labels.ins}","url":"/d/alertmanager-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"K"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#5b9cd5","value":1}]}},{"id":"links","value":[{"title":"ETCD Overview","url":"/d/etcd-overview?${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"L"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#cc4637d9","value":1}]}},{"id":"links","value":[{"title":"Redis Instance ${__field.labels.ins} @ ${__field.labels.instance}","url":"/d/redis-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"M"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#d0475799","value":1}]}},{"id":"links","value":[{"title":"Minio Instance: ${__field.labels.ins}","url":"/d/minio-overview?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"N"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#806c52","value":1}]}},{"id":"links","value":[{"title":"Mongo Instance : ${__field.labels.ins}","url":"/d/mongo-overview?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"Y"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#6a8d9d","value":1}]}},{"id":"links","value":[{"title":"MySQL Instance : ${__field.labels.ins}","url":"/d/mysql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"P"} ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#5a8da5","value":1}]}},{"id":"links","value":[{"title":"MySQL Instance : ${__field.labels.ins}","url":"/d/mysql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"S"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Backup : ${__field.labels.cls}","url":"/d/pgsql-pitr?var-cls=${__field.labels.cls}&${__url_time_range}"}]},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#252f34","value":0},{"color":"#42606b","value":1}]}}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":12,"w":5,"x":19,"y":38},
|
|
"id":180,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"valueSize":12},"textMode":"value_and_name","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"postgres {{ ins }}" ,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pgbouncer_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"pgbouncer {{ ins }}" ,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"patroni_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"patroni {{ ins }}" ,"refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg_exporter_agent_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"pg_exporter {{ ins }}" ,"refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pgbouncer_exporter_agent_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"pgb_exporter {{ ins }}","refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pgbackrest_exporter_agent_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"pgbackrest {{ ins }}" ,"refId":"S" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"node_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"node {{ ins }}" ,"refId":"F" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"haproxy_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"haproxy {{ ins }}" ,"refId":"G" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"docker_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"docker {{ ins }}" ,"refId":"H" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"vector_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"vector {{ ins }}" ,"refId":"I" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{job=\"juice\", ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"JUICE" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"nginx\", ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"NGINX" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"grafana\", ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"GRAFANA" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"vmetrics\", ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"VMETRICS" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"vlogs\", ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"VLOGS" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"vtraces\", ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"VTRACES" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"vmalert\", ip=~\"$members\"})" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"VMALERT" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"alertmanager\", ip=~\"$members\"})","hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"ALERTMGR" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"etcd_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"K" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"redis_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"L" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"minio_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"M" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"mongo_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}" ,"refId":"N" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"mysql_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"mysql {{ ins }}" ,"refId":"Y" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"mysql_exporter_up{ip=~\"$members\"}" ,"hide":false,"instant":true,"interval":"","legendFormat":"mysql_exporter" ,"refId":"P" }
|
|
],
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[{"options":{"match":"null+nan","result":{"color":"transparent","index":1}},"type":"special"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
|
|
"overrides":[
|
|
{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance: ${__data.fields.Instance}","url":"/d/pgsql-instance?var-ins=${__data.fields.Instance}&${__url_time_range}"}]},{"id":"custom.minWidth","value":120}]},
|
|
{"matcher":{"id":"byName","options":"Cluster"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster: ${__data.fields.Cluster}","url":"/d/pgsql-cluster?var-cls=${__data.fields.Cluster}&${__url_time_range}"}]},{"id":"custom.minWidth","value":120}]},
|
|
{"matcher":{"id":"byName","options":"Shard"},"properties":[{"id":"links","value":[{"title":"PGSQL Shard : ${__data.fields.Shard}","url":"/d/pgsql-shard?var-shard=${__data.fields.Shard}&${__url_time_range}"}]},{"id":"custom.width","value":100}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Status"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"mappings" ,"value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"Replica"},"1":{"color":"#3e668f","index":1,"text":"Primary"},"2":{"color":"#f79f64","index":2,"text":"Standby Leader"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"#808080","index":3,"text":"Unknown"}},"type":"special"}] },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"Version"},"properties":[{"id":"custom.width","value":80}]},{"matcher":{"id":"byName","options":"PG Ver"},"properties":[{"id":"custom.width","value":80}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Paused"},
|
|
"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"OK"},"1":{"color":"#f79f64","index":1,"text":"Paused"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Lock"},
|
|
"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"Unlocked"},"1":{"color":"#b783af","index":1,"text":"Locked"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Restart"},
|
|
"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"No Need"},"1":{"color":"#f79f64","index":1,"text":"Pending"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Failsafe"},
|
|
"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"Inactive"},"1":{"color":"#cc4637d9","index":1,"text":"Active"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"WAL"},
|
|
"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"Proceed"},"1":{"color":"#f79f64","index":1,"text":"Paused"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Postgres"},
|
|
"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Down"},"1":{"color":"#346f36cc","index":1,"text":"Alive"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2}},"type":"special"}]}]
|
|
},
|
|
{"matcher":{"id":"byName","options":"PG Uptime "},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"s"},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#cc4637d9","value":0},{"color":"#f79f64","value":300},{"color":"#fcdb72","value":3600},{"color":"#346f36cc","value":86400}]}}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"DCS Seen"},
|
|
"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"s"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#f79f64","value":20},{"color":"#cc4637d9","value":30},{"color":"#b783af","value":60},{"color":"text","value":300}]}},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
|
|
},
|
|
{"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":6,"w":19,"x":0,"y":44},
|
|
"id":152,
|
|
"links":[{"title":"PGSQL Patroni : ${cls}","url":"/d/pgsql-patroni?var-cls=${cls}&${__url_time_range}"}],
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Instance"}]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_primary{cls=\"$cls\"}) + \nmax by (ins) (patroni_standby_leader{cls=\"$cls\"})","format":"table", "instant":true,"legendFormat":"__auto","range":false,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (cls,ins,scope) (patroni_version{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_postgres_server_version{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_is_paused{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_cluster_unlocked{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_pending_restart{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"F" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_failsafe_mode_is_active{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"G" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_xlog_paused{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"H" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_postgres_running{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"I" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (time() - patroni_dcs_last_seen{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"J" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (time() - patroni_postmaster_start_time{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"K" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (patroni_up{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"legendFormat":"__auto","range":false,"refId":"L" }
|
|
],
|
|
"title":"Patroni Members",
|
|
"transformations":[
|
|
{"id":"joinByField","options":{"byField":"ins","mode":"outer"}},
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{"Time":true,"Time 1":true,"Time 10":true,"Time 11":true,"Time 12":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"Value #E":false,"__name__ 1":false,"cls":true,"scope":false},
|
|
"indexByName":{"Time 1":15,"Time 10":24,"Time 11":25,"Time 12":26,"Time 2":16,"Time 3":17,"Time 4":18,"Time 5":19,"Time 6":20,"Time 7":21,"Time 8":22,"Time 9":23,"Value #A":1,"Value #B":13,"Value #C":14,"Value #D":6,"Value #E":7,"Value #F":8,"Value #G":9,"Value #H":10,"Value #I":11,"Value #J":5,"Value #K":12,"Value #L":0,"cls":3,"ins":2,"scope":4},
|
|
"renameByName":{"Value #A":"Status","Value #B":"Version","Value #C":"PG Ver","Value #D":"Paused","Value #E":"Lock","Value #F":"Restart","Value #G":"Failsafe","Value #H":"WAL","Value #I":"Postgres","Value #J":"DCS Seen","Value #K":"PG Uptime ","Value #L":"Up","cls":"Cluster","ins":"Instance","scope":"Shard"}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"All instances among pgsql cluster ${cls}\n\nInstance: Goto PGSQL Instance\n\nIP: Goto PGSQL Node\n\nStatus: Goto PGSQL Service\n\nLoad: max(cpu,postgres,pgbouncer)\n\nSpace: Disk space usage max(all device)\n\nProxy: session number, Goto Haproxy Admin Page",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"max":1.2,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
|
|
"overrides":[
|
|
{"matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance ${__data.fields.Instance}","url":"/d/pgsql-instance?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":"#7e7e7e","index":2,"text":"Unknown"}},"type":"special"}] },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} },
|
|
{ "id":"links" ,"value":[] }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Load"},
|
|
"properties":[
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
|
|
{ "id":"color" ,"value":{"mode":"thresholds"} },
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"custom.width" ,"value":120 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]} },
|
|
{ "id":"decimals" ,"value":1 }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"Cluster"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster for ${__data.fields.Cluster}","url":"/d/pgsql-cluster?var-cls=${__data.fields.Cluster}&${__url_time_range}"}]}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Space"},
|
|
"properties":[
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.05},{"color":"#fcdb72","value":0.8},{"color":"#f79f64","value":0.85},{"color":"red","value":0.9},{"color":"#b783af","value":0.95},{"color":"text","value":0.99}]} },
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"custom.width" ,"value":120 },
|
|
{ "id":"decimals" ,"value":1 }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Proxy"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"links" ,"value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}/"}] },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0},{"color":"#3275d9bf","value":0},{"color":"#55a64bbf","value":1},{"color":"#f2cc0c","value":1000},{"color":"#f79f64","value":2000},{"color":"red","value":3000}]} },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"TPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{"matcher":{"id":"byName","options":"QPS"},"properties":[{"id":"custom.width","value":80},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#3e668f","value":32},{"color":"#f79f64","value":32000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Backend"},
|
|
"properties":[{"id":"custom.width","value":90},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#EAB839","value":20},{"color":"#EF843C","value":40},{"color":"#E24D42","value":80},{"color":"#b783af","value":100},{"color":"text","value":400}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Query RT"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"unit" ,"value":"s" },
|
|
{ "id":"mappings" ,"value":[{"options":{"match":"nan","result":{"index":1,"text":"-"}},"type":"special"}] },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]} },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Conn%"},
|
|
"properties":[{"id":"unit","value":"percentunit"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"red","value":1}]}},{"id":"decimals","value":0},{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}}]
|
|
},
|
|
{"matcher":{"id":"byName","options":"LB"},"properties":[{"id":"custom.width","value":80},{"id":"mappings","value":[{"options":{"1":{"index":0,"text":"Admin"}},"type":"value"}]},{"id":"links","value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}/"}]}]},
|
|
{"matcher":{"id":"byName","options":"Queue"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":1}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"Lag"},
|
|
"properties":[{"id":"custom.width","value":72},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#EAB839","value":1000},{"color":"#f79f64","value":100000},{"color":"#b783af","value":100000},{"color":"red","value":1000000},{"color":"text","value":100000000}]}},{"id":"unit","value":"decbytes"},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
|
|
},
|
|
{"matcher":{"id":"byName","options":"Up"},"properties":[{"id":"custom.width","value":90},{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Dead"},"1":{"color":"#346f36cc","index":1,"text":"Alive"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}}]}
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":19,"x":0,"y":50},
|
|
"id":128,
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Instance"}]},
|
|
"pluginVersion":"12.3.1",
|
|
"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"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (up{cls=\"$cls\", job=\"pgsql\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"D" },
|
|
{ "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" }
|
|
],
|
|
"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 1":true,
|
|
"ip 2":false,
|
|
"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,"Time 7":23,"Value #A":1,"Value #B":5,"Value #C":6,"Value #D":0,"Value #E":8,"Value #G":7,"Value #K":24,"__name__ 1":11,"__name__ 2":14,"cls 1":18,"cls 2":9,"ins":2,"instance":22,"ip 1":4,"ip 2":3,"ip 3":21,"job 1":12,"job 2":15},
|
|
"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 2":"IP"}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Important configuration entries of this instance",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]},"unit":"string"},
|
|
"overrides":[{"matcher":{"id":"byName","options":"Info"},"properties":[{"id":"custom.width","value":80}]},{"matcher":{"id":"byName","options":"Value"},"properties":[{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.minWidth","value":60}]}]
|
|
},
|
|
"gridPos":{"h":13,"w":5,"x":19,"y":50},
|
|
"id":21,
|
|
"options":{"cellHeight":"sm","showHeader":false},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"pg_meta_info{ins=\"$primary\"}","format":"table","instant":false,"interval":"","legendFormat":"","refId":"A"}],
|
|
"title":"Settings",
|
|
"transformations":[
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{"Time":true,"Value":true,"Value #A":true,"__name__":true,"cls":false,"cluster_name":false,"ins":true,"instance":true,"ip":false,"job":true,"ver_num":true,"version":false},
|
|
"includeByName":{},
|
|
"indexByName":{"Time":12,"Value":15,"__name__":16,"cls":0,"cluster_id":7,"cluster_name":6,"conf_path":8,"data_dir":5,"extensions":10,"hba_path":9,"ins":17,"instance":13,"ip":1,"job":14,"listen_port":2,"ver_num":11,"version":3,"wal_level":4},
|
|
"renameByName":{"Time":"","cls":"Cluster","cluster_id":"CLS ID","cluster_name":"Name","conf_path":"Config","data_dir":"Data","extensions":"Extension","hba_path":"HBA","ins":"Instance","ip":"Primary","listen_port":"Port","primary_conninfo":"Primary","ver_num":"VerNum","ver_str":"Version","version":"Ver","wal_level":"WAL"}
|
|
}
|
|
},
|
|
{"id":"reduce","options":{"reducers":["last"]}},{"id":"organize","options":{"excludeByName":{},"indexByName":{},"renameByName":{"Field":"Info","Last":"Value"}}}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Database of this cluster ${cls}\n\nLoad: active_time / backends (PG14 only)\n\nQuery RT : max query rt of this database\n\nClient: Pgbouncer Active Clients\n\nServer: Pgbouncer Active Servers\n\nBackend: Postgres num backends\n\nT = is Template?\n\nD = Disabled in Pgbouncer ?\n\nP = Paused in Pgbouncer ?",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"mode":"gradient","type":"color-background"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
|
|
"overrides":[
|
|
{
|
|
"matcher":{"id":"byName","options":"Database"},
|
|
"properties":[
|
|
{ "id":"links" ,"value":[{"title":"PGSQL Cluster Database : ${cls}.${__data.fields.Database}","url":"/d/pgsql-databases?var-cls=${cls}&var-datname=${__data.fields.Database}&${__url_time_range}"}] },
|
|
{ "id":"mappings" ,"value":[{"options":{"postgres":{"color":"#808080","index":2},"template0":{"color":"#c0c0c0e0","index":0},"template1":{"color":"#a8a8a8e0","index":1}},"type":"value"}] },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
|
|
{ "id":"color" ,"value":{"fixedColor":"#3e668f","mode":"fixed"} },
|
|
{ "id":"filterable" }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Size"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"unit" ,"value":"decbytes" },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"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","value":0},{"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","value":0},{"color":"#f79f64","value":30000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"custom.width","value":70},{"id":"color","value":{"mode":"thresholds"}},{"id":"decimals","value":1}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"T"},
|
|
"properties":[{"id":"custom.width","value":40},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":1,"text":"F"},"1":{"color":"#f79f64","index":2,"text":"T"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"#e3e3e3e0","index":0,"text":"N"}},"type":"special"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Backend"},
|
|
"properties":[{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#f79f64","value":1000}]}},{"id":"color","value":{"mode":"thresholds"}},{"id":"custom.width","value":75},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
|
|
},{
|
|
"matcher":{"id":"byName","options":"ConnLimit"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":85 },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
|
|
{ "id":"color" },
|
|
{ "id":"mappings" ,"value":[{"options":{"-1":{"color":"#3e668f","index":1,"text":"NO LIMIT"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"N/A"}},"type":"special"},{"options":{"from":0,"result":{"color":"#f79f64","index":2},"to":99999999},"type":"range"}] }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byRegexp","options":"Conn%"},
|
|
"properties":[
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"custom.width" ,"value":90 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":0.99}]} },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"Client"},"properties":[{"id":"custom.width","value":60},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{"matcher":{"id":"byName","options":"Server"},"properties":[{"id":"custom.width","value":60},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#fcdb72","value":1000}]}}]},
|
|
{"matcher":{"id":"byName","options":"Conn%"},"properties":[{"id":"custom.width","value":70},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"decimals","value":1}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"RT"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"red","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]} },
|
|
{ "id":"mappings" ,"value":[{"options":{"match":"null+nan","result":{"index":0,"text":"-"}},"type":"special"}] },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} },
|
|
{ "id":"unit" ,"value":"s" }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Load"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":120 },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"gauge"} },
|
|
{ "id":"unit" ,"value":"percentunit" },
|
|
{ "id":"decimals" ,"value":1 },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]} },
|
|
{ "id":"mappings" ,"value":[{"options":{"match":"null+nan","result":{"index":0,"text":"-"}},"type":"special"}] }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"D"},
|
|
"properties":[{"id":"custom.width","value":50},{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"F"},"1":{"color":"#f79f64","index":1,"text":"T"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2,"text":"-"}},"type":"special"}]},{"id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"}}]
|
|
},
|
|
{"matcher":{"id":"byName","options":"P"},"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"#346f36cc","index":0,"text":"F"},"1":{"color":"#f79f64","index":1,"text":"T"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"transparent","index":2,"text":"-"}},"type":"special"}]},{"id":"custom.width","value":50}]},
|
|
{"matcher":{"id":"byName","options":"PoolSize"},"properties":[{"id":"custom.width","value":80},{"id":"custom.cellOptions","value":{"type":"auto"}}]},{"matcher":{"id":"byName","options":"Target"},"properties":[{"id":"custom.minWidth","value":60},{"id":"custom.cellOptions","value":{"type":"auto"}},{"id":"custom.inspect","value":true}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"OID"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },{ "id":"links" ,"value":[{"title":"PGCAT Database : ${primary}.${__data.fields.Database}","url":"/d/pgcat-database?var-dsn=${primary}.${__data.fields.Database}"}] },
|
|
{ "id":"mappings" ,"value":[{"options":{"from":0,"result":{"color":"#bfbfbf4d","index":0},"to":10},"type":"range"}] },{ "id":"custom.cellOptions","value":{"type":"color-text"} },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]} }
|
|
]
|
|
}
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":19,"x":0,"y":56},
|
|
"id":168,
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":true,"displayName":"Size"}]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pg_size_bytes{cls=\"$cls\", datname!~\"wal|log\"})" ,"format":"table", "instant":true,"interval":"","legendFormat":"Age" ,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg:db:age{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Commit" ,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg_db_is_template{cls=\"$cls\", ins=\"$primary\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"isTemplate" ,"refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (datname) (pg_activity_count{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Backend" ,"refId":"D" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pg:db:xact_commit_rate1m{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"TPS" ,"refId":"E" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg_db_conn_limit{ins=\"$primary\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Limit" ,"refId":"F" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pgbouncer:db:query_rt_1m{ins=\"$primary\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Limit" ,"refId":"G" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pg:db:conn_usage{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"PG Conn Usage","refId":"H" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pgbouncer_database_disabled{ins=\"$primary\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Disabled" ,"refId":"I" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname) (pgbouncer_database_paused{ins=\"$primary\", datname!=\"pgbouncer\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Paused" ,"refId":"J" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pg:db:active_time_rate1m{cls=\"$cls\"}) / sum by (datname) (pg_db_numbackends{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Usage" ,"refId":"L" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer:db:active_servers{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Usage" ,"refId":"M" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (datname) (pgbouncer:db:active_servers{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Conn Usage" ,"refId":"N" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"max by (datname,host) (pgbouncer_database_pool_size{cls=\"$cls\", datname!=\"pgbouncer\"} + pgbouncer_database_reserve_pool{cls=\"$cls\", datname!=\"pgbouncer\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Age" ,"refId":"K" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (datname) (pg_db_datid{cls=\"$cls\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"OID" ,"refId":"O" }
|
|
],
|
|
"title":"Database",
|
|
"transformations":[
|
|
{"id":"seriesToColumns","options":{"byField":"datname"}},
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{"Time 1":true,"Time 10":true,"Time 11":true,"Time 12":true,"Time 13":true,"Time 14":true,"Time 15":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Time 6":true,"Time 7":true,"Time 8":true,"Time 9":true,"Value #G":false,"Value #H":false,"host":true},
|
|
"indexByName":{
|
|
"Time 1":17,
|
|
"Time 10":26,
|
|
"Time 11":27,
|
|
"Time 12":28,
|
|
"Time 13":29,
|
|
"Time 14":30,
|
|
"Time 15":31,
|
|
"Time 2":18,
|
|
"Time 3":19,
|
|
"Time 4":20,
|
|
"Time 5":21,
|
|
"Time 6":22,
|
|
"Time 7":23,
|
|
"Time 8":24,
|
|
"Time 9":25,
|
|
"Value #A":2,
|
|
"Value #B":3,
|
|
"Value #C":15,
|
|
"Value #D":4,
|
|
"Value #E":5,
|
|
"Value #F":11,
|
|
"Value #G":6,
|
|
"Value #H":10,
|
|
"Value #I":13,
|
|
"Value #J":14,
|
|
"Value #K":12,
|
|
"Value #L":9,
|
|
"Value #M":8,
|
|
"Value #N":7,
|
|
"Value #O":1,
|
|
"datname":0,
|
|
"host":16
|
|
},
|
|
"renameByName":{"Time 1":"","Time 7":"","Value #A":"Size","Value #B":"Age","Value #C":"T","Value #D":"Backend","Value #E":"TPS","Value #F":"ConnLimit","Value #G":"RT","Value #H":"Conn%","Value #I":"D","Value #J":"P","Value #K":"PoolSize","Value #L":"Load","Value #M":"Client","Value #N":"Server","Value #O":"OID","datname":"Database","host":"Target","real_datname":"Datname"}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Service map tells whether a server can be used as a specific service/role/svc.\ne.g Offline marks this server can be used as offline server",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"color-background"},"footer":{"reducers":[]},"inspect":false,"minWidth":60},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0},{"color":"#e3e3e3e0","value":0},{"color":"#e02f44bf","value":1}]}},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byName","options":"Server"} ,"properties":[{"id":"unit","value":"string"},{"id":"links","value":[{"title":"PGSQL Instance for ${__data.fields.Server}","url":"/d/pgsql-instance?var-ins=${__data.fields.Server}&${__url_time_range}"}]},{"id":"custom.minWidth","value":100},{"id":"custom.cellOptions","value":{"type":"auto"}}] },
|
|
{ "matcher":{"id":"byRegexp","options":"/primary/"},"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"transparent","index":1}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"},{"options":{"from":1,"result":{"color":"#3e668f","index":2},"to":9999999},"type":"range"}]}] },
|
|
{ "matcher":{"id":"byRegexp","options":"/offline/"},"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"transparent","index":1}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"},{"options":{"from":1,"result":{"color":"#fcdb72","index":2},"to":9999999},"type":"range"}]}] },
|
|
{ "matcher":{"id":"byRegexp","options":"/default/"},"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"transparent","index":1}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"},{"options":{"from":1,"result":{"color":"#f79f64","index":2},"to":9999999},"type":"range"}]}] },
|
|
{ "matcher":{"id":"byRegexp","options":"/replica/"},"properties":[{"id":"mappings","value":[{"options":{"0":{"color":"transparent","index":1}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"\u2205"}},"type":"special"},{"options":{"from":1,"result":{"color":"#346f36cc","index":2},"to":9999999},"type":"range"}]}] },
|
|
{ "matcher":{"id":"byRegexp","options":"/standby/"},"properties":[{"id":"mappings","value":[{"options":{"0":{"index":1}},"type":"value"},{"options":{"match":"null+nan","result":{"index":0,"text":"\u2205"}},"type":"special"},{"options":{"from":1,"result":{"color":"#b783af","index":2},"to":9999999},"type":"range"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":12,"x":0,"y":63},
|
|
"id":162,
|
|
"links":[{"title":"PGSQL Service : ${cls}-primary","url":"/d/pgsql-service?var-svc=${cls}-primary&${__url_time_range}"}],
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Server"}]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (proxy,server) (\n haproxy_server_current_sessions{proxy=~\"$cls.*\"}\n)","format":"time_series","instant":true,"interval":"","legendFormat":"","refId":"A"}],
|
|
"title":"Service",
|
|
"transformations":[
|
|
{ "id":"labelsToFields","options":{"valueLabel":"proxy"} },
|
|
{ "id":"merge" ,"options":{} },
|
|
{ "id":"organize" ,"options":{"excludeByName":{"Time":true,"cls":true,"ins":true,"instance":true,"ip":true,"job":true},"indexByName":{"Time":1,"cls":6,"job":7,"pg-moderation-tt-default":2,"pg-moderation-tt-offline":3,"pg-moderation-tt-primary":4,"pg-moderation-tt-replica":5,"server":0},"renameByName":{"proxy":"","server":"Server"}} },
|
|
{ "id":"renameByRegex" ,"options":{"regex":"(.*)-(.*)","renamePattern":"$2"} }
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"All haproxy among this cluster ${cls}\n\nInstance: Goto PGSQL Instance\n\nIP: Goto PGSQL Node\n\nStatus: Goto PGSQL Service\n\nLoad: max(cpu,postgres,pgbouncer)\n\nSpace: Disk space usage max(all device)\n\nProxy: session number, Goto Haproxy Admin Page",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"max":1.2,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
|
|
"overrides":[
|
|
{"matcher":{"id":"byName","options":"Proxy"},"properties":[{"id":"links","value":[{"title":"PGSQL Proxy : ${__data.fields.Proxy}","url":"/d/pgsql-proxy?var-ins=${__data.fields.Proxy}&${__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","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.3},{"color":"#f79f64","value":0.5},{"color":"red","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]} },
|
|
{ "id":"decimals" ,"value":1 }
|
|
]
|
|
},{
|
|
"matcher":{"id":"byName","options":"Session"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":80 },
|
|
{ "id":"links" ,"value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Instance}","url":"/haproxy/${__data.fields.Instance}/"}] },
|
|
{ "id":"thresholds" ,"value":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0},{"color":"#3275d9bf","value":0},{"color":"#55a64bbf","value":1},{"color":"#f2cc0c","value":1000},{"color":"#f79f64","value":2000},{"color":"red","value":3000}]} },
|
|
{ "id":"custom.cellOptions","value":{"type":"color-text"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"Service"},"properties":[{"id":"custom.width","value":72},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#fcdb72","value":5}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{"matcher":{"id":"byName","options":"Server"},"properties":[{"id":"custom.width","value":72},{"id":"custom.cellOptions","value":{"type":"color-text"}},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"red","value":0},{"color":"#fcdb72","value":1},{"color":"#346f36cc","value":2}]}}]},
|
|
{"matcher":{"id":"byName","options":"LB Session"},"properties":[{"id":"custom.width","value":96},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":1000},{"color":"#f79f64","value":2000},{"color":"red","value":3000}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"DB Session"},
|
|
"properties":[{"id":"custom.width","value":96},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":4},{"color":"#f79f64","value":20},{"color":"#f79f64","value":40},{"color":"red","value":80},{"color":"#b783af","value":100},{"color":"text","value":400}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]
|
|
},
|
|
{"matcher":{"id":"byName","options":"Admin Page"},"properties":[{"id":"custom.width","value":160},{"id":"custom.minWidth","value":150},{"id":"links","value":[{"targetBlank":true,"title":"HAProxy Admin Page : ${__data.fields.Proxy}","url":"/haproxy/${__data.fields.Proxy}/"}]}]}
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":12,"x":12,"y":63},
|
|
"id":149,
|
|
"links":[{"title":"PGSQL Proxy : ${primary}","url":"/d/pgsql-proxy?var-ins=${primary}&${__url_time_range}"}],
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Proxy"}]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count by (ins,instance) (haproxy_backend_current_sessions{proxy=~\"$cls-.*\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Service","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count by(ins) (group by(ins,server) (haproxy_server_current_sessions{proxy=~\"$cls-.*\"}))","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Session","refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (haproxy_backend_current_sessions{proxy=~\"$cls-.*\"})" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"Session","refId":"C" }
|
|
],
|
|
"title":"Proxies",
|
|
"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 5":true,
|
|
"Time 6":true,
|
|
"Time 8":true,
|
|
"Time 9":true,
|
|
"Value #A":false,
|
|
"Value #B":false,
|
|
"Value #H":false,
|
|
"__name__":true,
|
|
"__name__ 1":true,
|
|
"__name__ 2":true,
|
|
"__name__ 3":true,
|
|
"__name__ 5":true,
|
|
"__name__ 7":true,
|
|
"cls":true,
|
|
"cls 1":true,
|
|
"cls 2":true,
|
|
"cls 3":true,
|
|
"cls 4":true,
|
|
"cls 5":true,
|
|
"cls 6":true,
|
|
"cls 7":true,
|
|
"instance":false,
|
|
"instance 1":true,
|
|
"instance 2":true,
|
|
"instance 3":true,
|
|
"instance 4":true,
|
|
"instance 5":true,
|
|
"instance 6":true,
|
|
"ip":true,
|
|
"ip 2":true,
|
|
"ip 3":true,
|
|
"ip 4":true,
|
|
"ip 5":true,
|
|
"ip 6":true,
|
|
"ip 7":true,
|
|
"job":true,
|
|
"job 1":true,
|
|
"job 2":true,
|
|
"job 3":true,
|
|
"job 4":true,
|
|
"job 5":true,
|
|
"job 6":true,
|
|
"job 7":true
|
|
},
|
|
"indexByName":{"Time 1":7,"Time 2":8,"Time 3":9,"Time 4":10,"Time 5":14,"Value #A":1,"Value #B":2,"Value #C":3,"Value #D":5,"Value #E":4,"cls":11,"ins":0,"instance":6,"ip":13,"job":12},
|
|
"renameByName":{"Time 1":"","Time 4":"","Value #A":"Service","Value #B":"Server","Value #C":"LB Session","Value #D":"Load","Value #E":"DB Session","Value #F":"Query RT","Value #G":"Conn%","Value #H":"LB","Value #I":"QPS","Value #J":"Queue","Value #K":"Lag","cls 1":"","cls 2":"","ins":"Proxy","instance":"Admin Page","ip":"","ip 1":"IP","job":""}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Replication Status among cluster ${cls}",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
|
|
"overrides":[
|
|
{
|
|
"matcher":{"id":"byName","options":"STATE"},
|
|
"properties":[
|
|
{ "id":"custom.width" ,"value":100 },
|
|
{ "id":"mappings" ,"value":[{"options":{"-1":{"color":"#a352ccbf","index":0,"text":"unknown"},"0":{"color":"#346f36cc","index":1,"text":"streaming"},"1":{"color":"#e02f44bf","index":2,"text":"startup"},"2":{"color":"#f2cc0cbf","index":3,"text":"catchup"},"3":{"color":"#3275d9bf","index":4,"text":"backup"},"4":{"color":"#ff780abf","index":5,"text":"stopping"}},"type":"value"}] },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"TLI"},"properties":[{"id":"custom.width","value":60}]},
|
|
{
|
|
"matcher":{"id":"byName","options":"SYNC"},
|
|
"properties":[
|
|
{ "id":"mappings" ,"value":[{"options":{"-1":{"color":"#a352ccbf","index":4,"text":"unknown"},"0":{"color":"#346f36cc","index":0,"text":"async"},"1":{"color":"#f2cc0cbf","index":1,"text":"potential"},"2":{"color":"#3275d9bf","index":2,"text":"sync"},"3":{"color":"#ff780abf","index":3,"text":"quorum"}},"type":"value"}] },
|
|
{ "id":"custom.cellOptions","value":{"mode":"gradient","type":"color-background"} },
|
|
{ "id":"custom.width" ,"value":90 }
|
|
]
|
|
},
|
|
{"matcher":{"id":"byName","options":"SRC"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance for replication source instance ${__data.fields.SRC}","url":"/d/pgsql-instance?var-ins=${__data.fields.SRC}&${__url_time_range}"}]}]},
|
|
{"matcher":{"id":"byName","options":"DST"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance for replication destination instance ${__data.fields.DST}","url":"/d/pgsql-instance?var-ins=${__data.fields.DST}&${__url_time_range}"}]}]},
|
|
{"matcher":{"id":"byName","options":"SRC IP"},"properties":[{"id":"custom.width","value":140},{"id":"links","value":[{"title":"PGSQL Node : ${__data.fields[\"SRC IP\"]}","url":"/d/node-instance?var-id=${__data.fields[\"SRC IP\"]}&${__url_time_range}"}]}]},
|
|
{"matcher":{"id":"byName","options":"DST IP"},"properties":[{"id":"custom.width","value":140},{"id":"links","value":[{"title":"PGSQL Node: ${__data.fields[\"DST IP\"]}","url":"/d/node-instance?var-id=${__data.fields[\"DST IP\"]}&${__url_time_range}"}]}]}
|
|
]
|
|
},
|
|
"gridPos":{"h":6,"w":24,"x":0,"y":69},
|
|
"id":167,
|
|
"links":[{"title":"PGSQL Replication : ${cls}","url":"/d/pgsql-replication?var-cls=${cls}&${__url_time_range}"}],
|
|
"options":{"cellHeight":"sm","showHeader":true,"sortBy":[]},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"pg:cls:sender{cls=\"$cls\"}" ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"pg:cls:receiver{cls=\"$cls\"}","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"B" }
|
|
],
|
|
"title":"Replication",
|
|
"transformations":[
|
|
{"id":"seriesToColumns","options":{"byField":"appname"}},
|
|
{
|
|
"id":"organize",
|
|
"options":{
|
|
"excludeByName":{"Time":true,"Time 1":true,"Time 2":true,"Value #A":false,"__name__":true,"__name__ 1":true,"__name__ 2":true,"address":true,"cls":true,"cls 1":true,"cls 2":true,"ip":false,"job":true,"job 1":true,"job 2":true,"pid":true,"sender_host":true,"sender_port":true,"usename":true},
|
|
"indexByName":{"Time 1":11,"Time 2":15,"Value #A":1,"Value #B":7,"__name__ 1":12,"__name__ 2":16,"address":13,"appname":3,"cls 1":14,"cls 2":17,"ins":2,"ip 1":4,"ip 2":5,"job 1":19,"job 2":20,"pid":8,"sender_host":10,"sender_port":18,"slot_name":6,"state":0,"usename":9},
|
|
"renameByName":{"Value":"TLI","Value #A":"SYNC","Value #B":"TLI","address":"","appname":"DST","ins":"SRC","ip 1":"SRC IP","ip 2":"DST IP","pid":"PID","sender_host":"","sender_port":"","slot_name":"SLOT","state":"STATE","usename":"USER"}
|
|
}
|
|
}
|
|
],
|
|
"type":"table"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":75},"id":82,"panels":[],"title":"Metric","type":"row"},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Cluster (5m) & Instance (1m) CPU Usage",
|
|
"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":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineStyle":{"fill":"solid"},
|
|
"lineWidth":1,
|
|
"pointSize":3,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"area"}
|
|
},
|
|
"links":[],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0},{"color":"red","value":0.7},{"color":"purple","value":1}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}},{"id":"custom.lineWidth","value":1},{"id":"links","value":[{"title":"PGSQL Cluster Primary Instance ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&var-cls=${cls}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byName","options":"cluster"},"properties":[{"id":"custom.drawStyle","value":"line"},{"id":"custom.fillOpacity","value":30},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"rgba(128, 128, 128, 0.2)","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster follower instance ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&var-cls=${cls}&${__url_time_range}"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":76},
|
|
"id":98,
|
|
"options":{"legend":{"calcs":["max","last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"pg:cls:cpu_usage_5m{cls=\"$cls\"}" ,"hide":false,"interval":"","legendFormat":"cluster" ,"refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"pg:ins:cpu_usage_1m{cls=\"$cls\", ins=\"$primary\"}" , "interval":"","legendFormat":"{{ ins }} \u2b50\ufe0f","refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"pg:ins:cpu_usage_1m{cls=\"$cls\", ins!=\"$primary\"}","hide":false,"interval":"","legendFormat":"{{ ins }}" ,"refId":"B" }
|
|
],
|
|
"title":"CPU Usage",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Total transactions (commit + rollback) per second from PostgreSQL in last 5 minutes",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":5,
|
|
"gradientMode":"hue",
|
|
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"smooth",
|
|
"lineWidth":1,
|
|
"pointSize":5,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"links":[{"title":"PGSQL Xacts for ${__field.labels.ins}","url":"/d/pgsql-xacts?var-ins=${__field.labels.ins}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"short"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byName","options":"cluster"},"properties":[{"id":"custom.lineWidth","value":0},{"id":"custom.fillOpacity","value":20},{"id":"links","value":[{"title":"PGSQL Activity for ${cls}","url":"/d/pgsql-activity?var-cls=${cls}&${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"super-light-blue","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"custom.lineWidth","value":2},{"id":"color","value":{"fixedColor":"#f79f64","mode":"fixed"}}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":76},
|
|
"id":90,
|
|
"options":{"legend":{"calcs":["lastNotNull"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(rate(pg_db_xact_total{cls=\"$cls\"}[5m])) \n# pg:cls:xact_commit_rate1m{cls=\"$cls\", ins=\"$primary\"}" ,"hide":false,"interval":"","intervalFactor":1,"legendFormat":"cluster" ,"range":true,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (rate(pg_db_xact_total{cls=\"$cls\", ins=\"$primary\"}[5m])) \n# pg:cls:xact_commit_rate1m{cls=\"$cls\", ins=\"$primary\"}" ,"hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ ins }} \u2b50\ufe0f","range":true,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"}, "exemplar":false,"expr":"sum by (ins) (rate(pg_db_xact_total{cls=\"$cls\", ins!=\"$primary\"}[5m])) \n# pg:cls:xact_commit_rate1m{cls=\"$cls\", ins=\"$primary\"}","hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ ins }}" , "refId":"C" }
|
|
],
|
|
"title":"Xacts (5m)",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Number of backends for each instances among this cluster",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":60,
|
|
"gradientMode":"hue",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"stepBefore",
|
|
"lineWidth":0,
|
|
"pointSize":1,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"auto",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"links":[{"title":"PGSQL Session for ${__field.labels.ins}","url":"/d/pgsql-session?var-ins=${__field.labels.ins}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]}
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":83},
|
|
"id":88,
|
|
"options":{"legend":{"calcs":["lastNotNull"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"exemplar":false,"expr":"sum by (ins) (pg_activity_count{cls=\"$cls\"})","interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"Session",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Tuples fetched, inserted, updated, delete among this cluster",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":50,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":5,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"links":[],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"cps"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byName","options":"DELETED"} ,"properties":[{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"INSERTED"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },{ "matcher":{"id":"byName","options":"UPDATED"} ,"properties":[{"id":"color","value":{"fixedColor":"#b783af","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byName","options":"SELECT"} ,"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":83},
|
|
"id":104,
|
|
"links":[{"title":"PGSQL Database : CRUD for ${primary}","url":"/d/pgsql-database?var-ins=${primary}&${__url_time_range}"}],
|
|
"options":{"legend":{"calcs":[],"displayMode":"list","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "exemplar":false,"expr":"sum(rate(pg_db_tup_fetched{cls=\"$cls\"}[1m]))" , "interval":"","intervalFactor":2,"legendFormat":"SELECT" ,"refId":"B" },{ "exemplar":false,"expr":"sum(rate(pg_db_tup_inserted{cls=\"$cls\"}[1m]))","hide":false,"interval":"","intervalFactor":2,"legendFormat":"INSERTED","refId":"A" },
|
|
{ "exemplar":false,"expr":"sum(rate(pg_db_tup_updated{cls=\"$cls\"}[1m]))" ,"hide":false,"interval":"","intervalFactor":2,"legendFormat":"UPDATED" ,"refId":"C" },{ "exemplar":false,"expr":"sum(rate(pg_db_tup_deleted{cls=\"$cls\"}[1m]))" ,"hide":false,"interval":"","intervalFactor":2,"legendFormat":"DELETED" ,"refId":"D" }
|
|
],
|
|
"title":"CRUD",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Average transaction response time from pgbouncer\n(You can get from postgres directly after PG14)",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":0,
|
|
"gradientMode":"opacity",
|
|
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"smooth",
|
|
"lineWidth":1,
|
|
"pointSize":5,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byName","options":"cluster"},"properties":[{"id":"custom.fillOpacity","value":10},{"id":"custom.lineWidth","value":0},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"custom.gradientMode","value":"hue"},{"id":"links","value":[{"title":"PGSQL Cluster for ${__field.labels.cls}","url":"/d/pgsql-instance?var-cls=${__field.labels.cls}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance for ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance for ${__field.labels.ins}","url":"/d/pgsql-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":0,"y":90},
|
|
"id":100,
|
|
"options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:cls:active_time_rate1m{cls=\"$cls\"} / pg:cls:xact_total_rate1m{cls=\"$cls\"} # PG14" , "interval":"","intervalFactor":1,"legendFormat":"cluster" ,"range":true,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:active_time_rate1m{cls=\"$cls\", ins=\"$primary\"} / pg:ins:xact_total_rate1m{cls=\"$cls\", ins=\"$primary\"} # PG14" ,"hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ ins }} \u2b50\ufe0f","range":true,"refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:ins:active_time_rate1m{cls=\"$cls\", ins!=\"$primary\"} / pg:ins:xact_total_rate1m{cls=\"$cls\", ins!=\"$primary\"} # PG14","hide":false,"interval":"","intervalFactor":1,"legendFormat":"{{ ins }}" ,"range":true,"refId":"C" }
|
|
],
|
|
"title":"RT",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Replication Lag (WAL Replay Lag) measured in bytes",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":30,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":1,
|
|
"pointSize":2,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"always",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"links":[{"title":"PGSQL Instance for ${__field.labels.appname}","url":"/d/pgsql-instance?var-ins=${__field.labels.appname}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"decbytes"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":7,"w":12,"x":12,"y":90},
|
|
"id":84,
|
|
"links":[{"title":"PGSQL Replication for Cluster: ${cls}","url":"/d/pgsql-replication?var-cls=${cls}&${__url_time_range}"}],
|
|
"options":{"legend":{"calcs":["max","last"],"displayMode":"table","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"exemplar":false,"expr":"pg_repl_replay_diff{cls=\"$cls\"}","interval":"","legendFormat":"{{ ins }} \u2192 {{ usename }}:{{ appname }}@{{ address }}","refId":"A"}],
|
|
"title":"Replication Lag",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Time spent per second for each query of each instances.",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":70,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":0,
|
|
"pointSize":1,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"links":[{"title":"PGSQL Query : ${__field.labels.query}","url":"/d/pgsql-query?var-ins=${__field.labels.ins}&var-cls=${cls}&var-datname=${__field.labels.datname}&var-query=${__field.labels.query}&${__url_time_range}"},{"title":"PGCAT Query : ${__field.labels.query}","url":"/d/pgcat-query?var-dsn=${__field.labels.ins}.${__field.labels.datname}&var-query=${__field.labels.query}&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]},
|
|
"unit":"s"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":9,"w":17,"x":0,"y":97},
|
|
"id":86,
|
|
"links":[{"title":"PGSQL Databases : ${cls}","url":"/d/pgsql-databases?var-cls=${cls}&${__url_time_range}&viewPanel=1123"}],
|
|
"options":{"legend":{"calcs":["max","mean","lastNotNull"],"displayMode":"table","placement":"bottom","showLegend":true,"sortBy":"Max","sortDesc":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(pg_query_exec_time{cls=\"$cls\"}[1m])","interval":"","intervalFactor":2,"legendFormat":"{{ ins }}-{{ query }}","range":true,"refId":"B"}],
|
|
"title":"Query Time Spent",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"Ratio of XID used for each database among this cluster",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"decimals":1,
|
|
"links":[{"title":"Node Cluster : Disk for ${cls}","url":"/d/node-cluster?var-cls=${cls}&viewPanel=199&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"max":1,
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.8},{"color":"#f79f64","value":0.85},{"color":"#E24D42","value":0.9},{"color":"#b783af","value":0.95},{"color":"text","value":0.99}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":9,"w":7,"x":17,"y":97},
|
|
"id":102,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"max by (datname) (pg_db_age{cls=\"$cls\", datname!~\"template[0-9]\"}) / 2147483647","hide":false,"interval":"","legendFormat":"{{ datname }}","refId":"A"}],
|
|
"title":"XID Usage",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"description":"R\u25b2 for disk read bandwidth\nTX\u25b2 for network transmit bandwidth\nRX\u25bc for network receive bandwidth\nW\u25bc for disk write bandwidth",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":true,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"line",
|
|
"fillOpacity":10,
|
|
"gradientMode":"opacity",
|
|
"hideFrom":{"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"smooth",
|
|
"lineWidth":1,
|
|
"pointSize":5,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":false,
|
|
"stacking":{"group":"A","mode":"none"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"links":[],
|
|
"mappings":[],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"Bps"
|
|
},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byRegexp","options":"/R\u25b2|W\u25bc/"} ,"properties":[{"id":"links","value":[{"title":"Node Instance : Disk Bandwidth for ${__field.labels.ins}","url":"/d/node-instance?var-ins=${__field.labels.ins}&viewPanel=45&${__url_time_range}"}]}] },
|
|
{ "matcher":{"id":"byRegexp","options":"/TX\u25b2|RX\u25bc/"},"properties":[{"id":"links","value":[{"title":"Node Instance : Network Bandwidth for ${__field.labels.ins}","url":"/d/node-instance?var-ins=${__field.labels.ins}&viewPanel=178&${__url_time_range}"}]}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":9,"w":17,"x":0,"y":106},
|
|
"id":107,
|
|
"options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"node:ins:disk_read_bytes_rate1m{ip=~\"$members\"} * on(ip) group_right pg_up{cls=\"$cls\"}" , "interval":"","legendFormat":"{{ ins }}-R\u25b2" ,"refId":"A" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"node:ins:network_tx_bytes_rate1m{ip=~\"$members\"} * on(ip) group_right pg_up{cls=\"$cls\"}" ,"hide":false,"interval":"","legendFormat":"{{ ins }}-TX\u25b2","refId":"B" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"- node:ins:network_rx_bytes_rate1m{ip=~\"$members\"} * on(ip) group_right pg_up{cls=\"$cls\"}","hide":false,"interval":"","legendFormat":"{{ ins }}-RX\u25bc","refId":"C" },
|
|
{ "datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"- node:ins:disk_write_bytes_rate1m{ip=~\"$members\"} * on(ip) group_right pg_up{cls=\"$cls\"}","hide":false,"interval":"","legendFormat":"{{ ins }}-W\u25bc" ,"refId":"D" }
|
|
],
|
|
"title":"Disk / Network",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"mode":"thresholds"},
|
|
"decimals":1,
|
|
"links":[{"title":"PGSQL Node : Disk for ${__field.labels.ins}:${__field.labels.mountpoint}","url":"/d/node-instance?var-id=${__field.labels.ins}&viewPanel=199&${__url_time_range}"}],
|
|
"mappings":[],
|
|
"max":1,
|
|
"min":0,
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#fcdb72","value":0.8},{"color":"#f79f64","value":0.85},{"color":"#cc4637d9","value":0.9},{"color":"#b783af","value":0.95},{"color":"text","value":0.99}]},
|
|
"unit":"percentunit"
|
|
},
|
|
"overrides":[]
|
|
},
|
|
"gridPos":{"h":9,"w":7,"x":17,"y":106},
|
|
"id":105,
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"max by (mountpoint) (node:fs:space_usage{ip=~\"$members\"})","hide":false,"interval":"","legendFormat":"{{ mountpoint }}","refId":"A"}],
|
|
"title":"Space Usage (Max)",
|
|
"type":"stat"
|
|
},
|
|
{"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":115},"id":170,"panels":[],"title":"Logs","type":"row"},
|
|
{
|
|
"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
|
|
"description":"Total log events in the current time window",
|
|
"fieldConfig":{
|
|
"defaults":{"color":{"fixedColor":"#346f36cc","mode":"fixed"},"decimals":0,"links":[{"title":"${__field.labels.src} Logs for ${primary}","url":"/d/logs-instance?var-ins=$primary&var-src=${__field.labels.src}&${__url_time_range}"}],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},"unit":"none"},
|
|
"overrides":[
|
|
{ "matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}] },{ "matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"color","value":{"fixedColor":"#5b9cd5","mode":"fixed"}}] },{ "matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}] },
|
|
{ "matcher":{"id":"byFrameRefID","options":"D"},"properties":[{"id":"color","value":{"fixedColor":"#42606b","mode":"fixed"}}] },{ "matcher":{"id":"byFrameRefID","options":"E"},"properties":[{"id":"color","value":{"fixedColor":"#b783af","mode":"fixed"}}] },{ "matcher":{"id":"byFrameRefID","options":"F"},"properties":[{"id":"color","value":{"fixedColor":"dark-orange","mode":"fixed"}}] }
|
|
]
|
|
},
|
|
"gridPos":{"h":7,"w":4,"x":0,"y":116},
|
|
"id":171,
|
|
"interval":"1s",
|
|
"options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"textMode":"auto","wideLayout":true},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"ip:in(${members:doublequote}) job:postgres | stats count() as count" , "legendFormat":"postgres" ,"queryType":"stats","refId":"A","step":"" },
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"ip:in(${members:doublequote}) job:syslog app:patroni | stats count() as count" ,"hide":false,"legendFormat":"patroni" ,"queryType":"stats","refId":"B" },
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"ip:in(${members:doublequote}) job:syslog app:pgbouncer | stats count() as count" ,"hide":false,"legendFormat":"pgbouncer" ,"queryType":"stats","refId":"C" },
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"ip:in(${members:doublequote}) job:pgbackrest | stats count() as count" ,"hide":false,"legendFormat":"pgbackrest" ,"queryType":"stats","refId":"D" },
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"ip:in(${members:doublequote}) job:syslog app:in(\"pg_exporter\",\"pgbackrest_exporter\") | stats count() as count","hide":false,"legendFormat":"pgexporter" ,"queryType":"stats","refId":"E" },
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"ip:in(${members:doublequote}) job:syslog app:vip-manager | stats count() as count" ,"hide":false,"legendFormat":"vip-manager","queryType":"stats","refId":"F" }
|
|
],
|
|
"title":"Total Logs",
|
|
"type":"stat"
|
|
},
|
|
{
|
|
"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
|
|
"description":"PGSQL Logs Event",
|
|
"fieldConfig":{
|
|
"defaults":{
|
|
"color":{"fixedColor":"#346f36cc","mode":"palette-classic"},
|
|
"custom":{
|
|
"axisBorderShow":false,
|
|
"axisCenteredZero":false,
|
|
"axisColorMode":"text",
|
|
"axisLabel":"",
|
|
"axisPlacement":"auto",
|
|
"barAlignment":0,
|
|
"barWidthFactor":0.6,
|
|
"drawStyle":"bars",
|
|
"fillOpacity":100,
|
|
"gradientMode":"none",
|
|
"hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
|
|
"insertNulls":false,
|
|
"lineInterpolation":"linear",
|
|
"lineWidth":1,
|
|
"pointSize":5,
|
|
"scaleDistribution":{"type":"linear"},
|
|
"showPoints":"never",
|
|
"showValues":false,
|
|
"spanNulls":true,
|
|
"stacking":{"group":"A","mode":"normal"},
|
|
"thresholdsStyle":{"mode":"off"}
|
|
},
|
|
"decimals":0,
|
|
"mappings":[],
|
|
"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
|
|
"unit":"none"
|
|
},
|
|
"overrides":[{"matcher":{"id":"byName","options":"postgres"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]}]
|
|
},
|
|
"gridPos":{"h":7,"w":20,"x":4,"y":116},
|
|
"id":185,
|
|
"interval":"1s",
|
|
"options":{"legend":{"calcs":["sum"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"ip:in(${members:doublequote}) job:postgres | stats count() as count" , "legendFormat":"postgres" ,"queryType":"statsRange","refId":"A" },
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:pgbackrest ip:in(${members:doublequote})\n| stats count() as count" ,"hide":false,"legendFormat":"pgbackrest","queryType":"statsRange","refId":"B" },
|
|
{ "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:syslog ip:in(${members:doublequote})\napp:in(\"postgres\", \"patroni\", \"pgbouncer\", \"pg_exporter\", \"pgbouncer_exporter\", \"pgbackrest_exporter\", \"vip-manager\") \n| stats by (app) count() as count","hide":false,"legendFormat":"{{ app }}" ,"queryType":"statsRange","refId":"C" }
|
|
],
|
|
"title":"PG Logs",
|
|
"type":"timeseries"
|
|
},
|
|
{
|
|
"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
|
|
"description":"",
|
|
"gridPos":{"h":18,"w":12,"x":0,"y":123},
|
|
"id":173,
|
|
"options":{"dedupStrategy":"none","detailsMode":"sidebar","enableInfiniteScrolling":true,"enableLogDetails":true,"fontSize":"small","prettifyLogMessage":false,"showCommonLabels":false,"showControls":true,"showLabels":true,"showTime":true,"sortOrder":"Descending","syntaxHighlighting":false,"wrapLogMessage":false},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:postgres ip:in(${members:doublequote}) \n| fields level,ins,_msg","instant":false,"legendFormat":"{{ src }}","queryType":"instant","range":true,"refId":"A"}],
|
|
"type":"logs"
|
|
},
|
|
{
|
|
"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
|
|
"description":"syslog from \"postgres\", \"patroni\", \"pgbouncer\", \"pg_exporter\", \"pgbouncer_exporter\", \"pgbackrest_exporter\", \"vip-manager\"",
|
|
"gridPos":{"h":18,"w":12,"x":12,"y":123},
|
|
"id":186,
|
|
"options":{"dedupStrategy":"none","detailsMode":"sidebar","enableInfiniteScrolling":true,"enableLogDetails":true,"fontSize":"small","prettifyLogMessage":false,"showCommonLabels":false,"showControls":true,"showLabels":true,"showTime":true,"sortOrder":"Descending","syntaxHighlighting":false,"wrapLogMessage":false},
|
|
"pluginVersion":"12.3.1",
|
|
"targets":[{"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:syslog ip:in(${members:doublequote}) \napp:in(\"postgres\", \"patroni\", \"pgbouncer\", \"pg_exporter\", \"pgbouncer_exporter\", \"pgbackrest_exporter\", \"vip-manager\") \n| fields level, unit, _msg","instant":false,"legendFormat":"{{ src }}","queryType":"instant","range":true,"refId":"A"}],
|
|
"title":"PGSQL syslog",
|
|
"type":"logs"
|
|
}
|
|
],
|
|
"preload":false,
|
|
"refresh":"",
|
|
"schemaVersion":42,
|
|
"tags":["Pigsty","PGSQL","Cluster"],
|
|
"templating":{
|
|
"list":[
|
|
{
|
|
"current":{},
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"definition":"label_values(pg_up, cls)",
|
|
"description":"Cluster identifier for this postgres instance, cls should be unique among entire environment. such as pg-meta, pg-test",
|
|
"includeAll":false,
|
|
"label":"Cluster",
|
|
"name":"cls",
|
|
"options":[],
|
|
"query":{"query":"label_values(pg_up, cls)","refId":"StandardVariableQuery"},
|
|
"refresh":2,
|
|
"regex":"",
|
|
"sort":1,
|
|
"type":"query"
|
|
},{
|
|
"current":{},
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"definition":"label_values(pg:cls:leader{cls=\"$cls\"}, ins)",
|
|
"description":"Unique instance identifier (e.g pg-meta-1)",
|
|
"hide":2,
|
|
"includeAll":false,
|
|
"label":"Primary",
|
|
"name":"primary",
|
|
"options":[],
|
|
"query":{"query":"label_values(pg:cls:leader{cls=\"$cls\"}, ins)","refId":"StandardVariableQuery"},
|
|
"refresh":2,
|
|
"regex":"",
|
|
"sort":1,
|
|
"type":"query"
|
|
},{
|
|
"allowCustomValue":false,
|
|
"current":{},
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"definition":"label_values(pg_up{cls=\"$cls\"}, ip)",
|
|
"description":"Unique instance identifier (e.g pg-meta-1)",
|
|
"hide":2,
|
|
"includeAll":true,
|
|
"label":"Primary",
|
|
"multi":true,
|
|
"name":"members",
|
|
"options":[],
|
|
"query":{"query":"label_values(pg_up{cls=\"$cls\"}, ip)","refId":"StandardVariableQuery"},
|
|
"refresh":2,
|
|
"regex":"",
|
|
"sort":1,
|
|
"type":"query"
|
|
},{
|
|
"current":{},
|
|
"datasource":{"type":"prometheus","uid":"ds-prometheus"},
|
|
"definition":"label_values(node_load1{ip=~\"$members\"},cls)",
|
|
"description":"Node Cluster Identifier",
|
|
"hide":2,
|
|
"includeAll":false,
|
|
"label":"Node Cluster",
|
|
"name":"node_cls",
|
|
"options":[],
|
|
"query":{"query":"label_values(node_load1{ip=~\"$members\"},cls)","refId":"PrometheusVariableQueryEditor-VariableQuery"},
|
|
"refresh":2,
|
|
"regex":"",
|
|
"sort":1,
|
|
"type":"query"
|
|
}
|
|
]
|
|
},
|
|
"time":{"from":"now-1h","to":"now"},
|
|
"timepicker":{},
|
|
"timezone":"browser",
|
|
"title":"PGSQL Cluster",
|
|
"uid":"pgsql-cluster",
|
|
"version":1,
|
|
"weekStart":""
|
|
} |