tiup 如何添加prometheus监控组件

【 TiDB 使用环境】生产环境
【 TiDB 版本】7.5.2
tidb 集群安装的当初安装的时候为了节约资源 topology.yaml只安装了pd tidb tikv 没有monitoring_servers 现在想增加改组件同时保持tiup安装模式。 应该如何操作

用tiup扩容就行了,和扩容tidb,tilv这种步骤一样的

1 个赞

tiup cluster scale-out tidb-test54 scale-out-prometheus.yaml

scale-out-prometheus.yaml
monitoring_servers:

  • host: 127.0.0.1

用scale-out直接扩容就行,步骤都是一样的

就是用tiup扩容,卸载就是缩容

给你提供一个我们在用的模版

monitoring_servers:

  • host: 10.10.10.10
    ssh_port: 22
    port: 24660
    deploy_dir: /work/tidb/prometheus-24660
    data_dir: /work/tidb/prometheus-24660/data
    log_dir: /work/tidb/prometheus-24660/log
    external_alertmanagers:
    arch: amd64
    os: linux
    grafana_servers:
  • host: 10.10.10.10
    ssh_port: 22
    port: 24670
    deploy_dir: /work/tidb/grafana-24670
    arch: amd64
    os: linux
    username: admin
    password: admin
    anonymous_enable: false
    root_url: “”
    domain: “”
    alertmanager_servers:
  • host: 10.10.10.10
    ssh_port: 22
    web_port: 24605
    cluster_port: 24606
    deploy_dir: /work/tidb/alertmanager-24605
    data_dir: /work/tidb/alertmanager-24605/data
    log_dir: /work/tidb/alertmanager-24605/log
    arch: amd64
    os: linux

tiup正常扩容加monitor和grafana就可以

直接扩容即可

tiup cluster scale-out tidb-test ./scale-out-monitor.yaml
vi scale-out-monitor.yaml
monitoring_servers:

  • host: 10.0.1.10
    ssh_port: 22
    port: 9090
    deploy_dir: “/tidb-deploy/prometheus-8249”
    data_dir: “/tidb-data/prometheus-8249”
    log_dir: “/tidb-deploy/prometheus-8249/log”

grafana_servers:

  • host: 10.0.1.10
    port: 3000
    deploy_dir: /tidb-deploy/grafana-3000

alertmanager_servers:

  • host: 10.0.1.10
    ssh_port: 22
    web_port: 9093
    cluster_port: 9094
    deploy_dir: “/tidb-deploy/alertmanager-9093”
    data_dir: “/tidb-data/alertmanager-9093”
    log_dir: “/tidb-deploy/alertmanager-9093/log”

tiup直接扩容就好了

在 topology.yaml 文件中,添加一个新的 Prometheus 监控服务器的配置,使用 tiup工具扩容。tiup cluster scale-out <scale-out-config.yaml>

用tiup扩容就行了

查看官方文档,扩容就行 使用 TiUP 扩容缩容 TiDB 集群 | PingCAP 文档中心

用tiup直接扩容就行

跟 cdc一样,可以直接扩容

正常 tiup cluster scale-out cluster-name 配置文件就行

用tiup扩容

直接用TIUP工具操作即可,scale-out里面的内容可以借鉴一下安装tidb集群的模版