Redis Cloud
Monitor Redis Cloud metrics using OpenTelemetry Collector and Last9
Use OpenTelemetry to collect Redis Cloud metrics and send them to Last9. This integration works with both Redis Cloud Essentials (free tier) and Pro, using the OTel redis receiver which connects over the standard Redis protocol.
Prerequisites
- Redis Cloud account with a database (redis.io/try-free for free tier)
- Redis Cloud database endpoint and password (from the database → General → Endpoint section)
- Last9 account with OTLP credentials
What it collects
| Category | Metrics (in Last9, dots become underscores) |
|---|---|
| Memory | redis_memory_used, redis_memory_peak, redis_memory_rss, redis_memory_fragmentation_ratio, redis_maxmemory |
| Cache | redis_keyspace_hits, redis_keyspace_misses |
| Evictions | redis_keys_evicted, redis_keys_expired |
| Connections | redis_clients_connected, redis_clients_blocked, redis_connections_rejected |
| Throughput | redis_commands, redis_commands_processed, redis_net_input, redis_net_output |
| Replication | redis_replication_offset, redis_slaves_connected, redis_role |
| Persistence | redis_rdb_changes_since_last_save, redis_uptime |
| Database | redis_db_keys, redis_db_expires, redis_db_avg_ttl |
| Host | CPU, memory, disk, network |
-
Get your Redis Cloud endpoint
From the Redis Cloud console, open your database and copy:
- Endpoint — e.g.
redis-19972.c265.us-east-1-2.ec2.cloud.redislabs.com:19972 - Password — under Security → Default user password
Test connectivity:
redis-cli -h <endpoint-host> -p <endpoint-port> -a <password> PING# Expected: PONG - Endpoint — e.g.
-
Install OpenTelemetry Collector
wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.144.0/otelcol-contrib_0.144.0_linux_amd64.debsudo dpkg -i otelcol-contrib_0.144.0_linux_amd64.debwget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.144.0/otelcol-contrib_0.144.0_linux_amd64.rpmsudo rpm -ivh otelcol-contrib_0.144.0_linux_amd64.rpmdocker run --rm \-e REDIS_ENDPOINT=<your-endpoint> \-e REDIS_PASSWORD=<your-password> \-e OTEL_EXPORTER_OTLP_ENDPOINT="$last9_otlp_endpoint" \-e OTEL_EXPORTER_OTLP_HEADERS_AUTHORIZATION="$last9_otlp_auth_header" \-v $(pwd)/otel-collector-config.yaml:/etc/otel/config.yaml \otel/opentelemetry-collector-contrib:0.144.0 \--config /etc/otel/config.yaml -
Configure OpenTelemetry Collector
Create or update
/etc/otelcol-contrib/config.yaml:receivers:redis:endpoint: "<your-redis-cloud-endpoint>:<port>"password: "<your-redis-password>"collection_interval: 10s# Redis Cloud Essentials: TLS may not be required# Redis Cloud Pro: set insecure: false, insecure_skip_verify: truetls:insecure: truemetrics:redis.maxmemory:enabled: trueredis.role:enabled: truehostmetrics:collection_interval: 60sscrapers:cpu:metrics:system.cpu.logical.count:enabled: truememory:metrics:system.memory.utilization:enabled: truesystem.memory.limit:enabled: trueload:disk:filesystem:metrics:system.filesystem.utilization:enabled: truenetwork:paging:processors:batch:timeout: 5ssend_batch_size: 10000send_batch_max_size: 10000resourcedetection/system:detectors: ["system"]system:hostname_sources: ["os"]resource/redis:attributes:- key: service.namevalue: redisaction: insert- key: db.systemvalue: redisaction: insertexporters:otlp_grpc/last9:endpoint: "{{ .Logs.WriteURL }}"headers:"Authorization": "{{ .Logs.AuthValue }}"service:pipelines:metrics:receivers: [redis, hostmetrics]processors: [batch, resourcedetection/system, resource/redis]exporters: [otlp_grpc/last9] -
Start the Collector
sudo systemctl daemon-reloadsudo systemctl enable otelcol-contribsudo systemctl start otelcol-contribCheck it’s running:
sudo systemctl status otelcol-contribsudo journalctl -u otelcol-contrib -f
Verification
Once the collector is running, metrics appear in Last9 within a few seconds.
In the Last9 metrics explorer, search for redis_ — OTel metric names use dots which are converted to underscores on ingestion (e.g. redis.memory.used → redis_memory_used).
Key metrics to confirm data is flowing:
# Memory usageredis_memory_used
# Cache hit ratiorate(redis_keyspace_hits[5m]) / (rate(redis_keyspace_hits[5m]) + rate(redis_keyspace_misses[5m]))
# Connected clientsredis_clients_connected
# Eviction raterate(redis_keys_evicted[5m])Troubleshooting
Cannot connect to Redis Cloud endpoint
Test connectivity directly:
redis-cli -h <host> -p <port> -a <password> PINGIf this fails, verify the endpoint is publicly accessible. Redis Cloud Essentials databases are public by default; Pro databases may require VPC peering.
No metrics appearing in Last9
Check collector logs for errors:
sudo journalctl -u otelcol-contrib --no-pager | grep -i errorValidate your config:
otelcol-contrib --config /etc/otelcol-contrib/config.yaml validateNeed Help?
- Join our Discord community for real-time support
- Contact our support team at support@last9.io