{
  "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":"MongoDB (FerretDB) Service 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":["MONGO"],"targetBlank":false,"title":"MONGO","tooltip":"","type":"dashboards","url":""}],
  "panels":[
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":0},"id":118,"panels":[],"title":"Overview","type":"row"},
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{"color":{"mode":"thresholds"},"custom":{"align":"center","cellOptions":{"type":"auto"},"filterable":false,"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":"MongoDB Instance : ${__data.fields.Instance}","url":"/d/mongo-overview?var-ins=${__data.fields.Instance}&${__url_time_range}"}]},{"id":"custom.width"}]                                                                     },
          { "matcher":{"id":"byName","options":"IP"}      ,"properties":[{"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":"Alive"}   ,"properties":[{"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}] },
          { "matcher":{"id":"byName","options":"Address"} ,"properties":[{"id":"custom.width","value":140}]                                                                                                                                                                                                                           },
          { "matcher":{"id":"byName","options":"UUID"}    ,"properties":[{"id":"custom.width","value":300}]                                                                                                                                                                                                                           },
          { "matcher":{"id":"byName","options":"Version"} ,"properties":[{"id":"custom.width","value":80}]                                                                                                                                                                                                                            },
          { "matcher":{"id":"byName","options":"Commit"}  ,"properties":[{"id":"custom.width","value":366}]                                                                                                                                                                                                                           }
        ]
      },
      "gridPos":{"h":5,"w":24,"x":0,"y":1},
      "id":116,
      "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":"ferretdb_up{cls=\"$cls\"}","format":"table","hide":false,"instant":true,"interval":"","legendFormat":"","refId":"A"}],
      "transformations":[
        {
          "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":true,
              "Value #C":false,
              "Value #D":true,
              "Value #E":true,
              "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 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":15,"Value":0,"__name__":16,"branch":7,"cls":13,"commit":6,"debug":8,"dirty":9,"ins":1,"instance":3,"ip":2,"job":14,"package":10,"telemetry":11,"update_available":12,"uuid":4,"version":5},
            "renameByName":{
              "Time 4":"",
              "Value":"Alive",
              "Value #A":"Alive",
              "Value #B":"",
              "Value #C":"Status",
              "Value #D":"",
              "Value #E":"",
              "Value #F":"RT",
              "Value #G":"LB Conn",
              "Value #H":"LB",
              "Value #I":"QPS",
              "Value #J":"LB Clients",
              "Value #K":"Lag",
              "branch":"Branch",
              "cls 1":"",
              "cls 2":"",
              "commit":"Commit",
              "debug":"Debug",
              "dirty":"Dirty",
              "ins":"Instance",
              "instance":"Address",
              "instance 2":"",
              "ip":"IP",
              "ip 1":"IP",
              "job":"",
              "package":"Package",
              "server_id":"Server ID",
              "server_version":"Version",
              "telemetry":"Telemetry",
              "update_available":"Update Available",
              "uuid":"UUID",
              "version":"Version"
            }
          }
        }
      ],
      "type":"table"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineStyle":{"fill":"solid"},
            "lineWidth":2,
            "pointSize":3,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"area"}
          },
          "mappings":[],
          "min":0,
          "thresholds":{"mode":"absolute","steps":[{"color":"green","value":0},{"color":"yellow","value":0.3},{"color":"orange","value":0.5},{"color":"red","value":0.7},{"color":"purple","value":0.9}]},
          "unit":"percentunit"
        },
        "overrides":[]
      },
      "gridPos":{"h":7,"w":12,"x":0,"y":6},
      "id":123,
      "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":"rate(process_cpu_seconds_total{cls=\"$cls\", job=\"mongo\"}[1m])","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
      "title":"CPU Usage",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineStyle":{"fill":"solid"},
            "lineWidth":2,
            "pointSize":3,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "min":0,
          "thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]},
          "unit":"bytes"
        },
        "overrides":[]
      },
      "gridPos":{"h":7,"w":12,"x":12,"y":6},
      "id":124,
      "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":"process_resident_memory_bytes{cls=\"$cls\", job=\"mongo\"}","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
      "title":"Mem Usage",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"line",
            "fillOpacity":0,
            "gradientMode":"none",
            "hideFrom":{"graph":false,"legend":false,"tooltip":false,"viz":false},
            "insertNulls":false,
            "lineInterpolation":"linear",
            "lineStyle":{"fill":"solid"},
            "lineWidth":2,
            "pointSize":3,
            "scaleDistribution":{"type":"linear"},
            "showPoints":"auto",
            "showValues":false,
            "spanNulls":false,
            "stacking":{"group":"A","mode":"none"},
            "thresholdsStyle":{"mode":"off"}
          },
          "mappings":[],
          "min":0,
          "thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]},
          "unit":"locale"
        },
        "overrides":[]
      },
      "gridPos":{"h":6,"w":12,"x":0,"y":13},
      "id":128,
      "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 (ins) (rate(ferretdb_client_requests_total{cls=\"$cls\", job=\"mongo\"}[5m]))","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
      "title":"QPS (5m)",
      "type":"timeseries"
    },
    {
      "datasource":{"type":"prometheus","uid":"ds-prometheus"},
      "description":"",
      "fieldConfig":{
        "defaults":{
          "color":{"mode":"palette-classic"},
          "custom":{
            "axisBorderShow":false,
            "axisCenteredZero":false,
            "axisColorMode":"text",
            "axisLabel":"",
            "axisPlacement":"auto",
            "barAlignment":0,
            "barWidthFactor":0.6,
            "drawStyle":"bars",
            "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":"off"}
          },
          "mappings":[],
          "min":0,
          "thresholds":{"mode":"absolute","steps":[{"color":"green","value":0}]},
          "unit":"locale"
        },
        "overrides":[]
      },
      "gridPos":{"h":6,"w":12,"x":12,"y":13},
      "id":127,
      "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":"increase(ferretdb_client_accepts_total{cls=\"$cls\", job=\"mongo\"}[1m])","interval":"","legendFormat":"{{ ins }}","range":true,"refId":"A"}],
      "title":"Client Accept",
      "type":"timeseries"
    },
    {"collapsed":false,"gridPos":{"h":1,"w":24,"x":0,"y":19},"id":120,"panels":[],"title":"Logs","type":"row"},
    {
      "datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},
      "gridPos":{"h":18,"w":24,"x":0,"y":20},
      "id":122,
      "options":{"dedupStrategy":"none","enableInfiniteScrolling":false,"enableLogDetails":true,"prettifyLogMessage":false,"showCommonLabels":false,"showControls":false,"showLabels":false,"showTime":true,"sortOrder":"Descending","wrapLogMessage":false},
      "pluginVersion":"12.3.0",
      "targets":[{"datasource":{"type":"victoriametrics-logs-datasource","uid":"ds-vlogs"},"editorMode":"code","expr":"job:syslog app:ferretdb","instant":false,"legendFormat":"{{ ins }}","queryType":"range","range":true,"refId":"A"}],
      "type":"logs"
    }
  ],
  "preload":false,
  "refresh":"",
  "schemaVersion":42,
  "tags":["Pigsty","MONGO","Overview","HOME"],
  "templating":{"list":[{"current":{},"datasource":{"type":"prometheus","uid":"ds-prometheus"},"definition":"label_values(ferretdb_up,cls)","description":"ferretdb cluster name","includeAll":false,"label":"Cluster","name":"cls","options":[],"query":{"query":"label_values(ferretdb_up,cls)","refId":"PrometheusVariableQueryEditor-VariableQuery"},"refresh":1,"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":"Ferret Overview",
  "uid":"mongo-overview",
  "version":1,
  "weekStart":""
}