官网下载:https://github.com/oliver006/redis_exporter/releases
github地址: https://github.com/oliver006/redis_exporter
1.安装exporter
cd /opt/plg/tools
wget https://github.com/oliver006/redis_exporter/releases/download/v1.17.1/redis_exporter-v1.17.1.freebsd-amd64.tar.gz
mv redis_exporter-v1.17.1.freebsd-amd64 ../redis_exporter
2.systemd启动
#如果redis 有密码 请加参数 -redis.password
cat >/usr/lib/systemd/system/redis_exporter.service <<EOF
[Unit]
Description=redis_exporter
After=network.target
Documentation= https://github.com/oliver006/redis_exporter
[Service]
Type=simple
ExecStart=/opt/plg/redis_exporter/redis_exporter -redis.password "kcmCv2M2EW0tyH8MhD3ih9"
Restart=on-failure
[Install]
WantedBy=multi-user.target
EOF
prometheus 配置看github文档
3.添加模板
#添加模版 11835
https://grafana.com/grafana/dashboards/11835