Redis Enterprise integration for Grafana Cloud
Redis Enterprise is an enterprise-grade deployment strategy for Redis, the popular and efficient database used for caching, message brokering, and data streaming. Redis Enterprise provides deployment solutions and tools for creating and maintaining both on-prem and cloud solutions.
This integration includes useful metrics to monitor Redis Enterprise deployments. Metrics like memory usage, CPU usage, replication lag, networking and log data can help teams discern, identify and visualize their Redis Enterprise environments, allowing you to monitor your environment down to the clusters, node and database level.
This integration supports Redis Enterprise software versions v6.X+.
This integration includes 8 useful alerts and 3 pre-built dashboards to help monitor and visualize Redis Enterprise metrics and logs.
Before you begin
You must configure your Redis Enterprise cluster to export Prometheus metrics for the integration to work properly.
If you are using Redis Enterprise Cloud to manage installs/deployments, the lowest possible tier that provisions advanced monitoring is the Fixed plan.
You can access Prometheus metrics out-of-the-box if you use Redis Enterprise Software.
Generally metrics are exposed on port 8070
and are only accessible from within the cluster for security reasons. Therefore, ensure Grafana Alloy can reach the internal endpoint of your environment.
If you deploy to Kubernetes using the Redis Enterprise operator, please ensure that Grafana Alloy is installed in the same cluster or that the agent can reach the metrics endpoint.
Install Redis Enterprise integration for Grafana Cloud
- In your Grafana Cloud stack, click Connections in the left-hand menu.
- Find Redis Enterprise and click its tile to open the integration.
- Review the prerequisites in the Configuration Details tab and set up Grafana Agent to send Redis Enterprise metrics and logs to your Grafana Cloud instance.
- Click Install to add this integration’s pre-built dashboards and alerts to your Grafana Cloud instance, and you can start monitoring your Redis Enterprise setup.
Configuration snippets for Grafana Alloy
Advanced mode
The following snippets provide examples to guide you through the configuration process.
To instruct Grafana Alloy to scrape your Redis Enterprise instances, manually copy and append the snippets to your alloy configuration file, then follow subsequent instructions.
Advanced metrics snippets
discovery.relabel "metrics_integrations_integrations_redis_enterprise" {
targets = [{
__address__ = "<your-redis-enterprise-exporter>:8070",
}]
rule {
target_label = "redis_cluster"
replacement = "<your-cluster-name>"
}
rule {
target_label = "instance"
replacement = constants.hostname
}
}
prometheus.scrape "metrics_integrations_integrations_redis_enterprise" {
targets = discovery.relabel.metrics_integrations_integrations_redis_enterprise.output
forward_to = [prometheus.remote_write.metrics_service.receiver]
job_name = "integrations/redis-enterprise"
scheme = "https"
tls_config {
insecure_skip_verify = true
}
}
To monitor your Redis Enterprise instance, you must use a discovery.relabel component to discover your Redis Enterprise Prometheus endpoint and apply appropriate labels, followed by a prometheus.scrape component to scrape it.
Configure the following properties within each discovery.relabel
component:
__address__
: The address to your Redis Enterprise Prometheus metrics endpoint.instance
label:constants.hostname
sets theinstance
label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this Redis Enterprise instance. Make sure this label value is the same for all telemetry data collected for this instance.redis_cluster
: Theredis_cluster
label to group your Redis Enterprise instances within a cluster. Set the same value for all nodes within your cluster.
If you have multiple Redis Enterprise servers to scrape, configure one discovery.relabel
for each and scrape them by including each under targets
within the prometheus.scrape
component.
Advanced logs snippets
linux
local.file_match "logs_integrations_integrations_redis_enterprise" {
path_targets = [{
__address__ = "localhost",
__path__ = "/var/opt/redislabs/log/redis-*.log",
instance = constants.hostname,
job = "integrations/redis-enterprise",
redis_cluster = "<your-cluster-name>",
}]
}
loki.source.file "logs_integrations_integrations_redis_enterprise" {
targets = local.file_match.logs_integrations_integrations_redis_enterprise.targets
forward_to = [loki.write.grafana_cloud_loki.receiver]
}
To monitor your Redis Enterprise instance logs, you will use a combination of the following components:
local.file_match defines where to find the log file to be scraped. Change the following properties according to your environment:
__address__
: The Redis Enterprise instance address__path__
: database logs are generally found at/var/opt/redislabs/log/redis.log
, adjust to match your environment.instance
label:constants.hostname
sets theinstance
label to your Grafana Alloy server hostname. If that is not suitable, change it to a value uniquely identifies this Redis Enterprise instance. Make sure this label value is the same for all telemetry data collected for this instance.redis_cluster
: Theredis_cluster
label to group your Redis Enterprise instances within a cluster. Set the same value for all nodes within your cluster.
loki.source.file sends logs to Loki.
You will also need to add the alloy
user to the redislabs
group to get logs. Run the following command to configure the user as required:
sudo usermod -a -G redislabs alloy
Grafana Agent static configuration (deprecated)
The following section shows configuration for running Grafana Agent in static mode which is deprecated. You should use Grafana Alloy for all new deployments.
Before you begin
You must configure your Redis Enterprise cluster to export Prometheus metrics for the integration to work properly.
If you are using Redis Enterprise Cloud to manage installs/deployments, the lowest possible tier that provisions advanced monitoring is the Fixed plan.
You can access Prometheus metrics out-of-the-box if you use Redis Enterprise Software.
Generally metrics are exposed on port 8070
and are only accessible from within the cluster for security reasons. Therefore, ensure the Grafana agent can reach the internal endpoint of your environment.
If you deploy to Kubernetes using the Redis Enterprise operator, please ensure that the Grafana agent is installed in the same cluster or that the agent can reach the metrics endpoint.
Install Redis Enterprise integration for Grafana Cloud
- In your Grafana Cloud stack, click Connections in the left-hand menu.
- Find Redis Enterprise and click its tile to open the integration.
- Review the prerequisites in the Configuration Details tab and set up Grafana Agent to send Redis Enterprise metrics and logs to your Grafana Cloud instance.
- Click Install to add this integration’s pre-built dashboards and alerts to your Grafana Cloud instance, and you can start monitoring your Redis Enterprise setup.
Post-install configuration for the Redis Enterprise integration
After enabling the metrics generation, instruct the Grafana Agent to scrape your Redis Enterprise cluster.
Change the targets
in the snippet according to your environment.
You must configure a custom label for this integration:
redis_cluster
, the value that identifies a Redis Enterprise cluster
You can define a redis_cluster
label by adding an extra label to the scrape_configs
of the Grafana agent metrics configuration.
If you want to show logs and metrics signals correlated in your dashboards as a single pane of glass, ensure the following:
job
andinstance
label values must match for the Redis Enterprise integration and log scrape config in the Grafana agent configuration file.redis_cluster
must be defined that identifies the Redis Enterprise cluster the database belongs to.- database logs are generally found at
/var/opt/redislabs/log/redis.log
, adjust to match your environment. - You will also need to add the
grafana-agent
user to theredislabs
group to get logs. Run the following command to configure the user as required:
sudo usermod -a -G redislabs grafana-agent
Configuration snippets for Grafana Agent
Below metrics.configs.scrape_configs
, insert the following lines and change the URLs according to your environment:
- job_name: integrations/redis-enterprise
metrics_path: /metrics
scheme: https
# by default redis enterprise rejects insecure connections
tls_config:
insecure_skip_verify: true
static_configs:
- targets: ['<your-redis-enterprise-exporter>:8070']
relabel_configs:
- replacement: '<your-cluster-name>'
target_label: redis_cluster
- replacement: '<your-instance-name>'
target_label: instance
Below logs.configs.scrape_configs
, insert the following lines according to your environment.
- job_name: integrations/redis-enterprise
static_configs:
- targets: [localhost]
labels:
job: integrations/redis-enterprise
redis_cluster: '<your-cluster-name>'
instance: '<your-instance-name>'
__path__: /var/opt/redislabs/log/redis-*.log
Full example configuration for Grafana Agent
Refer to the following Grafana Agent configuration for a complete example that contains all the snippets used for the Redis Enterprise integration. This example also includes metrics that are sent to monitor your Grafana Agent instance.
integrations:
prometheus_remote_write:
- basic_auth:
password: <your_prom_pass>
username: <your_prom_user>
url: <your_prom_url>
agent:
enabled: true
relabel_configs:
- action: replace
source_labels:
- agent_hostname
target_label: instance
- action: replace
target_label: job
replacement: "integrations/agent-check"
metric_relabel_configs:
- action: keep
regex: (prometheus_target_sync_length_seconds_sum|prometheus_target_scrapes_.*|prometheus_target_interval.*|prometheus_sd_discovered_targets|agent_build.*|agent_wal_samples_appended_total|process_start_time_seconds)
source_labels:
- __name__
# Add here any snippet that belongs to the `integrations` section.
# For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
logs:
configs:
- clients:
- basic_auth:
password: <your_loki_pass>
username: <your_loki_user>
url: <your_loki_url>
name: integrations
positions:
filename: /tmp/positions.yaml
scrape_configs:
# Add here any snippet that belongs to the `logs.configs.scrape_configs` section.
# For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
- job_name: integrations/redis-enterprise
static_configs:
- targets: [localhost]
labels:
job: integrations/redis-enterprise
redis_cluster: '<your-cluster-name>'
instance: '<your-instance-name>'
__path__: /var/opt/redislabs/log/redis-*.log
metrics:
configs:
- name: integrations
remote_write:
- basic_auth:
password: <your_prom_pass>
username: <your_prom_user>
url: <your_prom_url>
scrape_configs:
# Add here any snippet that belongs to the `metrics.configs.scrape_configs` section.
# For a correct indentation, paste snippets copied from Grafana Cloud at the beginning of the line.
- job_name: integrations/redis-enterprise
metrics_path: /metrics
scheme: https
# by default redis enterprise rejects insecure connections
tls_config:
insecure_skip_verify: true
static_configs:
- targets: ['<your-redis-enterprise-exporter>:8070']
relabel_configs:
- replacement: '<your-cluster-name>'
target_label: redis_cluster
- replacement: '<your-instance-name>'
target_label: instance
global:
scrape_interval: 60s
wal_directory: /tmp/grafana-agent-wal
Dashboards
The Redis Enterprise integration installs the following dashboards in your Grafana Cloud instance to help monitor your system.
- Redis Enterprise database overview
- Redis Enterprise node overview
- Redis Enterprise overview
Redis Enterprise overview (1/2)
Redis Enterprise overview (2/2)
Redis Enterprise nodes (1/2)
Alerts
The Redis Enterprise integration includes the following useful alerts:
Alert | Description |
---|---|
RedisEnterpriseClusterOutOfMemory | Critical: Cluster has run out of memory. |
RedisEnterpriseNodeNotResponding | Critical: A node in the Redis Enterprise cluster is offline or unreachable. |
RedisEnterpriseDatabaseNotResponding | Critical: A database in the Redis Enterprise cluster is offline or unreachable. |
RedisEnterpriseShardNotResponding | Critical: A shard in the Redis Enterprise cluster is offline or unreachable. |
RedisEnterpriseNodeHighCPUUtilization | Warning: Node CPU usage is above the configured threshold. |
RedisEnterpriseDatabaseHighMemoryUtilization | Warning: Node memory utilization is above the configured threshold. |
RedisEnterpriseAverageLatencyIncreasing | Warning: Operation latency is above the configured threshold. |
RedisEnterpriseKeyEvictionsIncreasing | Warning: The number of evicted objects is greater than or equal to the configured threshold. |
Metrics
The most important metrics provided by the Redis Enterprise integration, which are used on the pre-built dashboards and Prometheus alerts, are as follows:
- bdb_avg_latency
- bdb_avg_read_latency
- bdb_avg_write_latency
- bdb_conns
- bdb_crdt_ingress_bytes_decompressed
- bdb_crdt_syncer_ingress_bytes
- bdb_crdt_syncer_local_ingress_lag_time
- bdb_crdt_syncer_status
- bdb_egress_bytes
- bdb_evicted_objects
- bdb_expired_objects
- bdb_ingress_bytes
- bdb_instantaneous_ops_per_sec
- bdb_mem_frag_ratio
- bdb_mem_size_lua
- bdb_memory_limit
- bdb_no_of_keys
- bdb_read_hits
- bdb_read_misses
- bdb_read_req
- bdb_up
- bdb_used_memory
- bdb_write_req
- node_available_memory
- node_avg_latency
- node_conns
- node_cpu_system
- node_cpu_user
- node_egress_bytes
- node_ephemeral_storage_free
- node_ingress_bytes
- node_persistent_storage_free
- node_total_req
- node_up
- redis_up
- redis_used_memory
- up
Changelog
# 0.0.3 - September 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.2 - August 2023
* Add regex filter for logs datasource
# 0.0.1 - April 2023
* Initial release
Cost
By connecting your Redis Enterprise 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 and Cloud tier pricing.