Technologies/Redis/redis.db.keys
RedisRedisMetric

redis.db.keys

Number of keys in the database
Dimensions:None
Available on:OpenTelemetryOpenTelemetry (1)DatadogDatadog (1)Native (1)PrometheusPrometheus (1)

Summary

Current count of all keys stored in a specific Redis database (0-15 by default). This fundamental metric indicates dataset size and growth trends. Rapid growth may signal data accumulation issues, particularly if keys lack TTL settings. Compare across databases to identify which logical database (e.g., db0, db1) consumes the most keyspace. Use with memory metrics to calculate average key size and identify memory efficiency issues.

Interface Metrics (4)
OpenTelemetryOpenTelemetry
Number of keys in the database
Dimensions:None
DatadogDatadog
Number of keys in the database
Dimensions:None
Native
Number of keys in the database
Dimensions:None
PrometheusPrometheus
Number of keys in the database
Dimensions:None
Related Insights (1)
Expiring Keys Without TTL Monitoring Causes Memory Leakswarning

When redis.persist count is high relative to redis.db.expires, many keys lack TTLs and will accumulate indefinitely, causing memory growth. redis.keyspace.avg_ttl can indicate if TTL values are too long for workload patterns.