Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 901
soundararajan.c Avatar asked Nov 07 '22 13:11

soundararajan.c


1 Answers

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)
like image 138
Amjad Hussain Syed Avatar answered Nov 15 '22 09:11

Amjad Hussain Syed