Clickhouse Memory Analysis
ClickHouse Memory Analysis using Prometheus
# ClickHouse Memory Analysis using Prometheus

* **OS Memory**
* **ClickHouse Memory**
* **jemacloc**
* **Support multiple nodes (Cluster)**

```*  Tested on ClickHouse v.22.7.2.15 and Prometheus v.2.37.0  *```

Might also work on older versions
ClickHouse Memory Analysis using Prometheus
{
  "__inputs": [
    {
      "name": "DS_PROMETHEUS",
      "label": "Prometheus",
      "description": "",
      "type": "datasource",
      "pluginId": "prometheus",
      "pluginName": "Prometheus"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.5.2"
    },
    {
      "type": "panel",
      "id": "graph",
      "name": "Graph (old)",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "prometheus",
      "name": "Prometheus",
      "version": "1.0.0"
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "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"
      }
    ]
  },
  "description": "ClickHouse Memory Analysis using Prometheus",
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 0,
  "id": null,
  "iteration": 1659802069357,
  "links": [],
  "liveNow": false,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 42,
      "panels": [],
      "title": "Overall",
      "type": "row"
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "unit": "bytes"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 8,
        "w": 24,
        "x": 0,
        "y": 1
      },
      "hiddenSeries": false,
      "id": 5,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "sort": "max",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": false
      },
      "percentage": false,
      "pluginVersion": "8.5.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "editorMode": "code",
          "exemplar": false,
          "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*OSMemory.*\",instance=~\"$ch_node.*\"})",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{__name__}}",
          "range": true,
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "OS Memory ($ch_node)",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "ClickHouseAsyncMetrics_OSMemory",
            "renamePattern": " "
          }
        }
      ],
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:640",
          "format": "bytes",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:641",
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "unit": "bytes"
        },
        "overrides": []
      },
      "fill": 0,
      "fillGradient": 0,
      "gridPos": {
        "h": 6,
        "w": 24,
        "x": 0,
        "y": 9
      },
      "hiddenSeries": false,
      "id": 26,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "sort": "max",
        "sortDesc": false,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 2,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": false
      },
      "percentage": false,
      "pluginVersion": "8.5.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "editorMode": "code",
          "exemplar": false,
          "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*Memory.*\",__name__ !~ \"ClickHouseAsyncMetrics_.*OSMemory.*\",instance=~\"$ch_node.*\"})",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{__name__}}",
          "range": true,
          "refId": "A"
        }
      ],
      "thresholds": [],
      "timeRegions": [],
      "title": "ClickHouse Memory ($ch_node)",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "ClickHouseAsyncMetrics_Memory",
            "renamePattern": " "
          }
        }
      ],
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:640",
          "format": "bytes",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:641",
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "aliasColors": {},
      "bars": false,
      "dashLength": 10,
      "dashes": false,
      "datasource": "${DS_PROMETHEUS}",
      "description": "",
      "fieldConfig": {
        "defaults": {
          "unit": "bytes"
        },
        "overrides": []
      },
      "fill": 1,
      "fillGradient": 0,
      "gridPos": {
        "h": 11,
        "w": 24,
        "x": 0,
        "y": 15
      },
      "hiddenSeries": false,
      "id": 25,
      "legend": {
        "alignAsTable": true,
        "avg": true,
        "current": true,
        "max": true,
        "min": true,
        "rightSide": true,
        "show": true,
        "sort": "max",
        "sortDesc": true,
        "total": false,
        "values": true
      },
      "lines": true,
      "linewidth": 1,
      "nullPointMode": "null",
      "options": {
        "alertThreshold": true
      },
      "percentage": false,
      "pluginVersion": "8.5.2",
      "pointradius": 2,
      "points": false,
      "renderer": "flot",
      "seriesOverrides": [],
      "spaceLength": 10,
      "stack": false,
      "steppedLine": false,
      "targets": [
        {
          "datasource": "${DS_PROMETHEUS}",
          "editorMode": "code",
          "exemplar": false,
          "expr": "({__name__=~ \"ClickHouseAsyncMetrics_jemalloc.*\", __name__!=\"ClickHouseAsyncMetrics_jemalloc_metadata_thp\", __name__!~ \"ClickHouseAsyncMetrics_jemalloc_background_thread.*\", instance=~\"$ch_node.*\"})",
          "format": "time_series",
          "instant": false,
          "interval": "",
          "legendFormat": "{{__name__}}",
          "range": true,
          "refId": "A"
        }
      ],
      "thresholds": [
        {
          "$$hashKey": "object:692",
          "colorMode": "warning",
          "fill": true,
          "fillColor": "rgba(51, 162, 229, 0.2)",
          "line": true,
          "lineColor": "rgba(31, 96, 196, 0.6)",
          "op": "gt",
          "value": 15000000000,
          "yaxis": "left"
        },
        {
          "$$hashKey": "object:702",
          "colorMode": "critical",
          "fill": true,
          "line": true,
          "op": "gt",
          "value": 20000000000,
          "yaxis": "left"
        }
      ],
      "timeRegions": [],
      "title": "jemalloc All  ($ch_node)",
      "tooltip": {
        "shared": true,
        "sort": 0,
        "value_type": "individual"
      },
      "transformations": [
        {
          "id": "renameByRegex",
          "options": {
            "regex": "ClickHouseAsyncMetrics_jemalloc_",
            "renamePattern": " "
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "_",
            "renamePattern": " "
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "_",
            "renamePattern": " "
          }
        },
        {
          "id": "renameByRegex",
          "options": {
            "regex": "_",
            "renamePattern": " "
          }
        }
      ],
      "type": "graph",
      "xaxis": {
        "mode": "time",
        "show": true,
        "values": []
      },
      "yaxes": [
        {
          "$$hashKey": "object:640",
          "format": "bytes",
          "logBase": 1,
          "show": true
        },
        {
          "$$hashKey": "object:641",
          "format": "short",
          "logBase": 1,
          "show": true
        }
      ],
      "yaxis": {
        "align": false
      }
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 26
      },
      "id": 22,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 3
          },
          "hiddenSeries": false,
          "id": 36,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*OSMemoryTotal\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "OS Memory: Total",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 10
          },
          "hiddenSeries": false,
          "id": 29,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*OSMemoryAvailable\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "OS Memory: Available",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 17
          },
          "hiddenSeries": false,
          "id": 30,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*OSMemoryFreeWithoutCached\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "OS Memory: Free Without Cached",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 24
          },
          "hiddenSeries": false,
          "id": 31,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*Buffers\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "OS Memory: Cached",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 31
          },
          "hiddenSeries": false,
          "id": 32,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*OSMemoryBuffers\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "OS Memory: Buffers",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 38
          },
          "hiddenSeries": false,
          "id": 33,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*OSMemorySwapCached\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "OS Memory: Swap Cached",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 45
          },
          "hiddenSeries": false,
          "id": 28,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*OSMemoryFreePlusCached\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "OS Memory: Free Plus Cached",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        }
      ],
      "title": "OS Memory",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 35,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 2
          },
          "hiddenSeries": false,
          "id": 38,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*MemoryResident\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "CH Memory: Resident",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 9
          },
          "hiddenSeries": false,
          "id": 27,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*MemoryShared\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "CH Memory: Shared",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 16
          },
          "hiddenSeries": false,
          "id": 37,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*MemoryCode\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "CH Memory: Code",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 23
          },
          "hiddenSeries": false,
          "id": 39,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*MemoryDataAndStack\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "CH Memory: Data And Stack",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 0,
          "fillGradient": 0,
          "gridPos": {
            "h": 7,
            "w": 24,
            "x": 0,
            "y": 30
          },
          "hiddenSeries": false,
          "id": 40,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "sort": "max",
            "sortDesc": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 2,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": false
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "({__name__ =~ \"ClickHouseAsyncMetrics_.*Virtual\"})",
              "format": "time_series",
              "instant": false,
              "interval": "",
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [],
          "timeRegions": [],
          "title": "CH Memory: Virtual",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "transformations": [
            {
              "id": "renameByRegex",
              "options": {
                "regex": ":.*",
                "renamePattern": " "
              }
            }
          ],
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        }
      ],
      "title": "Clickhouse Memory",
      "type": "row"
    },
    {
      "collapsed": true,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 28
      },
      "id": 19,
      "panels": [
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 4
          },
          "hiddenSeries": false,
          "id": 20,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)(ClickHouseAsyncMetrics_jemalloc_active{})",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc active",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 13
          },
          "hiddenSeries": false,
          "id": 6,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_allocated))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc allocated",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 22
          },
          "hiddenSeries": false,
          "id": 10,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_mapped))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc mapped",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 31
          },
          "hiddenSeries": false,
          "id": 11,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_metadata))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc metadata",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 40
          },
          "hiddenSeries": false,
          "id": 12,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_resident))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc resident",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 49
          },
          "hiddenSeries": false,
          "id": 13,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_retained))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc retained",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 58
          },
          "hiddenSeries": false,
          "id": 14,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_epoch))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc epoch",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 67
          },
          "hiddenSeries": false,
          "id": 15,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_arenas_all_pdirty))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc areas all pdirty",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 76
          },
          "hiddenSeries": false,
          "id": 16,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_arenas_all_pmuzzy))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc areas all pmuzzy",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "description": "",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 85
          },
          "hiddenSeries": false,
          "id": 17,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_arenas_all_pactive))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc areas all pactive",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 94
          },
          "hiddenSeries": false,
          "id": 7,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_arenas_all_dirty_purged))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc arenas all dirty purged",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        },
        {
          "aliasColors": {},
          "bars": false,
          "dashLength": 10,
          "dashes": false,
          "datasource": "${DS_PROMETHEUS}",
          "fieldConfig": {
            "defaults": {
              "unit": "bytes"
            },
            "overrides": []
          },
          "fill": 1,
          "fillGradient": 0,
          "gridPos": {
            "h": 9,
            "w": 24,
            "x": 0,
            "y": 103
          },
          "hiddenSeries": false,
          "id": 8,
          "legend": {
            "alignAsTable": true,
            "avg": true,
            "current": true,
            "max": true,
            "min": true,
            "rightSide": true,
            "show": true,
            "total": false,
            "values": true
          },
          "lines": true,
          "linewidth": 1,
          "nullPointMode": "null",
          "options": {
            "alertThreshold": true
          },
          "percentage": false,
          "pluginVersion": "8.5.2",
          "pointradius": 2,
          "points": false,
          "renderer": "flot",
          "seriesOverrides": [],
          "spaceLength": 10,
          "stack": false,
          "steppedLine": false,
          "targets": [
            {
              "datasource": "${DS_PROMETHEUS}",
              "editorMode": "code",
              "exemplar": false,
              "expr": "sum without(job)((ClickHouseAsyncMetrics_jemalloc_arenas_all_muzzy_purged))",
              "format": "time_series",
              "instant": false,
              "legendFormat": "{{instance}}",
              "range": true,
              "refId": "A"
            }
          ],
          "thresholds": [
            {
              "$$hashKey": "object:692",
              "colorMode": "warning",
              "fill": true,
              "fillColor": "rgba(51, 162, 229, 0.2)",
              "line": true,
              "lineColor": "rgba(31, 96, 196, 0.6)",
              "op": "gt",
              "value": 15000000000,
              "yaxis": "left"
            },
            {
              "$$hashKey": "object:702",
              "colorMode": "critical",
              "fill": true,
              "line": true,
              "op": "gt",
              "value": 20000000000,
              "yaxis": "left"
            }
          ],
          "timeRegions": [],
          "title": "jemalloc arenas all muzzy purged",
          "tooltip": {
            "shared": true,
            "sort": 0,
            "value_type": "individual"
          },
          "type": "graph",
          "xaxis": {
            "mode": "time",
            "show": true,
            "values": []
          },
          "yaxes": [
            {
              "$$hashKey": "object:640",
              "format": "bytes",
              "logBase": 1,
              "show": true
            },
            {
              "$$hashKey": "object:641",
              "format": "short",
              "logBase": 1,
              "show": true
            }
          ],
          "yaxis": {
            "align": false
          }
        }
      ],
      "title": "jemalloc",
      "type": "row"
    }
  ],
  "schemaVersion": 36,
  "style": "dark",
  "tags": [
    "clickhouse",
    "db"
  ],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "prometheus",
          "uid": "${DS_PROMETHEUS}"
        },
        "definition": "ClickHouseAsyncMetrics_Uptime",
        "hide": 0,
        "includeAll": false,
        "label": "Overall Node:",
        "multi": false,
        "name": "ch_node",
        "options": [],
        "query": {
          "query": "ClickHouseAsyncMetrics_Uptime",
          "refId": "StandardVariableQuery"
        },
        "refresh": 1,
        "regex": "/instance=\"(?<text>[^:]+)|instance=\"(?<value>[^:]+)/g",
        "skipUrlSync": false,
        "sort": 5,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "now-3h",
    "to": "now"
  },
  "timepicker": {},
  "timezone": "",
  "title": "Clickhouse Memory Analysis",
  "uid": "123456",
  "version": 2,
  "weekStart": "",
  "gnetId": 16685
}