Skip to content
Last9
Book demo

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

CategoryMetrics (in Last9, dots become underscores)
Memoryredis_memory_used, redis_memory_peak, redis_memory_rss, redis_memory_fragmentation_ratio, redis_maxmemory
Cacheredis_keyspace_hits, redis_keyspace_misses
Evictionsredis_keys_evicted, redis_keys_expired
Connectionsredis_clients_connected, redis_clients_blocked, redis_connections_rejected
Throughputredis_commands, redis_commands_processed, redis_net_input, redis_net_output
Replicationredis_replication_offset, redis_slaves_connected, redis_role
Persistenceredis_rdb_changes_since_last_save, redis_uptime
Databaseredis_db_keys, redis_db_expires, redis_db_avg_ttl
HostCPU, memory, disk, network
  1. 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
  2. Install OpenTelemetry Collector

    wget https://github.com/open-telemetry/opentelemetry-collector-releases/releases/download/v0.144.0/otelcol-contrib_0.144.0_linux_amd64.deb
    sudo dpkg -i otelcol-contrib_0.144.0_linux_amd64.deb
  3. 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: true
    tls:
    insecure: true
    metrics:
    redis.maxmemory:
    enabled: true
    redis.role:
    enabled: true
    hostmetrics:
    collection_interval: 60s
    scrapers:
    cpu:
    metrics:
    system.cpu.logical.count:
    enabled: true
    memory:
    metrics:
    system.memory.utilization:
    enabled: true
    system.memory.limit:
    enabled: true
    load:
    disk:
    filesystem:
    metrics:
    system.filesystem.utilization:
    enabled: true
    network:
    paging:
    processors:
    batch:
    timeout: 5s
    send_batch_size: 10000
    send_batch_max_size: 10000
    resourcedetection/system:
    detectors: ["system"]
    system:
    hostname_sources: ["os"]
    resource/redis:
    attributes:
    - key: service.name
    value: redis
    action: insert
    - key: db.system
    value: redis
    action: insert
    exporters:
    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]
  4. Start the Collector

    sudo systemctl daemon-reload
    sudo systemctl enable otelcol-contrib
    sudo systemctl start otelcol-contrib

    Check it’s running:

    sudo systemctl status otelcol-contrib
    sudo 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.usedredis_memory_used).

Key metrics to confirm data is flowing:

# Memory usage
redis_memory_used
# Cache hit ratio
rate(redis_keyspace_hits[5m]) / (rate(redis_keyspace_hits[5m]) + rate(redis_keyspace_misses[5m]))
# Connected clients
redis_clients_connected
# Eviction rate
rate(redis_keys_evicted[5m])

Troubleshooting

Cannot connect to Redis Cloud endpoint

Test connectivity directly:

redis-cli -h <host> -p <port> -a <password> PING

If 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 error

Validate your config:

otelcol-contrib --config /etc/otelcol-contrib/config.yaml validate

Need Help?