soundararajan.c
soundararajan.c

Reputation: 2567

Redis Monitor using Prometheus and Grafana

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

Upvotes: 5

Views: 4183

Answers (2)

Manju N
Manju N

Reputation: 1222

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 

Upvotes: 0

Amjad Hussain Syed
Amjad Hussain Syed

Reputation: 1040

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)

Upvotes: 1

Related Questions