E-MapReduce
# 华北prometheus内网下载地址 wget https://emr-autotest.tos-cn-beijing.ivolces.com/prometheus-2.29.1.linux-amd64.tar.gz tar -zxvf prometheus-2.29.1.linux-amd64.tar.gz cd prometheus-2.29.1.linux-amd64 mkdir /data01/prometheus-data ./prometheus --web.enable-lifecycle --config.file="/root/prometheus-2.29.1.linux-amd64/prometheus.yml" --storage.tsdb.path="/data01/prometheus-data" --storage.tsdb.retention.time=5d &
MYSQL_HOST="<IP_adress>" -- 服务器的主机地址 MYSQL_PORT="<MySQL协议端口>" --MySQL协议端口默认为9030 MYSQL_USER="<Username>" MYSQL_PASSWORD="<Password>" mysql -h $MYSQL_HOST -P$MYSQL_PORT -u$MYSQL_USER -p$MYSQL_PASSWORD -- 获取fe节点列表 show frontends; -- 获取be节点列表 show backends; -- 存算分离 show compute nodes;
# 配置prometheus配置,配置文件路径需要根据实际情况 vim /root/prometheus-2.29.1.linux-amd64/prometheus.yml
- job_name: 'cdw-3f5rji288d3niqkgdob6-baseline' metrics_path: '/metrics' static_configs: # fe节点地址 - targets: ['192.168.16.74:8030'] labels: group: fe # be/cn/warehouse节点地址 - targets: ['192.168.28.218:8040', '192.168.16.105:8040', '192.168.16.103:8040'] labels: group: be
curl -X POST http://localhost:9090/-/reload