To get Redis logs and slow commands into OpenSearch on Logit.io, enable both filesets of the Filebeat redis module: log tails the Redis log file, and slowlog connects to Redis every 10 seconds to run SLOWLOG GET and then SLOWLOG RESET, because the slow log only exists in memory. Your stack's Logstash routes both to managed ingest pipelines and stores them in daily filebeat-* indices, where log.level, redis.log.role, redis.slowlog.cmd and redis.slowlog.duration.us are ready to search and the stock Filebeat Redis dashboard can read them. Evictions and out-of-memory rejections never reach either source, so take those from INFO with the Telegraf redis input.
This guide is for teams running their own Redis servers, on VMs or in containers, who want to answer three questions from their logs: what was Redis complaining about, which commands held it up, and did a replica fall behind or drop off. It covers the redis.conf settings worth changing, the module config (with two behaviours that catch almost everyone: Filebeat keeps at most 10 slow log entries per poll, and it can only sign in as the default user), how to prove both filesets work in five minutes, the fields you'll query, searches, PPL summaries, alert rules and what changes on managed Redis. The redis.conf, module and processor configs were tested on a local machine against Redis 8.10.3 and Filebeat 8.19.25. Command output and documents shown are illustrative, with placeholder hosts.
Contents
- Two Redis sources, two ways in
- Set redis.conf for a log and slow log worth keeping
- Configure the Filebeat redis module
- Prove both filesets in five minutes
- The fields you'll search on filebeat-*
- What the stock Redis dashboard shows
- Searches for warnings, replication and slow commands
- Reading lag: slow commands, forks and resyncs
- Evictions and OOM errors live in INFO, not the log
- Alerts for warnings, broken replication and slow bursts
- When Redis events arrive wrong or not at all
- Managed Redis: ElastiCache, Memorystore and Azure
- What this setup can't tell you
- FAQ
- Next steps
Two Redis sources, two ways in
Redis keeps two records that matter during an incident, and Filebeat collects them in completely different ways. The server log is a text file Redis appends to. The slow log is a list in Redis's own memory, and the only way to read it is to ask Redis over the network.
- Redis writes server events to
logfileat the level set byloglevel, and keeps every command slower thanslowlog-log-slower-thanin an in-memory list capped atslowlog-max-lenentries. - The
logfileset tails the file like any other log, remembering its place in Filebeat's registry. - The
slowlogfileset is a network input. On every poll it sendsSLOWLOG GET,SLOWLOG RESETandROLEtogether, turns each entry into an event and empties the list, so the next poll only sees new entries. - Logstash on your Logs stack receives both over Beats with TLS. Each event carries a pipeline marker from the module, and Logstash sends
redis-logevents andredis-slowlogevents to the matching managed ingest pipelines. - The ingest pipelines parse the log line into level, role, process ID and timestamp. Slow log events arrive already structured, so their pipeline leaves them as they are. Both land in daily
filebeat-*indices, which you search in OpenSearch Dashboards.
| Server log | Slow log | |
|---|---|---|
| Where it lives | A file, or stdout in containers | Redis memory only |
| Filebeat fileset | log (file input) | slowlog (Redis network input) |
| What it records | Startup, persistence, replication, warnings | Commands slower than the threshold |
event.dataset | redis.log | redis.slowlog |
| Needs a Redis password | No | Yes, if Redis has one |
| Timestamp precision | Milliseconds, server local time | Whole seconds, UTC |
| Can lose entries | Only if the file is rotated away before Filebeat reads it | Yes, see the 10-entry limit below |
The two filesets fail independently. A wrong path stops the log and leaves the slow log working; a wrong password does the opposite. Check them separately every time.
Set redis.conf for a log and slow log worth keeping
Four settings decide what you'll have to search. This block suits a production primary or replica on Redis 6.x to 8.x:
# Debian and Ubuntu: /etc/redis/redis.conf
# Tested on Redis 8.10.3; the same names work on Redis 6.x and 7.x
loglevel notice
logfile /var/log/redis/redis-server.log
syslog-enabled no
# Slow log: in memory, read with SLOWLOG GET, never written to logfile
slowlog-log-slower-than 10000
slowlog-max-len 1024
| Setting | Default | Suggested | Why |
|---|---|---|---|
loglevel | notice | notice | warning hides replication and persistence events you'll want; verbose and debug are for short investigations. |
logfile | "" (stdout) | A file path | Package installs set a path already. Can't be changed with CONFIG SET. |
slowlog-log-slower-than | 10000 | 10000 | Microseconds, so 10 ms. Lower it on latency-sensitive caches, but read the 10-entry limit first. |
slowlog-max-len | 128 | 1024 | Room for a burst between polls and for anyone running SLOWLOG GET by hand. Costs little memory. |
Everything except logfile and syslog-enabled can be changed without a restart. Set the values live, then write them back to the config file so they survive the next restart:
redis-cli CONFIG SET slowlog-log-slower-than 10000
redis-cli CONFIG SET slowlog-max-len 1024
redis-cli CONFIG SET loglevel notice
redis-cli CONFIG REWRITE
redis-cli CONFIG GET 'slowlog-*'
Three details save confusion later. The slow log measures execution time only, not the time spent reading the request or sending the reply, so a command can be slow for the client without appearing here, and a slow log entry always means Redis itself was busy and every other client was waiting. Long commands are trimmed before they're stored: after 32 arguments the rest are replaced with ... (N more arguments), and any argument over 128 bytes ends in ... (N more bytes). Redis 8.8 and later let you change both limits with slowlog-entry-max-argc and slowlog-entry-max-string-len. And if syslog-enabled is yes, the log goes to syslog or the journal, not to a file the module can tail.
The slow log stores command arguments, which can include values your application writes. Redis replaces AUTH arguments with (redacted), but a SET session:abc123 <token> that happens to be slow is stored as typed. hide-user-data-from-log yes keeps keys and values out of the server log on Redis 7.4 and later; it doesn't change the slow log. The Filebeat section below shows how to drop arguments before they leave the server.
Configure the Filebeat redis module
Follow the Redis integration guide while signed in to Logit.io, and choose Install Integration on that page for the stack you're sending to. Install Filebeat on the Redis server itself. The examples here use Filebeat 8.19.25 on Linux. Enable the module with sudo filebeat modules enable redis, then replace the contents of /etc/filebeat/modules.d/redis.yml. Both filesets are off until you set enabled: true:
# /etc/filebeat/modules.d/redis.yml (Filebeat 8.19.25)
- module: redis
log:
enabled: true
# Leave var.paths out on Debian and Ubuntu package installs.
#var.paths: ["/var/log/redis/redis.log*"]
slowlog:
enabled: true
var.hosts: ["127.0.0.1:6379"]
# The default user's password. Named ACL users don't work here.
var.password: "${REDIS_DEFAULT_PASSWORD}"
input:
scan_frequency: 5s
Keep the password out of the file with the Filebeat keystore, which the ${REDIS_DEFAULT_PASSWORD} reference reads from:
sudo filebeat keystore create
sudo filebeat keystore add REDIS_DEFAULT_PASSWORD
Then set the output in /etc/filebeat/filebeat.yml. Copy the block from the integration guide, which fills in your stack's Logstash host and Beats SSL port:
filebeat.config.modules:
path: ${path.config}/modules.d/*.yml
reload.enabled: false
output.logstash:
hosts: ["your-logstash-host:your-ssl-port"]
loadbalance: true
ssl.enabled: true
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
add_host_metadata sets host.name, which is how you'll tell a primary from its replicas in every search below. The module itself doesn't record which Redis port a slow log entry came from, so if you run several instances on one host, give each its own Filebeat config or tell them apart by role. Enable, test and start:
sudo filebeat test config
sudo filebeat test output
sudo systemctl enable --now filebeat
sudo journalctl -u filebeat -f
Where the log file is
Without var.paths, the module reads /var/log/redis/redis-server.log* on Linux and skips .gz files. That fits Debian and Ubuntu packages and very little else:
| Install | Typical log | Default path finds it? |
|---|---|---|
| Debian or Ubuntu package | /var/log/redis/redis-server.log | Yes |
| RHEL, Rocky or Alma package | /var/log/redis/redis.log | No, set var.paths |
| Built from source | Whatever logfile says, or stdout | Usually not |
| Official Docker image | Container stdout | No, see below |
Ask the server rather than guessing: redis-cli CONFIG GET logfile. An empty value means stdout. For Redis in containers, let Filebeat read the container log and apply the module with autodiscover hints. On Kubernetes these go in pod annotations, on Docker in container labels:
# Pod or container labels for Filebeat autodiscover with hints enabled
co.elastic.logs/module: redis
co.elastic.logs/fileset: log
That covers the server log. The slow log still needs a slowlog fileset pointed at the container's address, and the Kubernetes container logs guide covers the Filebeat side of autodiscover.
Authentication: the default user only
The slowlog fileset takes a password and nothing else. Its input does have a username setting, but in Filebeat 8.19.25 the connection sends the one-argument form, AUTH <password>, which Redis treats as a sign-in for the default user. Set input.username and var.password for a named ACL user and Filebeat still sends AUTH with only the password. If the default user has no password, you'll see this in Filebeat's log on every poll (illustrative output):
Error running input: error sending slowlog get: ERR AUTH <password> called without any password configured for the default user. Are you sure your configuration is correct?
If the default user does have a password, the same mistake shows up as WRONGPASS invalid username-password pair or user is disabled.
So on Redis 6 and later, Filebeat needs the password of the default user, whether that comes from requirepass or from an ACL rule for default. You can't give it a least-privilege account with only +slowlog and +role, which would otherwise be the right design. If your security model forbids sharing the default password, the slow log fileset isn't usable as it stands, and the server log fileset still is.
TLS to Redis
Redis with TLS turned on needs the input's ssl settings, passed through the fileset's input block:
slowlog:
enabled: true
var.hosts: ["your-redis-host:6380"]
var.password: "${REDIS_DEFAULT_PASSWORD}"
input:
scan_frequency: 5s
ssl:
enabled: true
certificate_authorities: ["/etc/filebeat/redis-ca.pem"]
The certificate settings are the standard Beats ssl options, so client certificates work the same way if Redis asks for them. This is separate from the TLS between Filebeat and your stack, which ssl.enabled: true in the output handles.
The 10-entry limit and how to live with it
This is the behaviour that matters most, and the module docs don't spell it out. Filebeat calls SLOWLOG GET with no count, and Redis answers that with the 10 newest entries. Filebeat then calls SLOWLOG RESET, which clears the whole list. If 25 commands go slow between two polls, Filebeat ships the newest 10 and the other 15 are gone. On the test machine, 25 slow KEYS calls before a poll produced exactly 10 events, and the slow log was empty afterwards.
You can't change the count, but you can make it matter less:
- Poll more often.
scan_frequencydefaults to10s. The config above uses5s; on a busy cache,1sis reasonable, because each poll is three cheap commands. - Keep the threshold honest. A threshold so low that dozens of commands cross it every second turns the slow log into a sample. Raise it until a normal minute produces a handful of entries.
- Measure the loss. Every slow log entry has an
idthat keeps counting across resets and only restarts with Redis. Gaps inredis.slowlog.idfor one host are entries that were never shipped, and the PPL query further down counts them.
The reset has a second side effect. Anyone else reading the slow log, whether a person running SLOWLOG GET during an incident or another monitoring tool, will find it nearly empty. Tell the team that the slow log now lives in OpenSearch, and run only one tool that resets it. Filebeat also logs EXPERIMENTAL: Redis slowlog input is enabled at start-up; that's a label on the input, not an error.
Drop arguments before they leave the server
The slow log event carries every argument twice: in redis.slowlog.args and joined into message. If slow commands could carry tokens or personal data, remove both on the Filebeat side. Add these to the processors list in filebeat.yml:
processors:
- add_host_metadata:
when.not.contains.tags: forwarded
- drop_fields:
when.equals.event.dataset: redis.slowlog
fields: ["redis.slowlog.args"]
ignore_missing: true
- script:
when.equals.event.dataset: redis.slowlog
lang: javascript
source: >
function process(event) {
var cmd = event.Get("redis.slowlog.cmd");
var key = event.Get("redis.slowlog.key");
event.Put("message", key ? cmd + " " + key : cmd);
}
With this in place, a slow SET user:42:token <value> arrives as message: SET user:42:token with no value anywhere in the event. The key name still arrives in redis.slowlog.key; if key names are sensitive too, drop that field as well and keep only the command and duration.
Prove both filesets in five minutes
Do this on a staging server, or a production one at a quiet moment, because the Lua loop below blocks Redis for about 20 ms. Run each command with your usual redis-cli connection options:
# 1. Notice lines in the log file
redis-cli BGSAVE
# 2. One slow command: a Lua loop that holds Redis for about 20 ms
redis-cli EVAL "local i = 0 while i < 2000000 do i = i + 1 end return i" 0
# 3. Check the slow log has it, then wait for Filebeat's next poll
redis-cli SLOWLOG LEN
sleep 10
redis-cli SLOWLOG LEN
The two SLOWLOG LEN answers should look like this, one entry before the poll and none after, because Filebeat took it (illustrative output):
(integer) 1
(integer) 0
If the second answer is still 1, the slow log fileset isn't connecting: check journalctl -u filebeat for AUTH or connection errors. Now open Discover on the filebeat-* index pattern, set the time range to the last 15 minutes and search for each fileset, using your server's host name:
event.dataset:redis.log and host.name:"cache-01"
event.dataset:redis.slowlog and redis.slowlog.cmd:EVAL
The first search shows the Background saving started and DB saved on disk lines. The second shows one event for the Lua loop. This is what that event looks like, trimmed to the fields that matter (illustrative values from a test server):
{
"@timestamp": "2026-11-22T09:12:41.000Z",
"message": "EVAL local i = 0 while i < 2000000 do i = i + 1 end return i 0",
"event": {
"module": "redis",
"dataset": "redis.slowlog",
"created": "2026-11-22T09:12:45.318Z"
},
"fileset": { "name": "slowlog" },
"input": { "type": "redis" },
"host": { "name": "cache-01" },
"redis": {
"slowlog": {
"id": 4182,
"cmd": "EVAL",
"key": "local i = 0 while i < 2000000 do i = i + 1 end return i",
"args": ["0"],
"duration": { "us": 20665 },
"role": "master"
}
}
}
Notice three things. @timestamp is when Redis logged the command, to the second, and event.created is when Filebeat read it, so the gap between them is your collection delay. redis.slowlog.key holds the script, not a key, because Filebeat treats the first argument as the key whatever the command is. And redis.slowlog.role tells you whether the command ran on a primary or a replica.
A log line becomes a document like this. These two lines came from a replica on the test machine when its primary stopped:
150715:S 22 Nov 2026 09:03:41.473 * Connection with master lost.
150715:S 22 Nov 2026 09:03:41.473 # Error condition on socket for SYNC: Connection refused
The pipeline splits off the process ID, the role letter, the timestamp and the level marker, and keeps only the text in message. The second line becomes (illustrative values):
{
"@timestamp": "2026-11-22T09:03:41.473Z",
"message": "Error condition on socket for SYNC: Connection refused",
"log": { "level": "warning" },
"process": { "pid": 150715 },
"redis": { "log": { "role": "slave" } },
"event": { "module": "redis", "dataset": "redis.log" },
"host": { "name": "cache-02" }
}
Notice that the first line, Connection with master lost, is a notice and not a warning. Redis logs some of the most important replication events at notice, which is the main reason not to run production servers at loglevel warning.
The fields you'll search on filebeat-*
Events from Beats sent through your stack's Logstash use the Beats mapping on filebeat-*: the Redis fields are keywords or numbers, and message is text, so use them as they are, with no .keyword suffix.
| Field | Fileset | Example | Notes |
|---|---|---|---|
event.dataset | Both | redis.log | Start every search with it. |
log.level | log | warning | One of debug, verbose, notice, warning. Redis has no error level. |
redis.log.role | log | slave | master, slave, child (a fork saving RDB or AOF) or sentinel. The stored words are Redis's old role names. |
process.pid | log | 150715 | A new PID on a host means Redis restarted. |
message | Both | The log text, or the full command | Text, so phrase searches work. |
redis.slowlog.cmd | slowlog | KEYS | As the client sent it, usually upper case. |
redis.slowlog.key | slowlog | session:* | The first argument, which is only a key for key commands. |
redis.slowlog.args | slowlog | ["0"] | Everything after the key. Values over 1,024 characters aren't indexed. |
redis.slowlog.duration.us | slowlog | 20665 | Execution time in microseconds. |
redis.slowlog.id | slowlog | 4182 | Counts up per server; gaps mean lost entries. |
redis.slowlog.role | slowlog | master | From ROLE at poll time. |
error.message | log | A grok failure message | Present only when a line didn't parse. |
Two things the slow log knows but the event doesn't carry: the client address and the client name. SLOWLOG GET returns both, but Filebeat only reads the ID, time, duration and arguments. To find which service ran a slow command, use the key naming, or run SLOWLOG GET yourself while the problem is happening, before the next poll clears it.
What the stock Redis dashboard shows
There's no Redis pack in the Dashboard Library. What you do get is the stock Filebeat dashboard: Install Integration on the Redis integration page adds it, and so does Install Dashboards in your stack settings, where Redis is in the Logs list. It's called [Filebeat Redis] Overview ECS, reads the filebeat-* index pattern and has five panels:
| Panel | Type | What it shows |
|---|---|---|
| Slow logs | Saved search | Slow log events with host.name, message, redis.slowlog.duration.us and redis.slowlog.key |
| Top slowest commands | Bar chart | The five commands with the highest single duration |
| Log levels and roles breakdown | Pie | Log lines by role, then by level |
| Logs over time | Stacked bar chart | Log lines over time, split by level |
| Logs | Saved search | Server log lines with host, level, role and message |
It's a reasonable first look and not much more. The bar chart uses the maximum, so one bad KEYS outranks a command that's slow ten thousand times a day, and its axis labels are swapped: the duration axis says "Command" and the command axis says "Duration (microseconds)". Nothing on it separates hosts, picks out replication events or counts lost slow log entries. Redis also appears in the Metrics list under Install Dashboards; those are Metricbeat dashboards and stay empty unless you ship Redis metrics with Metricbeat. Keep the stock dashboard, and build the searches and summaries below for the questions it doesn't answer.
Searches for warnings, replication and slow commands
Save each of these in Discover on filebeat-* with columns that make the result readable: host.name, redis.log.role and message for the log searches, and host.name, redis.slowlog.cmd, redis.slowlog.duration.us and redis.slowlog.key for slow log searches. The lines starting with # are labels, not part of the query:
# Redis warnings (Redis has no "error" level; problems are logged as warnings)
event.dataset:redis.log and log.level:warning
# Replication trouble, on primaries and replicas
event.dataset:redis.log and message:("Connection with master lost" or "MASTER timeout" or "Timeout connecting to the MASTER" or "Disconnecting timedout replica" or "Unable to AUTH to MASTER" or "Error condition on socket for SYNC")
# Full resyncs, which copy the whole dataset
event.dataset:redis.log and message:("Full resync requested" or "Partial resynchronization not accepted")
# Persistence: forks that failed and slow disks
event.dataset:redis.log and message:("Can't save in background" or "Background saving error" or "Asynchronous AOF fsync is taking too long")
# Output buffer limits and client evictions
event.dataset:redis.log and message:("scheduled to be closed ASAP" or "Evicting client")
# Commands that held Redis for 100 ms or longer
event.dataset:redis.slowlog and redis.slowlog.duration.us >= 100000
# Commands that should never run on a busy server
event.dataset:redis.slowlog and redis.slowlog.cmd:(KEYS or FLUSHALL or FLUSHDB or DEBUG)
The replication search is worth explaining, because the messages read the same on both ends but mean different things. Connection with master lost and MASTER timeout come from a replica that lost its primary. Disconnecting timedout replica comes from a primary that gave up on a replica. Unable to AUTH to MASTER is a replica whose masterauth no longer matches, usually after a password change, and it repeats every second until fixed. Full resync requested on a primary means a replica is copying the whole dataset, which costs a fork on the primary and a reload on the replica.
DQL filters but doesn't group. For "which commands cost Redis the most time today", use PPL in Query Workbench, which the guide to querying with Query Workbench shows how to open. Choose the PPL tab and run:
source = filebeat-*
| where `event.dataset` = 'redis.slowlog'
and `@timestamp` >= DATE_SUB(NOW(), INTERVAL 1 DAY)
| stats count() as slow, sum(`redis.slowlog.duration.us`) as total_us,
max(`redis.slowlog.duration.us`) as worst_us
by `host.name`, `redis.slowlog.cmd`
| eval total_ms = total_us / 1000.0, worst_ms = worst_us / 1000.0
| sort - total_us
| head 10
Sorting by total time rather than the worst single call is the point. A HGETALL on a large hash that takes 12 ms but runs thousands of times a day costs more than one 900 ms KEYS, and it's the one your users feel. To count slow log entries that were never shipped, compare each host's IDs with the number of events:
source = filebeat-*
| where `event.dataset` = 'redis.slowlog'
and `@timestamp` >= DATE_SUB(NOW(), INTERVAL 1 HOUR)
| stats count() as shipped, min(`redis.slowlog.id`) as first_id,
max(`redis.slowlog.id`) as last_id by `host.name`
| eval logged = last_id - first_id + 1, lost = logged - shipped
| sort - lost
A non-zero lost means bursts are beating the 10-entry limit; poll more often or raise the threshold. A restart resets the IDs, so a negative or huge value in a window that spans a restart is noise. Backticks are needed around @timestamp and harmless around dotted names, and Query Workbench has no time picker, so the time filter goes in the query.
Reading lag: slow commands, forks and resyncs
Redis runs commands one at a time, so a slow command is never only slow for its caller. If redis.slowlog.duration.us says 250,000, every client waited up to a quarter of a second. The patterns repeat across most fleets:
KEYS,SMEMBERS,HGETALL,LRANGE 0 -1andZRANGEover large collections. Cost grows with size, so the same command gets slower every week. UseSCANand itsHSCAN,SSCANandZSCANrelatives, or ranges with limits.EVAL,EVALSHAandFCALL. A script runs atomically, so a slow script is a stall. The script body is inredis.slowlog.keyforEVAL, which helps; forEVALSHAyou get a hash to look up.DELorFLUSHDBon big keys. Freeing a large value takes time.UNLINKandFLUSHDB ASYNCdo the work in the background.BGSAVEandBGREWRITEAOF. The command returns once the fork has happened, so its duration is roughly your fork time, which grows with memory size. Automatic saves don't appear in the slow log at all; the log shows them asBackground saving started, then aFork CoWline reporting how much memory was copied.
Lag that isn't in the slow log usually shows up in the log. Asynchronous AOF fsync is taking too long (disk is busy?) means the disk can't keep up with appendfsync everysec; it's logged at notice, so the warning search won't find it. Client ... scheduled to be closed ASAP for overcoming of output buffer limits on a primary, naming a replica, is the classic loop where a replica falls behind during a full sync, gets disconnected and starts another full sync. Raise client-output-buffer-limit replica when you see it more than once. Replication offset lag itself is a number, not an event, and it lives in INFO replication.
Evictions and OOM errors live in INFO, not the log
This catches people who expect a log line when Redis runs out of memory. On the test server, with maxmemory 64mb, writing 120 MB evicted 1,456 keys under allkeys-lru. Switching to noeviction made the next write fail with OOM command not allowed when used memory > 'maxmemory'. Neither wrote a single line to the server log. Both only show up as counters:
$ redis-cli INFO stats | grep evicted_keys
evicted_keys:1456
$ redis-cli INFO errorstats
# Errorstats
errorstat_OOM:count=1
The log does have three memory-related lines worth a saved search: a warning when maxmemory is lowered below current usage with CONFIG SET, Evicting client when maxmemory-clients disconnects clients to protect memory, and Out Of Memory allocating just before Redis crashes. At loglevel debug Redis also writes one line per evicted key, which isn't something to run in production.
For eviction rates, memory use against maxmemory and error counts, ship metrics alongside the logs. The Metrics section of the Redis integration guide sets up the Telegraf redis input, which reads INFO and reports evicted_keys, used_memory and maxmemory in its redis measurement, which reach your Metrics stack as redis_evicted_keys, redis_used_memory and redis_maxmemory, replica lag in redis_replication and error counts by type in redis_errorstat. The minimum input is two lines:
[[inputs.redis]]
servers = ["tcp://127.0.0.1:6379"]
# password = "${REDIS_DEFAULT_PASSWORD}"
Logs tell you what happened and when; those metrics tell you how close you are to the limit. A rising evicted_keys with no slow commands means the cache is too small for its working set. Rising evictions together with slow EVAL or bulk writes in the slow log often means one job is filling memory faster than eviction can clear it.
Alerts for warnings, broken replication and slow bursts
Logs stacks include alerting with ElastAlert 2 rules, which you enable from Alerting & Notifications in your stack settings; the guide to creating alerting rules walks through it. Three rules cover most Redis fleets. First, a burst of warnings on one server, with the frequency rule type. A start-up warning about memory overcommit is normal; five warnings in ten minutes isn't:
name: Redis warnings burst
type: frequency
index: "filebeat-*"
num_events: 5
timeframe:
minutes: 10
query_key: host.name
filter:
- query:
query_string:
query: 'event.dataset:"redis.log" AND log.level:warning'
realert:
minutes: 30
alert:
- "email"
email:
- "[email protected]"
Second, replication breaking. One event is enough, so num_events is 1. The list includes Connection with master lost, which is a notice, so this rule can't filter on level:
name: Redis replication broken
type: frequency
index: "filebeat-*"
num_events: 1
timeframe:
minutes: 5
query_key: host.name
filter:
- query:
query_string:
query: 'event.dataset:"redis.log" AND message:("Connection with master lost" OR "MASTER timeout" OR "Disconnecting timedout replica" OR "Unable to AUTH to MASTER")'
realert:
minutes: 15
alert:
- "email"
email:
- "[email protected]"
Third, slow commands rising well above normal, with the spike rule type. It compares the last 15 minutes with the 15 before, so it adapts to a cache that's always a little busy and still fires when a deploy adds a KEYS call:
name: Redis slow commands spiking
type: spike
index: "filebeat-*"
spike_height: 3
spike_type: up
threshold_cur: 20
timeframe:
minutes: 15
query_key: host.name
filter:
- query:
query_string:
query: 'event.dataset:"redis.slowlog"'
realert:
minutes: 30
alert:
- "email"
email:
- "[email protected]"
threshold_cur: 20 stops a jump from two slow commands to six waking anyone up. Because of the 10-entry limit, the slow log under-counts bursts, so treat this rule as "something changed", not as a precise rate. Run each rule with Test only before enabling it. A flatline rule on event.dataset:"redis.log" is less useful than it sounds, because a healthy Redis at notice can be silent for hours between saves.
When Redis events arrive wrong or not at all
No server log events. Check the path first with redis-cli CONFIG GET logfile and compare it with var.paths. An empty logfile means stdout, and a syslog-enabled yes server writes nowhere the module looks. Then check permissions: Filebeat runs as root on package installs, but a hardened setup may not.
No slow log events, but the server log works. Look for AUTH, NOAUTH or connection errors in journalctl -u filebeat. Check that var.hosts points at an address Redis listens on (bind in redis.conf), that the password is the default user's, and that the slow log has something in it: on a fast, quiet server there may simply be nothing over 10 ms.
Log events arrive with error.message and no level or role. The line didn't match the parser, which expects pid:role day month year time level message. Redis 3.0 and later write that layout, with the year included from Redis 5, and the parser accepts both, so the usual cause is something in between rewriting the line, such as a container runtime or syslog adding its own prefix. Read the raw message to see what was added. The grok parse failures guide shows how to test a line.
Log events are hours out. Redis writes its log in the server's local time with no time zone, and the pipeline reads it as UTC. A server on Europe/London is fine in winter and an hour ahead of reality in summer; a server on America/New_York is always off. Run Redis hosts on UTC, or at least know the offset when you line logs up across hosts. Slow log events don't have this problem, because their time is a Unix timestamp.
Every slow log event appears twice. Two Filebeat instances, or two configs on one host, are polling the same Redis. Each takes what the other hasn't reset yet, so you'll also see entries missing. Poll each Redis from exactly one place.
Cluster and Sentinel. In Redis Cluster each node has its own slow log, so list every node in var.hosts, or run Filebeat on each node against 127.0.0.1. Sentinel processes write their own log, with role sentinel; point a second path at it if you want failover decisions in the same searches.
Events reach Filebeat but not your stack. filebeat test output checks the TLS connection to Logstash. If you've changed the index name in Logstash, use your own pattern in place of filebeat-* everywhere in this guide. The troubleshooting guide covers the rest.
Managed Redis: ElastiCache, Memorystore and Azure
Managed services don't give you the log file, so the log fileset is out. The slow log depends on the provider's command rules:
- Amazon ElastiCache, node-based clusters.
SLOWLOGis allowed, so theslowlogfileset works from a host in the same VPC, withsslsettings if in-transit encryption is on and the AUTH token as the password. The same default-user limit applies, so it won't work with RBAC user groups that disable the default user. ElastiCache can also deliver its slow log and a curated engine log to CloudWatch Logs; from there the AWS Lambda CloudWatch integration guide forwards them to your stack, where they land onlogstash-*with ElastiCache's own field names, not theredis.*fields above. AWS notes that its delivery reads a fixed number of entries per poll too. Don't run both: Filebeat's reset will take entries before AWS reads them. - ElastiCache Serverless.
SLOWLOGisn't available, and neither is log delivery. Use metrics. - Google Memorystore and Azure Cache for Redis. Check the provider's restricted command list for
SLOWLOGbefore relying on the fileset. For Memorystore metrics, see the Google Memorystore for Redis guide.
Valkey and other Redis forks keep the same commands and, on default settings, the same log line layout, so the module generally works; test one server before rolling it out, because a fork that changes its log format will fail the parser.
What this setup can't tell you
Be clear with your team about the limits. The slow log is a sample, not a full record: it only holds commands over the threshold, Filebeat keeps 10 per poll, and arguments are trimmed. It measures time inside Redis, so network delay, a saturated client connection pool or a slow reply to a big value don't show. Neither source has request rates, hit ratios, memory use or replica offsets; those are metrics. And there's no client identity on slow log events, so attributing a slow command to a service relies on key names. Within those limits, the log and slow log answer the questions metrics can't: which command, with which key, on which host, at what second, and what Redis said about it.
FAQ
Why can't Filebeat read the slow log from a file?
Because there isn't one. Redis keeps the slow log as a list in memory, and SLOWLOG GET is the only way to read it. That's why the slowlog fileset needs a network connection and a password, while the log fileset only needs file access.
What should slowlog-log-slower-than be?
Start at the default, 10000 microseconds (10 ms). Lower it to 1000 to 5000 for caches where every millisecond matters, but only if a normal minute still produces a handful of entries, not dozens, because Filebeat ships at most 10 per poll. Setting it to 0 logs every command, which is for a short test, never for production.
Does Filebeat's SLOWLOG RESET hurt anything?
It doesn't affect Redis's data or performance; a reset is cheap. It does empty the list for everyone else, so a person running SLOWLOG GET during an incident, or a second monitoring tool, sees almost nothing. Search event.dataset:redis.slowlog in OpenSearch Dashboards instead.
Where do I see evictions?
Not in the log. Evictions and OOM command not allowed errors are counters in INFO stats and INFO errorstats. Ship them with the Telegraf redis input from the Redis integration guide, and use the log for the events around them.
Why filebeat-* and not logstash-*?
Events from Beats sent through your stack's Logstash are written to daily filebeat-* indices with the Beats mapping. Data sent without a Beat, such as syslog or the CloudWatch route for ElastiCache, goes to logstash-*. Search Redis module events on filebeat-*.
Can I try this on the free trial?
Yes. The free trial includes every feature, including alerting, Query Workbench and Hosted OpenSearch MCP. Point Filebeat at one Redis server, run the three test commands from this guide and save the first search.
Next steps
Check logfile and the slow log settings, raise slowlog-max-len, enable both filesets with a 5 second poll and the default user's password, and prove each one with the test commands. When both show up in Discover, save the searches, run the two PPL queries once a day for a week to learn your normal, and turn on the three alert rules. If you also run PostgreSQL, the PostgreSQL slow query and error log guide covers the same path for your database. If you're running your own OpenSearch cluster for logs like these, a Logit.io Logs stack gives you managed Logstash, the Redis pipelines, OpenSearch and OpenSearch Dashboards without the upkeep. For a dedicated cluster, see Hosted OpenSearch and OpenSearch pricing. To ask questions of the same Redis logs from any MCP-compatible AI assistant, see Hosted OpenSearch MCP.
Unlock complete visibility with hosted ELK, Grafana, and Prometheus-backed Observability
