Skip to content

Connect Valkey databases to PMM

Valkey is a high-performance open-source alternative to Redis. Because Valkey is a Redis fork that maintains full protocol compatibility, PMM monitors both databases using the same proven methods and dashboards.

Connect your Valkey or Redis instances to PMM to track performance, analyze commands, and monitor cluster health. PMM’s 10 dedicated Valkey/Redis dashboards help you spot memory issues, diagnose slow queries, and maintain healthy replication across your Valkey/Redis deployments.

Prerequisites

Before connecting Valkey or Redis to PMM, review the prerequisites for your monitoring setup:

  • PMM Server is installed and running
  • PMM Server has direct network access to the Valkey instance
  • You have Valkey authentication credentials if ACL is enabled

Security setup

For security best practices, configure proper authentication for your Valkey or Redis instance.

Password security
  • Use a strong, unique password (at least 12 characters).
  • Mix of uppercase/lowercase letters, numbers, and special characters.
  • Never use default, test, or example passwords in production.

ACL configuration (Valkey 6.0+)

If you’re using Valkey’s ACL feature, create a dedicated monitoring user with read-only permissions:

    # Create monitoring user with read-only permissions
    ACL SETUSER pmm on >StrongPassword123! ~* +@read +info +config|get +slowlog +latency

Add service to PMM

You can add your Valkey or Redis service to PMM either through the user interface or via the command line:

To add the service from the user interface:

  1. Go to PMM Configuration > PMM Inventory > Services > Add Service.

  2. Select Valkey/Redis service type.

  3. Fill in the Main details section:

    • Service name: e.g., valkey-primary-svc. This defaults to hostname if you don’t specify a custom descriptive name.
    • Nodes: Select the PMM node where the agent is running.
    • Agents: Select the PMM agent that should monitor this instance.
    • Hostname/Port: The address and port (default: 6379) of your instance.
    • Username/Password: Authentication credentials (if ACL is enabled).
  4. Configure Labels (optional): Add descriptive tags. For clustered/replicated setups, ensure you set the role label here (e.g., role:primary).

    • Environment: Specify the environment (e.g., production, staging)
    • Cluster: Specify the cluster name if applicable
    • Replication set: For replica configurations
    • Region: Geographic region
    • Availability Zone: Cloud availability zone
    • Custom labels: Add custom key-value pairs in the format key1:value1, one per line
  5. Configure Additional options:

    • Check Skip connection check to bypass connectivity validation
    • Check Use TLS for database connections to enable TLS
    • Check Skip TLS certificate and hostname validation if using self-signed certificates. For production environments, make sure to always use properly signed certificates. Only skip certificate validation in development or testing scenarios.
  6. Click Add service to complete the setup.

Add a local Valkey instance with default settings:

pmm-admin add valkey \
  --address=localhost:6379 \
  --environment=production \
  Valkey-Primary

Add a Valkey instance with authentication:

pmm-admin add valkey \
  --address=localhost:6379 \
  --username=pmm \
  --password=StrongPassword123! \
  --environment=production \
  Valkey-Secure

Add a remote Valkey instance:

pmm-admin add valkey \
  --address=valkey-server.example.com:6379 \
  --username=pmm \
  --password=StrongPassword123! \
  --environment=production \
  Remote-Valkey

Add an instance with environment and custom labels:

pmm-admin add valkey \
  --address=localhost:6379 \
  --username=pmm \
  --password=StrongPassword123! \
  --environment=production \
  --custom-labels="role=primary,datacenter=east" \
  Valkey-Primary

Add an instance with TLS security:

pmm-admin add valkey \
  --address=valkey-server.example.com:6379 \
  --username=pmm \
  --password=StrongPassword123! \
  --tls \
  --tls-ca=/path/to/ca.pem \
  Valkey-TLS

Using inventory commands

PMM also provides inventory commands for more granular control:

pmm-admin inventory add service valkey \
  --address=localhost:6379 \
  --username=pmm \
  --password=StrongPassword123! \
  Valkey-Service
pmm-admin inventory add agent valkey_exporter \
  --address=localhost:6379 \
  --username=pmm \
  --password=StrongPassword123!

If the service is added successfully, PMM will display a confirmation message:

```sh
Valkey Service added
Service ID  : /service_id/abcd1234-5678-efgh-ijkl-mnopqrstuvwx
Service name: Valkey-Primary
```

Verify your Valkey/Redis service

After adding your Valkey or Redis service to PMM, verify that it’s properly connected and collecting data.

Check service status

Use these commands to manage and monitor your Valkey/Redis services:

  1. List all Valkey/Redis services and their status:
   pmm-admin inventory list services --service-type=valkey
  1. List all Valkey/Redis exporter agents:

       pmm-admin inventory list agents --agent-type=valkey_exporter
    

  2. Check the overall PMM Client status:

       pmm-admin status
    

  3. View all services in a simple list:

       pmm-admin list
    

To verify your service in the web interface:

  1. Navigate to PMM Configuration > PMM Inventory.
  2. In the Services tab, find your newly added Valkey/Redis service.
  3. Verify the Service Name and Address match your configuration.
  4. Check the Status column shows as Active.
  5. In the Options column, expand the Details section to confirm the correct agents are running.

Verify data collection

After adding your Valkey or Redis service to PMM, verify that it’s properly connected and collecting data.

  1. Open the Home dashboard and verify your Valkey/Redis service appears in the Monitored DB Services and Monitored DB Instances panels.

  2. Navigate to the Valkey/Redis dashboards from the left menu. PMM provides 10 dedicated dashboards:

  3. Clients: Monitor client connections and blocked clients
  4. Cluster Details: Track cluster topology and replication health
  5. Command Details: Analyze command-level performance and latency
  6. Load: Monitor workload distribution and throughput
  7. Memory: Track memory usage and eviction patterns
  8. Network: Monitor network bandwidth consumption
  9. Overview: Get a high-level summary of deployment health
  10. Persistence: Verify AOF and RDB persistence operations
  11. Replication: Monitor replication lag and synchronization
  12. Slowlog: Track slow command execution

  13. Select your Valkey or Redis service from the drop-down menu.

  14. Confirm that metrics are appearing on the dashboards.

  15. Check that the graphs show recent data (within the last few minutes).

Remove a Valkey/Redis service

If you need to remove a Valkey or Redis service from monitoring:

Remove a Valkey or Redis service:

pmm-admin remove valkey Valkey-Primary

Or use inventory commands:

# Remove service
pmm-admin inventory remove service <service-id>

# Remove agent
pmm-admin inventory remove agent <agent-id>

To remove the service from the user interface:

  1. Navigate to PMM Configuration > PMM Inventory.
  2. Find your Valkey/Redis service in the Services tab.
  3. Click the Remove button in the Options column.
  4. Confirm the removal when prompted.

Next steps

After successfully connecting your Valkey or Redis instance to PMM: