---
title: "Redis integration | Grafana Cloud documentation"
description: "Learn about Redis Grafana Cloud integration."
---

> For a curated documentation index, see [llms.txt](/llms.txt). For the complete documentation index, see [llms-full.txt](/llms-full.txt).

# Redis integration for Grafana Cloud

Redis is an in-memory data structure store frequently used as a key-value data store, cache, and message broker.

This integration includes 6 useful alerts and 1 pre-built dashboard to help monitor and visualize Redis metrics.

## Before you begin

A user must be created in Redis for Grafana Alloy in order to connect to the cluster. We strongly recommend that you configure a separate user for Alloy, and give it only the strictly mandatory security privileges necessary for monitoring your node, as per the [official documentation](https://github.com/oliver006/redis_exporter#authenticating-with-redis).

## Install Redis integration for Grafana Cloud

1. In your Grafana Cloud stack, click **Connections** in the left-hand menu.
2. Find **Redis** and click its tile to open the integration.
3. Review the prerequisites in the **Configuration Details** tab and set up Grafana Alloy to send Redis metrics to your Grafana Cloud instance.
4. Click **Install** to add this integration’s pre-built dashboard and alerts to your Grafana Cloud instance, and you can start monitoring your Redis setup.

## Configuration snippets for Grafana Alloy

### Simple mode

These snippets are configured to scrape a single Redis instance running locally with default ports.

First, **manually** copy and append the following snippets into your alloy configuration file.

### Integrations snippets

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
prometheus.exporter.redis "integrations_redis_exporter" {
	redis_addr = "localhost:6379"
}

discovery.relabel "integrations_redis_exporter" {
	targets = prometheus.exporter.redis.integrations_redis_exporter.targets

	rule {
		target_label = "instance"
		replacement  = constants.hostname
	}

	rule {
		target_label = "job"
		replacement  = "integrations/redis_exporter"
	}
}

prometheus.scrape "integrations_redis_exporter" {
	targets    = discovery.relabel.integrations_redis_exporter.output
	forward_to = [prometheus.remote_write.metrics_service.receiver]
	job_name   = "integrations/redis_exporter"
}
```

### Advanced mode

The following snippets provide examples to guide you through the configuration process.

To instruct Grafana Alloy to scrape your Redis instances, **manually** copy and append the snippets to your alloy configuration file, then follow subsequent instructions.

### Advanced integrations snippets

Alloy ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```alloy
prometheus.exporter.redis "integrations_redis_exporter" {
	redis_addr = "localhost:6379"
}

discovery.relabel "integrations_redis_exporter" {
	targets = prometheus.exporter.redis.integrations_redis_exporter.targets

	rule {
		target_label = "instance"
		replacement  = constants.hostname
	}

	rule {
		target_label = "job"
		replacement  = "integrations/redis_exporter"
	}
}

prometheus.scrape "integrations_redis_exporter" {
	targets    = discovery.relabel.integrations_redis_exporter.output
	forward_to = [prometheus.remote_write.metrics_service.receiver]
	job_name   = "integrations/redis_exporter"
}
```

This integrations uses the [prometheus.exporter.redis](/docs/alloy/latest/reference/components/prometheus.exporter.redis/) component to generate metrics from a Redis instance.

Make sure to change the `redis_addr` to the addresses of the Redis server you want to monitor in the Alloy config.

For the full array of configuration options, refer to the [prometheus.exporter.redis](/docs/alloy/latest/reference/components/prometheus.exporter.redis/) component reference documentation.

This exporter must be linked with a [discovery.relabel](/docs/alloy/latest/reference/components/discovery.relabel/) component to apply the necessary relabelings.

For each Redis instance to be monitored you must create a pair of these components.

Configure the following properties within each `discovery.relabel` component:

- `instance` label: `constants.hostname` sets the `instance` label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this Redis instance.

You can then scrape them by including each `discovery.relabel` under `targets` within the [prometheus.scrape](/docs/alloy/latest/reference/components/prometheus.scrape/) component.

## Dashboards

The Redis integration installs the following dashboards in your Grafana Cloud instance to help monitor your system.

- Redis Dashboard for Prometheus Redis Exporter 1.x

**Overview**

## Alerts

The Redis integration includes the following useful alerts:

Expand table

| Alert                   | Description                                                                                      |
|-------------------------|--------------------------------------------------------------------------------------------------|
| RedisDown               | Critical: Redis down (instance {{ $labels.instance }})                                           |
| RedisOutOfMemory        | Warning: Redis out of memory (instance {{ $labels.instance }})                                   |
| RedisTooManyConnections | Warning: Redis too many connections (instance {{ $labels.instance }})                            |
| RedisClusterSlotFail    | Warning: Number of hash slots mapping to a node in FAIL state (instance {{ $labels.instance }})  |
| RedisClusterSlotPfail   | Warning: Number of hash slots mapping to a node in PFAIL state (instance {{ $labels.instance }}) |
| RedisClusterStateNotOk  | Critical: Redis cluster state is not ok (instance {{ $labels.instance }})                        |

## Metrics

The most important metrics provided by the Redis integration, which are used on the pre-built dashboard and Prometheus alerts, are as follows:

- redis\_blocked\_clients
- redis\_cluster\_slots\_fail
- redis\_cluster\_slots\_pfail
- redis\_cluster\_state
- redis\_commands\_duration\_seconds\_total
- redis\_commands\_total
- redis\_connected\_clients
- redis\_connected\_slaves
- redis\_db\_keys
- redis\_db\_keys\_expiring
- redis\_evicted\_keys\_total
- redis\_keyspace\_hits\_total
- redis\_keyspace\_misses\_total
- redis\_master\_last\_io\_seconds\_ago
- redis\_memory\_fragmentation\_ratio
- redis\_memory\_max\_bytes
- redis\_memory\_used\_bytes
- redis\_memory\_used\_rss\_bytes
- redis\_total\_system\_memory\_bytes
- redis\_up
- up

## Changelog

md ![Copy code to clipboard](/media/images/icons/icon-copy-small-2.svg) Copy

```md
# 1.0.0 - December 2025

* Chore: Fix incorrect semver to 1.0.0. No further changes

# 0.0.6 - November 2023

* Replaced Angular dashboard panels with React panels

# 0.0.5 - July 2023

* New Filter Metrics option for configuring the Grafana Agent, which saves on metrics cost by dropping any metric not used by this integration. Beware that anything custom built using metrics that are not on the snippet will stop working.
* New hostname relabel option, which applies the instance name you write on the text box to the Grafana Agent configuration snippets, making it easier and less error prone to configure this mandatory label.

# 0.0.4 - May 2023

* Update mixin to latest version:
  - Add RedisClusterSlot alerts
  
# 0.0.3 - May 2022

* Update mixin to latest version:
  - Fix selector

# 0.0.2 - October 2021

* Update mixin to latest version:
  - Update queries to use $__rate_interval

# 0.0.1 - October 2020

* Initial release
```

## Cost

By connecting your Redis instance to Grafana Cloud, you might incur charges. To view information on the number of active series that your Grafana Cloud account uses for metrics included in each Cloud tier, see [Active series and dpm usage](/docs/grafana-cloud/fundamentals/active-series-and-dpm/) and [Cloud tier pricing](/products/cloud/pricing/).
