监控平台生成exporter插件

1. 创建mysql 用户:

CREATE USER 'exporter'@'10.0.7.12' IDENTIFIED BY 'bkee2021' WITH MAX_USER_CONNECTIONS 3;
GRANT ALL PRIVILEGES ON *.* TO 'exporter'@'10.0.7.12';

2. 执行:

docker run -d \
  -p 9104:9104 \
  --network my-mysql-network  \
  -e DATA_SOURCE_NAME="docker run -d \
  -p 9104:9104 \
  --network my-mysql-network  \
  -e DATA_SOURCE_NAME="user:password@(hostname:3306)/" \
  prom/mysqld-exporter:password@(hostname:3306)/" \
  prom/mysqld-exporter

3. 监控平台:

通过检查: /data/bkce/paas_agent/apps/logs/bk_monitor/bk_monitorv3.log

这里可以看到nodeman.api.service.consul 监听的端口是80

/usr/local/openrety/nginx/conf/conf.d/nodeman.conf ,这里监听的端口是8089 暂时改为80 即可

4. 未安装前修改脚本saas_var.env :[“BKAPP_NODEMAN_HOST”]=”http://$BK_NODEMAN_API_HOST:80