官网下载: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
Logo

开放原子开发者工作坊旨在鼓励更多人参与开源活动,与志同道合的开发者们相互交流开发经验、分享开发心得、获取前沿技术趋势。工作坊有多种形式的开发者活动,如meetup、训练营等,主打技术交流,干货满满,真诚地邀请各位开发者共同参与!

更多推荐