5
votes

I have installed redis in a server

I wish to monitor redis via Prometheus and Grafana

Installed redis_exporter in the redis installed server using docker

 $ docker pull oliver006/redis_exporter
 $ docker run -d --name redis_exporter -p 9121:9121 oliver006/redis_exporter

Checked the redis_exporter running status in the server.

Added the redis installed and redis exporter installed IP in prometheus.yml file in Grafana Server

 - job_name: 'redis_exporter'
    target_groups:
      - targets: ['IP:9121']
        labels:
          alias: redis

Restarted Prometheus in Grafana server

Checked the status in prometheus status page It shows UP for the redis server IP:9121 mentioned in the prometheus.yml

In Grafana :

I have imported Prometheus Redis dashboard;(https://grafana.com/dashboards/763)

But data is not loading in the dashboard. Also the IP is not listed in the dashboard

2
Have you configured the prometheus datasource under Grafana Menu > Datasources > Prometheus?Phil
yes configured it.soundararajan.c
Any error outputted to the javascript console?Phil
no error outputed in prometheus.log filesoundararajan.c
Have you checked if you were receiving metrics on prometheus db? Query "redis_uptime_in_seconds"Nikesh Devaki

2 Answers

1
votes

Two things to check here:

  1. Try this url and see if you're able to get the metrics.
curl -s "<redis_exporter>:9121/scrape?target=redis://<redis_instance>:6379"
  1. Update the grafana dashboard variables from label_values(redis_up, addr) to label_values(redis_up, instance)
0
votes

In case you set a password authentication for redis, need to supply a Redis password to redis-exporter

sudo docker run -d --name redis_exporter -p 9121:9121  oliver006/redis_exporter --redis.addr=redis://10.0.0.175:6379  --redis.password=redis_password_here