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 Client is installed and the nodes are registered with PMM Server.
- Access to the Valkey instance (localhost or network accessible)
- 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:
-
Go to PMM Configuration > PMM Inventory > Services > Add Service.
-
Select Valkey/Redis service type.
-
Fill in the Main details section:
- Service name: e.g.,
valkey-primary-svc. This defaults tohostnameif 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).
- Service name: e.g.,
-
Configure Labels (optional): Add descriptive tags. For clustered/replicated setups, ensure you set the
rolelabel 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
- Environment: Specify the environment (e.g.,
-
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.
-
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:
- List all Valkey/Redis services and their status:
pmm-admin inventory list services --service-type=valkey
-
List all Valkey/Redis exporter agents:
pmm-admin inventory list agents --agent-type=valkey_exporter -
Check the overall PMM Client status:
pmm-admin status -
View all services in a simple list:
pmm-admin list
To verify your service in the web interface:
- Navigate to PMM Configuration > PMM Inventory.
- In the Services tab, find your newly added Valkey/Redis service.
- Verify the Service Name and Address match your configuration.
- Check the Status column shows as Active.
- 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.
-
Open the Home dashboard and verify your Valkey/Redis service appears in the Monitored DB Services and Monitored DB Instances panels.
-
Navigate to the Valkey/Redis dashboards from the left menu. PMM provides 10 dedicated dashboards:
- Clients: Monitor client connections and blocked clients
- Cluster Details: Track cluster topology and replication health
- Command Details: Analyze command-level performance and latency
- Load: Monitor workload distribution and throughput
- Memory: Track memory usage and eviction patterns
- Network: Monitor network bandwidth consumption
- Overview: Get a high-level summary of deployment health
- Persistence: Verify AOF and RDB persistence operations
- Replication: Monitor replication lag and synchronization
-
Slowlog: Track slow command execution
-
Select your Valkey or Redis service from the drop-down menu.
-
Confirm that metrics are appearing on the dashboards.
-
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:
- Navigate to PMM Configuration > PMM Inventory.
- Find your Valkey/Redis service in the Services tab.
- Click the Remove button in the Options column.
- Confirm the removal when prompted.
Next steps¶
After successfully connecting your Valkey or Redis instance to PMM:
-
Familiarize yourself with the 10 Valkey/Redis dashboards to understand your database performance baseline. Navigate to the Valkey/Redis section in the left menu to access all monitoring dashboards.
-
Configure alerts for critical metrics like memory usage, replication lag, or slow queries.
-
Use PMM Inventory to view and manage all your monitored services.
-
Use the insights from Valkey/Redis Command Details and Valkey Redis Slowlog dashboards to identify and optimize slow queries. Check Query Analytics if slowlog data is available for your setup.