{
  "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 Home Dashboards",
  "editable":true,
  "fiscalYearStartMonth":0,
  "graphTooltip":0,
  "id":null,
  "license":"https://pigsty.io/docs/about/license/",
  "links":[
    { "asDropdown":true,"icon":"dashboard","includeVars":false,"keepTime":false,"tags":["PGSQL"]         ,"targetBlank":false,"title":"PGSQL" ,"tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"dashboard","includeVars":false,"keepTime":false,"tags":["NODE"]          ,"targetBlank":false,"title":"NODE"  ,"tooltip":"","type":"dashboards","url":"" },
    { "asDropdown":true,"icon":"dashboard","includeVars":false,"keepTime":true ,"tags":["Pigsty","INFRA"],"targetBlank":false,"title":"INFRA" ,"tooltip":"","type":"dashboards","url":"" },{ "asDropdown":true,"icon":"dashboard","includeVars":false,"keepTime":false,"tags":["Pigsty","HOME"] ,"targetBlank":false,"title":"Module","tooltip":"","type":"dashboards","url":"" }
  ],
  "panels":[
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"palette-classic"},"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"Home"}    ,"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"links","value":[{"targetBlank":true,"title":"Pigsty Homepage","url":"../../"}]}]                             },
          { "matcher":{"id":"byName","options":"Nginx"}   ,"properties":[{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}},{"id":"links","value":[{"title":"Nginx Overview","url":"/d/nginx-instance?${__url_time_range}"}]}]                },
          { "matcher":{"id":"byName","options":"Metrics"} ,"properties":[{"id":"links","value":[{"targetBlank":true,"title":"Victoria Metrics UI","url":"/vmetrics/vmui/"}]},{"id":"color","value":{"fixedColor":"#e02f44bf","mode":"fixed"}}]              },
          { "matcher":{"id":"byName","options":"Alerting"},"properties":[{"id":"links","value":[{"targetBlank":true,"title":"Pigsty alerting service: Alertmanager","url":"/alertmgr/"}]},{"id":"color","value":{"fixedColor":"#e02f44d9","mode":"fixed"}}] },
          { "matcher":{"id":"byName","options":"Logs"}    ,"properties":[{"id":"links","value":[{"targetBlank":true,"title":"Victoria Logs UI","url":"/vlogs/select/vmui/"}]},{"id":"color","value":{"fixedColor":"#d9a637d9","mode":"fixed"}}]             },
          { "matcher":{"id":"byName","options":"Grafana"} ,"properties":[{"id":"color","value":{"fixedColor":"#db6e37ed","mode":"fixed"}},{"id":"links","value":[{"title":"Grafana Overview","url":"/d/grafana-instance?${__url_time_range}"}]}]            },
          { "matcher":{"id":"byName","options":"Docs"}    ,"properties":[{"id":"color","value":{"fixedColor":"#587591","mode":"fixed"}},{"id":"links","value":[{"targetBlank":true,"title":"Pigsty Docs","url":"https://pigsty.io/docs"}]}]                 }
        ]
      },
      "gridPos":{"h":7,"w":4,"x":0,"y":0},
      "id":54,
      "links":[{"title":"Pigsty Docs","url":"https://pigsty.io/docs"}],
      "options":{"colorMode":"background","graphMode":"none","justifyMode":"center","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":10,"valueSize":12},"textMode":"name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"1"                            ,"format":"time_series","hide":false,"instant":false,"interval":"","legendFormat":"Home"    ,"queryType":"measurements","refId":"G" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"1"                            ,"format":"time_series","hide":false,"instant":false,"interval":"","legendFormat":"Docs"    ,"queryType":"measurements","refId":"F" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(up{cls=\"nginx\"})"       ,"format":"time_series","hide":false,"instant":false,"interval":"","legendFormat":"Nginx"   ,"queryType":"measurements","refId":"B" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(up{cls=\"vlogs\"})"       ,"format":"time_series","hide":false,"instant":false,"interval":"","legendFormat":"Logs"    ,"queryType":"measurements","refId":"A" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(up{cls=\"vmetrics\"})"    ,"format":"time_series","hide":false,"instant":false,"interval":"","legendFormat":"Metrics" ,"queryType":"measurements","refId":"D" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(up{cls=\"grafana\"})"     ,"format":"time_series","hide":true ,"instant":false,"interval":"","legendFormat":"Grafana" ,"queryType":"measurements","refId":"C" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(up{cls=\"alertmanager\"})","format":"time_series","hide":false,"instant":false,"interval":"","legendFormat":"Alerting","queryType":"measurements","refId":"E" }
      ],
      "title":"Pigsty ${version}",
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"links":[],"mappings":[],"thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]}},
        "overrides":[
          { "matcher":{"id":"byName","options":"NODE"} ,"properties":[{"id":"links","value":[{"title":"Node Overview","url":"/d/node-overview?${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"#e6b03ee6","mode":"fixed"}}]                                                      },
          { "matcher":{"id":"byName","options":"PGSQL"},"properties":[{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}},{"id":"links","value":[{"title":"PGSQL Overview","url":"/d/pgsql-overview?${__url_time_range}"}]}]                                                      },
          { "matcher":{"id":"byName","options":"INFRA"},"properties":[{"id":"links","value":[{"title":"Infra Overview","url":"/d/infra-overview?${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"#346f36cc","mode":"fixed"}}]                                                    },
          { "matcher":{"id":"byName","options":"REDIS"},"properties":[{"id":"links","value":[{"title":"Redis Overview","url":"/d/redis-overview?${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]                                                    },
          { "matcher":{"id":"byName","options":"ETCD"} ,"properties":[{"id":"color","value":{"fixedColor":"#5b9cd5","mode":"fixed"}},{"id":"links","value":[{"title":"ETCD Overview","url":"/d/etcd-overview?${__url_time_range}"}]}]                                                        },
          { "matcher":{"id":"byName","options":"MINIO"},"properties":[{"id":"color","value":{"fixedColor":"#d0475799","mode":"fixed"}},{"id":"links","value":[{"title":"Minio Overview","url":"/d/minio-overview?${__url_time_range}"}]}]                                                    },
          { "matcher":{"id":"byName","options":"MONGO"},"properties":[{"id":"color","value":{"fixedColor":"#806c52","mode":"fixed"}},{"id":"links","value":[{"title":"MongoDB Overview","url":"/d/mongo-overview?${__url_time_range}"}]}]                                                    },
          { "matcher":{"id":"byName","options":"MYSQL"},"properties":[{"id":"color","value":{"fixedColor":"#6a8d9d","mode":"fixed"}},{"id":"links","value":[{"title":"MySQL Overview","url":"/d/mysql-overview?${__url_time_range}"}]}]                                                      },
          { "matcher":{"id":"byName","options":"PGRDS"},"properties":[{"id":"links","value":[{"title":"PGRDS Clusters","url":"/d/pgrds-cluster?${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"#6986a3","mode":"fixed"}}]                                                       },
          { "matcher":{"id":"byName","options":"KAFKA"},"properties":[{"id":"color","value":{"fixedColor":"#4bb39ce0","mode":"fixed"}},{"id":"links","value":[{"title":"Kafka Cluster ${__field.labels.cls}","url":"/d/kafka-overview?var-cls=${__field.labels.cls}&${__url_time_range}"}]}] }
        ]
      },
      "gridPos":{"h":7,"w":4,"x":4,"y":0},
      "id":22,
      "links":[
        { "targetBlank":true,"title":"Module: PGSQL" ,"url":"https://pigsty.io/docs/pgsql"  },{ "targetBlank":true,"title":"Module: INFRA" ,"url":"https://pigsty.io/docs/infra"  },{ "targetBlank":true,"title":"Module: NODE"  ,"url":"https://pigsty.io/docs/node"   },{ "targetBlank":true,"title":"Module: ETCD"  ,"url":"https://pigsty.io/docs/etcd"   },
        { "targetBlank":true,"title":"Module: MinIO" ,"url":"https://pigsty.io/docs/minio"  },{ "targetBlank":true,"title":"Module: REDIS" ,"url":"https://pigsty.io/docs/redis"  },{ "targetBlank":true,"title":"Module: FERRET","url":"https://pigsty.io/docs/ferret" }
      ],
      "options":{"colorMode":"background","graphMode":"none","justifyMode":"center","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{"valueSize":16},"textMode":"name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"pgsql\"})","hide":false,"interval":"","legendFormat":"PGSQL","range":true,"refId":"A" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"pgrds\"})","hide":true ,"interval":"","legendFormat":"PGRDS","range":true,"refId":"R" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"mysql\"})","hide":false,"interval":"","legendFormat":"MYSQL","range":true,"refId":"M" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"redis\"})","hide":false,"interval":"","legendFormat":"REDIS","range":true,"refId":"B" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"node\"})" ,"hide":false,"interval":"","legendFormat":"NODE" ,"range":true,"refId":"C" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"minio\"})","hide":false,"interval":"","legendFormat":"MINIO","range":true,"refId":"E" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"etcd\"})" ,"hide":false,"interval":"","legendFormat":"ETCD" ,"range":true,"refId":"D" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"mongo\"})","hide":false,"interval":"","legendFormat":"MONGO","range":true,"refId":"F" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"kafka\"})","hide":false,"interval":"","legendFormat":"KAFKA","range":true,"refId":"G" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"count(up{job=\"infra\"})","hide":false,"interval":"","legendFormat":"INFRA","range":true,"refId":"X" }
      ],
      "title":"Modules",
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"Click instance to view the detailed dashboard. \n\nBlue: PostgreSQL\n\nRed: Redis\n\nAmber: Node\n\nAzure: etcd\n\nPink: MinIO\n\nGreen: Infra",
      "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":"#1f3347","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":"#65231b","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":"C"}       ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#3e3012","value":0},{"color":"#e6b03ee6","value":1}]}},{"id":"links","value":[{"title":"Node Instance : ${__field.labels.ip}","url":"/d/node-instance?var-id=${__field.labels.ins}&${__url_time_range}"}]}]                                },
          { "matcher":{"id":"byFrameRefID","options":"D"}       ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#324e64","value":0},{"color":"#5b9cd5","value":1}]}},{"id":"links","value":[{"title":"ETCD Overview","url":"/d/etcd-overview?${__url_time_range}"}]}]                                                                                      },
          { "matcher":{"id":"byFrameRefID","options":"E"}       ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#561c24","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":"F"}       ,"properties":[{"id":"color"},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#342c22","value":0},{"color":"#806c52","value":1}]}},{"id":"links","value":[{"title":"MongoDB Instance : ${__field.labels.ins}","url":"/d/mongo-overview?var-ins=${__field.labels.ins}&${__url_time_range}"}]}]             },
          { "matcher":{"id":"byFrameRefID","options":"M"}       ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#252f34","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":"R"}       ,"properties":[{"id":"links","value":[{"title":"PGRDS Instance: ${__field.labels.ins}","url":"/d/pgrds-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]},{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#1c232a","value":0},{"color":"#6986a3","value":1}]}}]                               },
          { "matcher":{"id":"byFrameRefID","options":"K"}       ,"properties":[{"id":"color","value":{"fixedColor":"#4bb39ce0","mode":"fixed"}},{"id":"links","value":[{"title":"Kafka Instance ${__field.labels.ins}","url":"/d/kafka-instance?var-ins=${__field.labels.ins}&${__url_time_range}"}]}]                                                                                     },
          { "matcher":{"id":"byFrameRefID","options":"NGINX"}   ,"properties":[{"id":"thresholds","value":{"mode":"absolute","steps":[{"color":"#152c16","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":"#3d2a1d","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":"#2a1414","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":"#2e1d14","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":"#31221a","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":"#2c161b","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":"#361c1c","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}"}]}]                }
        ]
      },
      "gridPos":{"h":20,"w":12,"x":8,"y":0},
      "id":27,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["lastNotNull"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins) (up{job=\"pgsql\"})"                                                ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"A"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins) (pg_up{job=\"pgrds\"})"                                             ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"R"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins) (up{job=\"mysql\"}) * min by (ins) (mysql_up{job=\"mysql\"})"       ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"M"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins) (redis_up{job=\"redis\"})"                                          ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"B"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,instance) (up{job=\"mongo\"})"                                       ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"F"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins) (up{job=\"node\"})"                                                 ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"C"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,instance) (up{job=\"kafka\"})"                                       ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"K"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"max by (ins) (up{cls=\"nginx\"})"                                                ,"format":"time_series","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\"})"                                              ,"format":"time_series","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\"})"                                             ,"format":"time_series","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\"})"                                                ,"format":"time_series","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\"})"                                              ,"format":"time_series","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\"})"                                              ,"format":"time_series","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\"})"                                         ,"format":"time_series","hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"ALERTMGR" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (instance) (up{job!~\"(node|infra|etcd|pgsql|redis|minio|kafka|pgrds)\"})",                       "hide":true ,"instant":true,"interval":"","legendFormat":"{{ instance }}","refId":"Z"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,instance) (up{job=\"minio\"})"                                       ,                       "hide":false,"instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"E"        },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (ins,instance) (up{job=\"etcd\"})"                                        ,                                    "instant":true,"interval":"","legendFormat":"{{ ins }}"     ,"refId":"D"        }
      ],
      "title":"Instances",
      "type":"stat"
    },
    {"gridPos":{"h":4,"w":4,"x":20,"y":0},"id":51,"options":{"includeVars":false,"keepTime":false,"maxItems":50,"query":"","showFolderNames":true,"showHeadings":false,"showRecentlyViewed":false,"showSearch":true,"showStarred":false,"tags":["APP","Overview"]},"pluginVersion":"12.3.0","title":"Apps","type":"dashlist"},
    {"gridPos":{"h":16,"w":4,"x":20,"y":4},"id":10,"options":{"includeVars":false,"keepTime":false,"maxItems":50,"query":"","showFolderNames":true,"showHeadings":false,"showRecentlyViewed":false,"showSearch":true,"showStarred":false,"tags":["Pigsty"]},"pluginVersion":"12.3.0","title":"Dashboards","type":"dashlist"},
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"thresholds"},
          "decimals":1,
          "links":[{"title":"PGSQL Cluster ${__field.labels.cls}","url":"/d/pgsql-cluster?var-cls=${__field.labels.cls}&${__url_time_range}"}],
          "mappings":[{"options":{"-1":{"color":"gray","index":1,"text":"N/A"}},"type":"value"},{"options":{"match":"null+nan","result":{"color":"#3e668f","index":0,"text":"No Clusters"}},"type":"special"}],
          "min":0,
          "thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0}]},
          "unit":"percentunit"
        },
        "overrides":[
          {"matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"title":"PGSQL Cluster ${__field.labels.cls}","url":"/d/pgsql-cluster?var-cls=${__field.labels.cls}&${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"#3e668f","mode":"fixed"}}]},
          {"matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"Redis Cluster ${__field.labels.cls}","url":"/d/redis-cluster?var-cls=${__field.labels.cls}&${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"#cc4637d9","mode":"fixed"}}]},
          {"matcher":{"id":"byFrameRefID","options":"C"},"properties":[{"id":"links","value":[{"title":"Node Cluster : ${__field.labels.cls}","url":"/d/node-cluster?var-cls=${__field.labels.cls}&${__url_time_range}"}]},{"id":"color","value":{"fixedColor":"#e6b03ee6","mode":"fixed"}}]},
          {
            "matcher":{"id":"byFrameRefID","options":"D"},
            "properties":[
              { "id":"color"     ,"value":{"fixedColor":"#5b9cd5","mode":"thresholds"}                                                                                                           },{ "id":"links"     ,"value":[{"title":"ETCD Overview","url":"/d/etcd-overview?${__url_time_range}"}]                                                                               },
              { "id":"thresholds","value":{"mode":"absolute","steps":[{"color":"text","value":0},{"color":"#b783af","value":0.5},{"color":"red","value":0.66666},{"color":"#5b9cd5","value":1}]} },{ "id":"decimals"  ,"value":0                                                                                                                                                      },
              { "id":"mappings"  ,"value":[{"options":{"0":{"color":"text","index":1,"text":"Dead"},"1":{"color":"#5b9cd5","index":0,"text":"Healthy"}},"type":"value"}]                         }
            ]
          },
          {"matcher":{"id":"byFrameRefID","options":"E"},"properties":[{"id":"color","value":{"fixedColor":"#d0475799","mode":"fixed"}},{"id":"links","value":[{"title":"Minio Overview","url":"/d/minio-overview?${__url_time_range}"}]}]},
          {"matcher":{"id":"byFrameRefID","options":"R"},"properties":[{"id":"color","value":{"fixedColor":"#6986a3","mode":"fixed"}},{"id":"unit","value":"tps"},{"id":"decimals","value":0},{"id":"links","value":[{"title":"PGRDS Cluster : ${__field.labels.cls}","url":"/d/pgrds-cluster?var-cls=${__field.labels.cls}&${__url_time_range}"}]}]},
          {"matcher":{"id":"byFrameRefID","options":"K"},"properties":[{"id":"color"},{"id":"mappings","value":[{"options":{"0":{"color":"#193e36e0","index":0,"text":"Down"},"1":{"color":"#4bb39ce0","index":1,"text":"Alive"}},"type":"value"}]},{"id":"links","value":[{"title":"Kafka Cluster : ${__field.labels.cls}","url":"/d/kafka-overview?var-cls=${__field.labels.cls}&${__url_time_range}"}]}]}
        ]
      },
      "gridPos":{"h":13,"w":8,"x":0,"y":7},
      "id":30,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"auto","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"value_and_name","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"cls:pressure5{job=\"pgsql\"}"                                                ,"hide":false,"interval":"","legendFormat":"{{ cls }}","range":true,"refId":"A" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"pg:cls:xact_commit_rate5m{job=\"pgrds\"}"                                    ,"hide":false,"interval":"","legendFormat":"{{ cls }}","range":true,"refId":"R" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"redis:cls:cpu_usage{job=\"redis\"}"                                          ,"hide":false,"interval":"","legendFormat":"{{ cls }}","range":true,"refId":"B" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"node:cls:cpu_usage{job=\"node\"}"                                            ,"hide":false,"interval":"","legendFormat":"{{ cls }}","range":true,"refId":"C" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"avg by (cls) (rate(minio_node_process_cpu_total_seconds{job=\"minio\"}[1m]))","hide":false,"interval":"","legendFormat":"{{ cls }}","range":true,"refId":"E" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"min by (cls) (up{job=\"kafka\"})"                                            ,"hide":false,"interval":"","legendFormat":"{{ cls }}","range":true,"refId":"K" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum(etcd_up{job=\"etcd\"}) by (cls) / count(etcd_up{job=\"etcd\"}) by (cls)" ,"hide":false,"interval":"","legendFormat":"{{ cls }}","range":true,"refId":"D" }
      ],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"decimals":0,"links":[],"mappings":[],"max":1,"min":0,"noValue":"OK","thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":4},{"color":"#b783af","value":8},{"color":"text","value":16}]},"unit":"none"},
        "overrides":[{"matcher":{"id":"byFrameRefID","options":"A"},"properties":[{"id":"links","value":[{"targetBlank":true,"title":"Pigsty Alertmanager","url":"/alertmgr/"}]}]},{"matcher":{"id":"byFrameRefID","options":"B"},"properties":[{"id":"links","value":[{"title":"PGSQL Alert","url":"/d/pgsql-alert?${__url_time_range}"}]}]}]
      },
      "gridPos":{"h":8,"w":3,"x":0,"y":20},
      "id":49,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"count(ALERTS{alertstate=\"firing\"}) or on() vector(0)","interval":"","legendFormat":"Firing Alert","refId":"A"},{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"count(ALERTS{alertstate=\"pending\"})","hide":true,"interval":"","legendFormat":"Pending Alert","refId":"B"}],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"thresholds"},
          "decimals":0,
          "links":[{"targetBlank":true,"title":"AlertInfo ${__field.labels.alertname}","url":"/alertmgr/#/alerts?filter=%7Balertname%3D%22${__field.labels.alertname}%22%7D"}],
          "mappings":[],
          "max":1,
          "min":0,
          "noValue":"OK",
          "thresholds":{"mode":"absolute","steps":[{"color":"#3e668f","value":0},{"color":"#fcdb72","value":1},{"color":"#f79f64","value":2},{"color":"#b783af","value":4}]},
          "unit":"none"
        },
        "overrides":[]
      },
      "gridPos":{"h":8,"w":5,"x":3,"y":20},
      "id":47,
      "options":{"colorMode":"background","graphMode":"area","justifyMode":"auto","orientation":"horizontal","percentChangeColorMode":"standard","reduceOptions":{"calcs":["last"],"fields":"","values":false},"showPercentChange":false,"text":{"titleSize":12},"textMode":"auto","wideLayout":true},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"prometheus","uid":"ds-prometheus"},"exemplar":false,"expr":"count(ALERTS{alertstate=\"firing\"}) by (alertname, severity)","interval":"","legendFormat":"{{ alertname }}","refId":"A"}],
      "type":"stat"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"This panel shows all currently firing alerts.\n\nClick on the alert event bar to view or silent it on alertmanager",
      "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":50,
            "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 ${__field.labels.cls}","url":"/alertmgr/#/alerts?filter=%7Bcls%3D%22${__field.labels.cls}%22%2C%20alertname%3D%22${__field.labels.alertname}%22%7D"       },
            { "targetBlank":true,"title":"Silence ${__field.labels.alertname} on Cluster ${__field.labels.cls}"  ,"url":"/alertmgr/#/silences/new?filter=%7Bcls%3D%22${__field.labels.cls}%22%2C%20alertname%3D%22${__field.labels.alertname}%22%7D" },
            {                    "title":"PGSQL Cluster : Alerts for ${__field.labels.cls}"                      ,"url":"/d/pgsql-cluster?var-cls=${__field.labels.cls}&${__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}]},{"matcher":{"id":"byType","options":"time"},"properties":[{"id":"custom.axisPlacement","value":"auto"}]}]
      },
      "gridPos":{"h":8,"w":16,"x":8,"y":20},
      "id":43,
      "options":{"legend":{"calcs":["last"],"displayMode":"table","placement":"right","showLegend":true},"tooltip":{"hideZeros":false,"mode":"multi","sort":"none"}},
      "pluginVersion":"12.3.0",
      "targets":[
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},"editorMode":"code","exemplar":false,"expr":"sum by (job,cls,severity,alertname) (ALERTS{alertstate=\"firing\"})",            "interval":"","legendFormat":"[{{ severity }}] {{alertname}}  @ {{ cls }}","range":true,"refId":"A" },
        { "datasource":{"type":"prometheus","uid":"ds-prometheus"},                    "exemplar":false,"expr":"0"                                                                  ,"hide":true,"interval":"","legendFormat":"Alert"                                      ,             "refId":"C" }
      ],
      "title":"Firing Alerts",
      "type":"timeseries"
    },
    {
      "gridPos":{"h":1,"w":24,"x":0,"y":28},
      "id":55,
      "options":{
        "code":{"language":"plaintext","showLineNumbers":false,"showMiniMap":false},
        "content":"<a href=\"/\"><div style=\"display: block; margin: 20px auto auto auto; height:80px; width: 80px; background-image: url('data:image/svg+xml;base64,[encoded data, 22832 characters]');\"></div></a>\n<img alt=\"\" src=\"http://pigsty.cc/logo.gif?version=${version}\">",
        "mode":"html"
      },
      "pluginVersion":"12.3.0",
      "transparent":true,
      "type":"text"
    }
  ],
  "preload":false,
  "refresh":"",
  "schemaVersion":42,
  "tags":["Pigsty","HOME"],
  "templating":{"list":[{"description":"Pigsty Version Number","hide":2,"name":"version","query":"v4.0.0","skipUrlSync":true,"type":"constant"}]},
  "time":{"from":"now-1h","to":"now"},
  "timepicker":{},
  "timezone":"browser",
  "title":"Pigsty",
  "uid":"pigsty",
  "version":1,
  "weekStart":""
}