由于开发代码问题导致redis 最大连接数超了服务崩溃,没做告警,后期弥补
reids 地址: 192.168.1.136:6379
mkdir /usr/local/prometheus/redis_exporter
wget https://github.com/oliver006/redis_exporter/releases/download/v0.30.0/redis_exporter-v0.30.0.linux-amd64.tar.gz
mv redis_exporter /usr/local/prometheus/redis_exporter/
cat > /usr/lib/systemd/system/redis_exporter.service <<EOF
[Unit]
Description=redis_exporter
Documentation=https://github.com/oliver006/redis_exporter
After=network.target
[Service]
Type=simple
User=prometheus
ExecStart=/usr/local/prometheus/redis_exporter/redis_exporter -redis.addr 192.168.1.136:6379 -redis.password 123456
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
chown -R prometheus:prometheus /usr/local/prometheus/redis_exporter
systemctl restart redis_exporter </