> For the complete documentation index, see [llms.txt](https://docs.percona.com/percona-monitoring-and-management/3/llms.txt).

# Connect Valkey and Redis 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:

**Local Valkey/Redis monitoring**

- [PMM Server is installed](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/index.md) and running.
- [PMM Client is installed](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-client/index.md) and the nodes are registered with PMM Server.
- Access to the Valkey instance (localhost or network accessible).

**Remote Valkey/Redis monitoring**

- [PMM Server is installed](https://docs.percona.com/percona-monitoring-and-management/3/install-pmm/install-pmm-server/index.md) and running.
- PMM Server has direct network access to the Valkey/Redis instance.
- You have Valkey/Redis authentication credentials if ACL is enabled.

### Security setup

Configure proper authentication for your Valkey or Redis instance using strong credentials and appropriate access controls.

#### Password security best practices

- Use strong, unique passwords (minimum 12 characters)
- Mix uppercase/lowercase letters, numbers, and special characters
- Never use default, test, or example passwords in production

#### ACL configuration (Valkey 6.0+)

For Valkey 6.0 and later, create a dedicated monitoring user with read-only permissions:

```sh
ACL SETUSER pmm on >StrongPassword123! ~* +@read +info +config|get +slowlog +latency
```

#### Password-only authentication

For Redis or Valkey without ACL, use basic password authentication when adding the service.

### Add service to PMM

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

**Via UI**

To add the service from the user interface:

1. Go to **Inventory > Add service**.

1. Select **Valkey/Redis** service type.

1. 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).
   - **Connection timeout**: How long PMM should wait when connecting to this service. Increase this for remote or high-latency databases. If the connection times out, PMM retries the next time it collects metrics. Leave empty to use the default of 3s.

1. 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

1. 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** to turn off certificate verification. Don’t use this in production. For self-signed certificates, see [TLS certificate validation](#tls-certificate-validation) instead.

1. Click **Add service** to complete the setup.

**Via command line**

**Basic setup**

Add a local Valkey instance with default settings:

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

**With authentication**

Add a Valkey instance with authentication:

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

**With remote monitoring**

Add a remote Valkey instance:

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

**With custom labels**

Add an instance with environment and custom labels:

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

**With TLS connection**

Add an instance with TLS security:

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

For self-signed certificates or validation errors, see [TLS certificate validation](#tls-certificate-validation).

**With mutual TLS**

If your server requires a client certificate, use mutual TLS (mTLS). Pass your CA certificate, your client certificate, and its private key. Make sure to provide `--tls-cert` and `--tls-key` together, otherwise PMM rejects the command:

```sh
pmm-admin add valkey \
  Valkey-mTLS \
  valkey-server.example.com:6379 \
  --username=pmm \
  --password=StrongPassword123! \
  --tls \
  --tls-ca=/path/to/ca.pem \
  --tls-cert=/path/to/client-cert.pem \
  --tls-key=/path/to/client-key.pem
```

For self-signed certificates or validation errors, see [TLS certificate validation](#tls-certificate-validation).

**Via inventory commands (Advanced)**

PMM also provides inventory commands for more granular control:

**Add Valkey service via inventory**

```sh
pmm-admin inventory add service valkey \
Valkey-Service \
<node-id> \
localhost \
6379
```

**Add Valkey exporter agent**

```sh
pmm-admin inventory add agent valkey-exporter \
<pmm-agent-id> \
<service-id> \
pmm \
--password=StrongPassword123!
```

#### Confirmation message

If the service is added successfully, PMM displays:

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

#### TLS certificate validation

If your server uses a self-signed certificate, pass it (or its CA) with `--tls-ca`. You don’t need `--tls-skip-verify`.

If your hostname doesn’t match the certificate, connect using a hostname listed in the certificate.

Use `--tls-skip-verify` only as a last resort, and never in production. It turns off server certificate verification, so you won’t know if PMM connects to the wrong server.

## 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

**Via command line**

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

1. List all Valkey/Redis services and their status:

   ```bash
   pmm-admin inventory list services --service-type=valkey
   ```

1. List all Valkey/Redis exporter agents:

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

1. Check the overall PMM Client status:

   ```bash
   pmm-admin status
   ```

1. View all services in a simple list:

   ```bash
   pmm-admin list
   ```

**Via UI**

To verify your service in the web interface:

1. Navigate to **Inventory > Services** and find your Valkey service.
1. Verify the **Service Name** and **Address** match your configuration.
1. Check that the **Status** column shows **Up**.
1. Click the status in the **Monitoring** column to confirm that the correct agents are running.

### Verify data collection

Once the service is registered, check that its metrics are reaching PMM and showing up on the dashboards:

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

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

   - **[Clients](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-clients.md)**: Monitor client connections and blocked clients
   - **[Cluster Details](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-cluster-details.md)**: Track cluster topology and replication health
   - **[Command Details](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-command-detail.md)**: Analyze command-level performance and latency
   - **[Load](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-load.md)**: Monitor workload distribution and throughput
   - **[Memory](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-memory.md)**: Track memory usage and eviction patterns
   - **[Network](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-network.md)**: Monitor network bandwidth consumption
   - **[Overview](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-overview.md)**: Get a high-level summary of deployment health
   - **[Persistence](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-persistence-details.md)**: Verify AOF and RDB persistence operations
   - **[Replication](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-replication.md)**: Monitor replication lag and synchronization
   - **[Slowlog](https://docs.percona.com/percona-monitoring-and-management/3/reference/dashboards/dashboard-valkey-redis-slowlog.md)**: Track slow command execution

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

1. Confirm that metrics are appearing on the dashboards.

1. 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:

**Via command line**

Remove a Valkey or Redis service:

```bash
pmm-admin remove valkey Valkey-Primary
```

Or use inventory commands:

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

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

**Via UI**

To remove the service from the user interface:

1. Navigate to **Inventory > Services**.
1. Find your Valkey/Redis service in the **Services** tab.
1. Click next to the service, then select **Delete**.
1. Select **Force mode**. PMM can’t remove a service that still has agents, and Force mode removes them with the service.
1. Click **Yes, delete service**.

## Next steps

After successfully connecting your Valkey or Redis instance to PMM:

- Access the [10 Valkey/Redis dashboards](https://docs.percona.com/percona-monitoring-and-management/3/use/dashboards-panels/index.md#available-dashboards) from the left menu to track performance, memory usage, replication, and slow queries.
- [Configure alerts](https://docs.percona.com/percona-monitoring-and-management/3/alert/index.md) for critical metrics like memory usage, replication lag, and slow command execution.
- Use [PMM Inventory](https://docs.percona.com/percona-monitoring-and-management/3/use/dashboard-inventory.md) to view and manage all monitored instances.
- [Valkey official documentation](https://valkey.io/docs/)
- [Redis official Documentation](https://redis.io/docs/)
- [pmm-admin command reference](https://docs.percona.com/percona-monitoring-and-management/3/use/commands/pmm-admin/pmm-admin.md)
