{
  "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":"Pigsty Grafana Overview",
  "editable":true,
  "fiscalYearStartMonth":0,
  "graphTooltip":0,
  "id":null,
  "license":"https://pigsty.io/docs/about/license/",
  "links":[{"asDropdown":true,"icon":"external link","includeVars":false,"keepTime":true,"tags":["Pigsty","INFRA"],"targetBlank":false,"title":"INFRA","tooltip":"","type":"dashboards","url":""}],
  "panels":[
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":200,"panels":[],"title":"Overview","type":"row"},
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#f79f64","value":0}]}},"overrides":[{"matcher":{"id":"byName","options":"IP"},"properties":[{"id":"links","value":[{"title":"Node Instance : $ip","url":"/d/node-instance?var-id=${ip}&${__url_time_range}"}]}]}]},
      "gridPos":{"h":6,"w":5,"x":0,"y":1},
      "id":201,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"/.*/","values":true},"showPercentChange":false,"text":{"titleSize":16,"valueSize":16},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_build_info{ins=\"$ins\"}","format":"table","instant":true,"legendFormat":"__auto","range":false,"refId":"A"}],
      "transformations":[
        {
          "id":"organize",
          "options":{
            "excludeByName":{"Time":true,"Value":true,"__name__":true,"cls":true,"edition":true,"goversion":true,"job":true,"revision":true,"short_version":false,"version":true},
            "includeByName":{},
            "indexByName":{"Time":5,"Value":9,"__name__":6,"cls":3,"ins":0,"instance":1,"ip":2,"job":7,"short_version":4,"version":8},
            "renameByName":{"Value":"","branch":"Branch","cls":"Cluster","ins":"Instance","instance":"Address","ip":"IP","job":"","short_version":"Version"}
          }
        }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"All Grafana instances",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#e3e3e3e0","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Instance"}  ,"properties":[{"id":"links","value":[{"title":"Grafana Instance ${__data.fields.Instance}","url":"/d/grafana-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":"Up"}        ,"properties":[{"id":"custom.width","value":50},{"id":"mappings","value":[{"options":{"0":{"color":"#cc4637d9","index":0,"text":"Dead"},"1":{"color":"#346f36cc","index":1,"text":"Alive"}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-background"}}]                                                                        },
          { "matcher":{"id":"byName","options":"Dashboards"},"properties":[{"id":"custom.width","value":100},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":10},{"color":"#fcdb72","value":100}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]                                                    },
          { "matcher":{"id":"byName","options":"Users"}     ,"properties":[{"id":"custom.width","value":80},{"id":"unit","value":"short"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":1},{"color":"#fcdb72","value":10}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}]                                                       },
          { "matcher":{"id":"byName","options":"Memory"}    ,"properties":[{"id":"custom.width","value":80},{"id":"unit","value":"bytes"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":134217728},{"color":"#fcdb72","value":536870912},{"color":"#f79f64","value":1073741824}]}},{"id":"custom.cellOptions","value":{"type":"color-text"}}] },
          { "matcher":{"id":"byName","options":"Start Time"},"properties":[{"id":"unit","value":"dateTimeFromNow"}]                                                                                                                                                                                                                                                                                               }
        ]
      },
      "gridPos":{"h":6,"w":15,"x":5,"y":1},
      "id":202,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"Instance"}]},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,ip) (up{cls=\"grafana\"})"                        ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"A" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins) (process_start_time_seconds{cls=\"grafana\"})"   ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"B" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (grafana_stat_totals_dashboard)"                 ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"C" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (grafana_stat_total_users)"                      ,"format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"D" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (ins) (process_resident_memory_bytes{cls=\"grafana\"})","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"E" }
      ],
      "transformations":[
        {"id":"seriesToColumns","options":{"byField":"ins"}},
        {
          "id":"organize",
          "options":{
            "excludeByName":{"Time":true,"Time 1":true,"Time 2":true,"Time 3":true,"Time 4":true,"Time 5":true,"Value #B":true},
            "includeByName":{},
            "indexByName":{"Time 1":7,"Time 2":8,"Time 3":9,"Time 4":10,"Time 5":11,"Value #A":0,"Value #B":6,"Value #C":3,"Value #D":4,"Value #E":5,"ins":1,"ip":2},
            "renameByName":{"Value #A":"Up","Value #B":"Start Time","Value #C":"Dashboards","Value #D":"Users","Value #E":"Memory","ins":"Instance","ip":"IP"}
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"fixedColor":"#f79f64","mode":"fixed"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":30,
            "gradientMode":"none",
            "hideFrom":{"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"never",
            "showValues":false,
            "spanNulls":true,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#f79f64","value":0}]},
          "unit":"short"
        },
        "overrides":[]
      },
      "gridPos":{"h":6,"w":4,"x":20,"y":1},
      "id":203,
      "options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":false},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"sum(grafana_stat_active_sessions{ins=~\"$ins\"})","format":"time_series","intervalFactor":1,"legendFormat":"Active Sessions","range":true,"refId":"A"}],
      "title":"Active Sessions",
      "type":"timeseries"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":7},"id":16,"panels":[],"title":"Stats","type":"row"},
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"thresholds"},
          "decimals":2,
          "links":[],
          "mappings":[{"options":{"-1":{"color":"gray","index":1,"text":"N/A"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"gray","index":0,"text":"No Data"}},"type":"special"}],
          "thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#346f36cc","value":0.1},{"color":"#F2CC0C","value":0.3},{"color":"#f79f64","value":0.5},{"color":"#E02F44","value":0.7},{"color":"#b783af","value":0.9},{"color":"text","value":1}]},
          "unit":"percentunit"
        },
        "overrides":[]
      },
      "gridPos":{"h":4,"w":3,"x":0,"y":8},
      "id":103,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"rate(process_cpu_seconds_total{ins=\"$ins\"}[1m])","interval":"","legendFormat":"CPU","range":true,"refId":"A"}],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"match":"null","result":{"text":"N/A"}},"type":"special"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},"unit":"decbytes"},"overrides":[]},
      "gridPos":{"h":4,"w":3,"x":3,"y":8},
      "id":87,
      "maxDataPoints":100,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"process_resident_memory_bytes{ins=\"$ins\"}","format":"time_series","intervalFactor":2,"legendFormat":"Memory","range":true,"refId":"B","step":40}],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"match":"null","result":{"text":"N/A"}},"type":"special"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},"unit":"none"},"overrides":[]},
      "gridPos":{"h":4,"w":3,"x":6,"y":8},
      "id":98,
      "maxDataPoints":100,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"process_open_fds{ins=\"$ins\"}","format":"time_series","intervalFactor":2,"legendFormat":"Open FD","range":true,"refId":"B","step":40}],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{"defaults":{"color":{"mode":"thresholds"},"mappings":[{"options":{"match":"null","result":{"text":"N/A"}},"type":"special"}],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},"unit":"reqps"},"overrides":[]},
      "gridPos":{"h":4,"w":3,"x":9,"y":8},
      "id":219,
      "maxDataPoints":100,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"sum(rate(grafana_http_request_duration_seconds_count{ins=\"$ins\"}[1m]))","format":"time_series","intervalFactor":2,"legendFormat":"QPS","range":true,"refId":"B","step":40}],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"mappings":[],"max":2.5,"min":0,"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance : $primary","url":"/d/pgsql-instance?var-ins=$primary&${__url_time_range}"}]}]       },{ "matcher":{"id":"byName","options":"Service"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Service : $cls-primary","url":"/d/pgsql-service?var-svc=$cls-primary&${__url_time_range}"}]}] },
          { "matcher":{"id":"byName","options":"Proxy"}   ,"properties":[{"id":"links","value":[{"title":"PGSQL Proxy : $primary","url":"/d/pgsql-proxy?var-ins=$primary&${__url_time_range}"}]}]             },{ "matcher":{"id":"byName","options":"Database"},"properties":[{"id":"links","value":[{"title":"PGSQL Databases : $cls","url":"/d/pgsql-databases?var-cls=$cls&${__url_time_range}"}]}]             }
        ]
      },
      "gridPos":{"h":4,"w":12,"x":12,"y":8},
      "id":76,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"center","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":14,"valueSize":18},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_stat_totals_folder{ins=\"$ins\"}"   ,"hide":false,"instant":true,"interval":"","legendFormat":"Folders"      ,"queryType":"measurements","refId":"A" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_stat_totals_dashboard{ins=\"$ins\"}","hide":false,"instant":true,"interval":"","legendFormat":"Dashboards"   ,"queryType":"measurements","refId":"B" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_stat_total_orgs{ins=\"$ins\"}"      ,"hide":false,"instant":true,"interval":"","legendFormat":"Organizations","queryType":"measurements","refId":"D" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_stat_total_users{ins=\"$ins\"}"     ,"hide":false,"instant":true,"interval":"","legendFormat":"Users"        ,"queryType":"measurements","refId":"C" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_stat_active_users{ins=\"$ins\"}"    ,"hide":false,"instant":true,"interval":"","legendFormat":"Active User"  ,"queryType":"measurements","refId":"E" }
      ],
      "type":"stat"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":12},"id":83,"panels":[],"title":"Grafana Log","type":"row"},
    {
      "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"fixedColor":"#346f36cc","mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"bars",
            "fillOpacity":100,
            "gradientMode":"none",
            "hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"never",
            "showValues":false,
            "spanNulls":true,
            "stacking":{"group":"A","mode":"normal"},
            "thresholdsStyle":{"mode":"off"}
          },
          "decimals":0,
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
          "unit":"none"
        },
        "overrides":[]
      },
      "gridPos":{"h":4,"w":24,"x":0,"y":13},
      "id":104,
      "interval":"1s",
      "options":{"legend":{"calcs":["sum"],"displayMode":"table","placement":"right","showLegend":false},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:syslog ip:$ip app:grafana| stats count() as count","legendFormat":"syslog","queryType":"statsRange","refId":"A"}],
      "type":"timeseries"
    },
    {
      "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
      "description":"syslog of grafana-server in $ins @ $ip",
      "gridPos":{"h":14,"w":24,"x":0,"y":17},
      "id":18,
      "maxDataPoints":100,
      "options":{"dedupStrategy":"none","detailsMode":"sidebar","enableInfiniteScrolling":true,"enableLogDetails":true,"fontSize":"small","prettifyLogMessage":false,"showCommonLabels":true,"showControls":true,"showLabels":true,"showTime":true,"sortOrder":"Descending","syntaxHighlighting":true,"wrapLogMessage":false},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:syslog ip:$ip app:grafana","queryType":"range","refId":"A"}],
      "type":"logs"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":31},"id":102,"panels":[],"title":"Grafana API","type":"row"},
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}
        },
        "overrides":[]
      },
      "gridPos":{"h":9,"w":24,"x":0,"y":32},
      "id":69,
      "options":{"legend":{"calcs":["mean"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"desc"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"sum by (method, handler) (rate(grafana_http_request_duration_seconds_count{ins=\"$ins\"}[1m]))","legendFormat":"{{ method }} {{ handler }}","range":true,"refId":"A"}],
      "title":"Grafana API QPS",
      "type":"timeseries"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":41},"id":91,"panels":[],"title":"Data Sources","type":"row"},
    {
      "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":"byName","options":"Instance"},"properties":[{"id":"links","value":[{"title":"PGSQL Instance : $primary","url":"/d/pgsql-instance?var-ins=$primary&${__url_time_range}"}]}]       },{ "matcher":{"id":"byName","options":"Service"} ,"properties":[{"id":"links","value":[{"title":"PGSQL Service : $cls-primary","url":"/d/pgsql-service?var-svc=$cls-primary&${__url_time_range}"}]}] },
          { "matcher":{"id":"byName","options":"Proxy"}   ,"properties":[{"id":"links","value":[{"title":"PGSQL Proxy : $primary","url":"/d/pgsql-proxy?var-ins=$primary&${__url_time_range}"}]}]             },{ "matcher":{"id":"byName","options":"Database"},"properties":[{"id":"links","value":[{"title":"PGSQL Databases : $cls","url":"/d/pgsql-databases?var-cls=$cls&${__url_time_range}"}]}]             }
        ]
      },
      "gridPos":{"h":5,"w":24,"x":0,"y":42},
      "id":77,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"center","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":16,"valueSize":14},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_stat_totals_datasource{ins=\"$ins\"}","hide":false,"instant":true,"interval":"","legendFormat":"{{ plugin_id }}","queryType":"measurements","refId":"A"}],
      "title":"Data Sources",
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"footer":{"reducers":[]},"inspect":false},"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Signature"},"properties":[{"id":"custom.width","value":100},{"id":"mappings","value":[{"options":{"unsigned":{"color":"semi-dark-orange","index":1},"valid":{"color":"dark-green","index":0}},"type":"value"}]},{"id":"custom.cellOptions","value":{"type":"color-text"}}] },
          { "matcher":{"id":"byName","options":"Version"}  ,"properties":[{"id":"custom.width","value":100}]                                                                                                                                                                                                               },
          { "matcher":{"id":"byName","options":"Type"}     ,"properties":[{"id":"custom.width","value":120}]                                                                                                                                                                                                               }
        ]
      },
      "gridPos":{"h":25,"w":10,"x":0,"y":47},
      "id":89,
      "options":{"cellHeight":"sm","showHeader":true,"sortBy":[{"desc":false,"displayName":"plugin_type"}]},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"grafana_plugin_build_info{ins=\"$ins\"}","format":"table","instant":true,"range":false,"refId":"A"}],
      "title":"Grafana Plugins",
      "transformations":[
        {
          "id":"organize",
          "options":{"excludeByName":{"Time":true,"Value":true,"__name__":true,"cls":true,"ins":true,"instance":true,"ip":true,"job":true,"type":true},"indexByName":{"Time":0,"Value":10,"__name__":1,"instance":2,"ip":3,"job":4,"plugin_id":5,"plugin_type":6,"signature_status":7,"type":9,"version":8},"renameByName":{"plugin_id":"Name","plugin_type":"Type","signature_status":"Signature","type":"","version":"Version"}}
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}
        },
        "overrides":[]
      },
      "gridPos":{"h":5,"w":14,"x":10,"y":47},
      "id":95,
      "options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"rate(grafana_plugin_request_total{ins=\"$ins\"}[1m])","legendFormat":"{{ plugin_id }}.{{ endpoint }}","range":true,"refId":"A"}],
      "title":"Plugin QPS",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
          "unit":"ms"
        },
        "overrides":[]
      },
      "gridPos":{"h":5,"w":14,"x":10,"y":52},
      "id":96,
      "options":{"legend":{"calcs":[],"displayMode":"list","placement":"bottom","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"increase(grafana_plugin_request_duration_milliseconds_sum{ins=\"$ins\"}[1m]) /\nincrease(grafana_plugin_request_duration_milliseconds_count{ins=\"$ins\"}[1m])","legendFormat":"{{ plugin_id }}.{{ endpoint }}","range":true,"refId":"A"}],
      "title":"Plugin RT",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0},{"color":"red","value":80}]}
        },
        "overrides":[]
      },
      "gridPos":{"h":5,"w":14,"x":10,"y":57},
      "id":93,
      "options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"rate(grafana_datasource_request_total{ins=\"$ins\"}[1m])","legendFormat":"{{ datasource }}:{{ method }}:{{ code }}","range":true,"refId":"A"}],
      "title":"Data Source QPS",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
          "unit":"s"
        },
        "overrides":[]
      },
      "gridPos":{"h":5,"w":14,"x":10,"y":62},
      "id":94,
      "options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"increase(grafana_datasource_request_duration_seconds_sum{ins=\"$ins\"}[1m]) / increase(grafana_datasource_request_duration_seconds_count{ins=\"$ins\"}[1m])","legendFormat":"{{ datasource }}{{ datasource }}:{{ method }}:{{ code }}","range":true,"refId":"A"}],
      "title":"Data Source RT",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineWidth":1,
            "pointSize":5,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "thresholds":{"mode":"absolute","steps":[{"color":"#346f36cc","value":0}]},
          "unit":"decbytes"
        },
        "overrides":[]
      },
      "gridPos":{"h":5,"w":14,"x":10,"y":67},
      "id":97,
      "options":{"legend":{"calcs":[],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"single","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","expr":"increase(grafana_datasource_response_size_bytes_sum{ins=\"$ins\"}[1m]) / increase(grafana_datasource_response_size_bytes_count{ins=\"$ins\"}[1m])","legendFormat":"{{ datasource }}{{ datasource }}:{{ method }}:{{ code }}","range":true,"refId":"A"}],
      "title":"Data Source Batch Size",
      "type":"timeseries"
    }
  ],
  "preload":false,
  "refresh":"",
  "schemaVersion":42,
  "tags":["Pigsty","INFRA","Overview"],
  "templating":{
    "list":[
      { "current":{},"datasource":{"type":"prometheus","uid":"ds-prometheus"},"definition":"label_values(grafana_build_info, ins)"             ,"description":"Grafana Instance"             ,         "includeAll":false,"label":"Grafana","name":"ins","options":[],"query":{"query":"label_values(grafana_build_info, ins)","refId":"StandardVariableQuery"}             ,"refresh":2,"regex":"","type":"query" },
      { "current":{},"datasource":{"type":"prometheus","uid":"ds-prometheus"},"definition":"label_values(grafana_build_info{ins=\"$ins\"}, ip)","description":"Corresponding Node IP address","hide":2,"includeAll":false,"label":"IP"     ,"name":"ip" ,"options":[],"query":{"query":"label_values(grafana_build_info{ins=\"$ins\"}, ip)","refId":"StandardVariableQuery"},"refresh":2,"regex":"","type":"query" }
    ]
  },
  "time":{"from":"now-1h","to":"now"},
  "timepicker":{"refresh_intervals":["2s","5s","10s","30s","1m","5m","15m","30m","1h","2h","1d"]},
  "timezone":"browser",
  "title":"Grafana Instance",
  "uid":"grafana-instance",
  "version":1,
  "weekStart":""
}