Monitoring Valkey and Redis with PMM

I recently shared a story about an application that uses Valkey

The application uses PMM to monitor MySQL, Postgres, MongoDB databases.

Today I tried to add Valkey monitoring.

I used the PMM documentation to add an external metrics service.

I also found the blog post helpful.

In my docker-compose I added a service with redis_exporter

version: '3.7'
services:

  valkey:
    image: valkey/valkey:8
    environment:
      - ALLOW_EMPTY_PASSWORD=yes
    ports:
      - "6379:6379"
    volumes:
      - valkey_data:/data
    healthcheck:
      test: ["CMD", "redis-cli", "ping"]
      interval: 5s
      timeout: 3s
      retries: 5

  redis_exporter:
    platform: "linux/amd64"
    image: oliver006/redis_exporter:v1.29.0
    ports:
      - "9121:9121"
    command: ["-redis.addr=redis://valkey:6379"]
    depends_on:
      - valkey
    environment:
      REDIS_ADDR: redis://valkey:6379

Then I went into PMM in the settings under Inventory and added a new service.

I used redis_exporter as the URL, the /metrics folder and port 9121.

For some reason Inventory was showing Fail, but I saw the metrics in PMM metrics Explorer.

I also downloaded the dashboard in the Grafana gallery and imported it into PMM.

I opened the dashboard and saw that everything was working as it should, made a few queries to see the metrics change.

4 Likes