tiup扩展pump 和 drainer

我是用tiup部署tidb v4.0-rc。现在想扩展pump 和 drainer有没有文档啊

还有在prometheus的配制文件应该加上什么内容啊

你好,

文档正在补充,可以参考扩容的文档

  1. 创建 binlog-scale-out.yaml 文件
  2. tiup cluster scale-out cluster-name

详细配置可看官网,可搜索 drainer:

文件内容: `

# pump_servers:
#   - host: 10.0.1.17
#     ssh_port: 22
#     port: 8250
#     deploy_dir: "/tidb-deploy/pump-8249"
#     data_dir: "/tidb-data/pump-8249"
#     log_dir: "/tidb-deploy/pump-8249/log"
#     numa_node: "0,1"
#     # The following configs are used to overwrite the `server_configs.drainer` values.
#     config:
#       gc: 7
#   - host: 10.0.1.18
#   - host: 10.0.1.19

# drainer_servers:
#   - host: 10.0.1.17
#     port: 8249
#     data_dir: "/tidb-data/drainer-8249"
#     # If drainer doesn't have a checkpoint, use initial commitTS as the initial checkpoint.
#     # Will get a latest timestamp from pd if commit_ts is set to -1 (the default value).
#     commit_ts: -1
#     deploy_dir: "/tidb-deploy/drainer-8249"
#     log_dir: "/tidb-deploy/drainer-8249/log"
#     numa_node: "0,1"
#     # The following configs are used to overwrite the `server_configs.drainer` values.
#     config:
#       syncer.db-type: "mysql"
#       syncer.to.host: "127.0.0.1"
#       syncer.to.user: "root"
#       syncer.to.password: ""
#       syncer.to.port: 3306
#   - host: 10.0.1.19

`

在prometheus的配制文件应该加上什么内容啊

你好,

不需要添加,监控内容会添加到现有集群监控中

pump_servers:
- host: 10.3.87.34
  ssh_port: 22
  port: 8250
  deploy_dir: "/tidb/app/deploy/pump-8250"
  data_dir: "/tidb/app/data/pump-8250"
  log_dir: "/tidb/app/deploy/pump-8250/log"
  config:
    gc: 7
- host: 10.3.87.202
  ssh_port: 22
  port: 8250
  deploy_dir: "/tidb/app/deploy/pump-8250"
  data_dir: "/tidb/app/data/pump-8250"
  log_dir: "/tidb/app/deploy/pump-8250/log"
  config:
    gc: 7
- host: 10.3.87.221
  ssh_port: 22
  port: 8250
  deploy_dir: "/tidb/app/deploy/pump-8250"
  data_dir: "/tidb/app/data/pump-8250"
  log_dir: "/tidb/app/deploy/pump-8250/log"
  config:
    gc: 7
drainer_servers:
  - host: 10.3.87.221
    port: 8249
    data_dir: "/tidb/app/data/drainer-8249"
    deploy_dir: "/tidb/app/deploy/drainer-8249"
    log_dir: "/tidb/app/deploy/drainer-8249/log"
   config:
     syncer.db-type: "kafka"
     syncer.to.kafka-addrs: "10.3.87.33:9092,10.3.87.211:9092,10.3.209:9092"
     syncer.to.topic-name: "test"
     syncer.to.kafka-version: "2.1.0"

Error: port ‘8250’ conflicts between ‘pump_servers,omitempty:10.3.87.34.port’ and ‘pump_servers,omitempty:10.3.87.34.port’

你好,

错误信息很明显,端口冲突,看下该端口是否被占用,如果之前有部署看下是否清理干净,

建议直接修改端口来解决该问题

global:
  deploy_dir: "/home/tidb/lqh-demo/deploy2"
  data_dir: "/home/tidb/lqh-demo/data2"
server_configs:
  tidb:
    binlog.enable: true
pump_servers:
  - host: 172.16.5.169
    port: 18250
drainer_servers:
  - host: 172.16.5.169
    port: 18249
    config:
      syncer.db-type: "mysql"
      syncer.to.host: "172.16.5.169"
      syncer.to.user: "root"
      syncer.to.password: "123456"
      syncer.to.port: 3306

没有端口占用。我重新执行一下就可以了。不知道是什么回事

:ok_hand:

部署成功以后,我发现。 虽然追加了配置文件到prometheus里去了。还像没有让其生效。需要手工kill -HUP pid

你好,

反馈已收到,这边会逐渐完善的,感谢支持

告警规则的模板我看到了。可以看一下热更新配制文件

:ok_hand: