Through the command redis-cli 127.0.0.1 -p zzzaa001 connection redis is good. But the redis_exporter error is as follows:
[root@acserver ~]# docker run -e "REDIS_ADDR=127.0.0.1:6379" -e "REDIS_PASSWORD=zzzaa001" --name redis_exporter -p 9121:9121 oliver006/redis_exporter
time="2017-06-21T09:12:59Z" level=info msg="Redis Metrics Exporter v0.11.1 build date: 2017-05-24-14:10:15 sha1: d3af2b49709a2cab654d7c876497e791c6d9a082 Go: go1.8.1\n"
time="2017-06-21T09:12:59Z" level=info msg="Providing metrics at :9121/metrics"
time="2017-06-21T09:12:59Z" level=info msg="Connecting to redis hosts: []string{\"127.0.0.1:6379\"}"
time="2017-06-21T09:12:59Z" level=info msg="Using alias: []string{\"\"}"
time="2017-06-21T09:13:03Z" level=info msg="redis err: dial tcp 127.0.0.1:6379: getsockopt: connection refused"
time="2017-06-21T09:13:08Z" level=info msg="redis err: dial tcp 127.0.0.1:6379: getsockopt: connection refused"
time="2017-06-21T09:13:13Z" level=info msg="redis err: dial tcp 127.0.0.1:6379: getsockopt: connection refused"
- job_name: redis_exporter_dev
scrape_interval: 5s
static_configs:
- targets: ['192.168.1.2:9121']
- job_name: redis_exporter_test
scrape_interval: 5s
static_configs:
- targets: ['192.168.1.3:9121']