Monitoring Commands¶
Stats, alerts, and logs for Redis Enterprise clusters.
Statistics¶
Cluster Stats¶
# Current stats
redisctl enterprise cluster stats
# Continuous monitoring
redisctl enterprise cluster stats --follow
# As JSON
redisctl enterprise cluster stats -o json
Node Stats¶
# All nodes
redisctl enterprise node stats
# Specific node
redisctl enterprise node stats 1
# Continuous
redisctl enterprise node stats 1 --follow
Database Stats¶
# Specific database
redisctl enterprise database stats 1
# Multiple databases
redisctl enterprise database stats 1 2 3
# Continuous monitoring
redisctl enterprise database stats 1 --follow
Alerts¶
List Alerts¶
Filter Alerts¶
# As JSON
redisctl enterprise alert list -o json
# Count alerts
redisctl enterprise alert list -o json -q 'length(@)'
# Critical only
redisctl enterprise alert list -o json -q '[?severity==`critical`]'
Logs¶
View Logs¶
# Cluster logs
redisctl api enterprise get /v1/logs
# Recent entries
redisctl api enterprise get /v1/logs -q '[-10:]'
Common Monitoring Tasks¶
Quick Health Dashboard¶
#!/bin/bash
echo "=== Cluster Health ==="
redisctl enterprise cluster get -o json -q '{status: status, nodes: total_node_count}'
echo -e "\n=== Node Status ==="
redisctl enterprise node list -o json -q '[].{id: uid, status: status}'
echo -e "\n=== Active Alerts ==="
redisctl enterprise alert list -o json -q 'length(@)'
Memory Usage Report¶
redisctl enterprise database list -o json -q '[].{
name: name,
allocated_mb: to_number(memory_size) / `1048576`,
used_mb: to_number(used_memory) / `1048576`,
pct: to_number(used_memory) / to_number(memory_size) * `100`
} | sort_by(@, &pct) | reverse(@)'
Watch for Issues¶
# Monitor and alert on unhealthy nodes
watch -n 30 'redisctl enterprise node list -o json -q "[?status!=\`active\`]"'
Raw API Access¶
# Cluster alerts
redisctl api enterprise get /v1/cluster/alerts
# Cluster stats
redisctl api enterprise get /v1/cluster/stats
# Node stats
redisctl api enterprise get /v1/nodes/stats
# Database stats
redisctl api enterprise get /v1/bdbs/1/stats