DM可以和TiDB集群共享monitoring_servers吗

【 TiDB 使用环境】测试
【 TiDB 版本】V5.4.3
【复现路径】做过哪些操作出现的问题
【遇到的问题:问题现象及影响】
【资源配置】
【附件:截图/日志/监控】
TiDB集群已经部署了monitoring_servers、grafana_servers和alertmanager_servers。数据量不算大,使用DM从MySQL迁移数据。DM的部署模板中也有 monitoring_servers、grafana_servers和alertmanager_servers,能共用TiDB集群那一套吗?谢谢

可以的,在 prometheus 上面配置就好了。另外 TiUP 部署 DM 应该会自动合并到一个 promethues + grafana + alertmanger 里面的

记得将 DM topo.yaml 中所有的 host 都配置 ignore_exporter

你使用和管理集群相同的tiup 来部署dm,他们的promethus grafana就是共用的,同一套

首先,部署DM集群时候,要记得按照注意下,默认情况下是不会部署node_exporter和blackbox_exporter的(这个组件是收集机器负载的),得手动指定一下端口(如果混部的话,要注意和TiDB的端口分开)
https://github.com/pingcap/tiup/blob/master/embed/examples/dm/topology.example.yaml#L81-L86

# if monitored is set, node_exporter and blackbox_exporter will be
# deployed with the port specified, otherwise they are not deployed
# on the server to avoid conflict with tidb clusters
#monitored:
#  node_exporter_port: 9100
#  blackbox_exporter_port: 9115

我现在是这么配置的,prometheus、grafana、altermanager都是尽可能复用公司已有组件,可以参考一下。

monitoring_servers:
- host: xxx.xxx.xxx.xxx
  # 将监控数据往远程prometheus写一份(需要远端开启remote_write),远端prometheus会通过thanos组件将历史监控数据上传到S3中,方便历史查询
  remote_config:
    remote_write:
    - url: http://prometheus-proxy.xxxxxx.com/api/v1/write
  # 复用公司的altermanager,方便和已有告警系统集成
  external_alertmanagers:
  - host: alertmanager.xxxxxx.com
    web_port: 80
  # 因为监控信息写入到了远端,所以本地只需要保留15天
  storage_retention: 15d
  # 方便调整告警规则
  rule_dir: /root/deploy-config/tidb-config/rules
  # 默认instance label是IP,在dashboard显示不直观,这里手动改成可识别的文字
  additional_scrape_conf:
    relabel_configs:
    - source_labels:
      - __address__
      target_label: target
    - regex: xxx.xxx.xxx.xxx:(.*)
      replacement: tikv6-sata-e001:$1
      source_labels:
      - __address__
      target_label: instance
1 个赞

以上都收到,多谢诸位!

大佬,这个具体咋搞,我试了 DM指定和tidb同意的promethus grafana ,最后DM的直接把tidb的覆盖了

此话题已在最后回复的 60 天后被自动关闭。不再允许新回复。