10.redis_export 监控
https://github.com/oliver006/redis_exporter/releases
https://github.com/oliver006/redis_exporter/releases/download/v1.28.0/redis_exporter-v1.28.0.linux-amd64.tar.gz
#解压
tar xf redis_exporter-v1.14.0.linux-amd64.tar.gz -C /montion/
## 无密码
nohup ./redis_exporter -redis.addr x.x.x.x:6379 &
## 有密码
nohup ./redis_exporter -redis.addr x.x.x.x:6379 -redis.password 123456 &
# 访问
10.105.193.49:9121/metrics
# consul 注册配置文件
[root@redis-193 redis_exporter-v1.14.0.linux-amd64]# cat redis.json
{
"ID": "redis-instance-x.x.x.x",
"Name": "redis-instance-x.x.x.x",
"Tags": [
"redis_instance"
],
"Address": "x.x.x.x",
"Port": 9121,
"Meta": {
"instance": "redis-instance-x.x.x.x",
"role": "redis"
},
"EnableTagOverride": false,
"Check": {
"HTTP": "http://x.x.x.x:9121/metrics",
"Interval": "10s"
},
"Weights": {
"Passing": 10,
"Warning": 1
}
}
# grafana 模板号:4074