banshee/services-collection/services/redis/ssh/
persistence
The last snapshot of a Redis server, its age, the changes not saved and the state of its append-only file, by SSH and redis-cli INFO.
par banshee1 installation1 version
v1Dernière
Publiée le 27 octobre 2026. First version.
Redis persistence, by SSH
Returns whether the last snapshot (RDB) of a Redis server was saved, how old the last one saved is, the changes not saved yet, and the state of its append-only file (AOF), read by redis-cli INFO on the Redis server over SSH. Four watches are offered, each one set on the probe. No password leaves banshee.
Versions
Redis 2.8 and later, and Valkey. Generic: no folder of version.
How it works
The collector runs, on the server, LC_ALL=C redis-cli -p <port> INFO, as redis/ssh/memory does, the password, when there is one, going from its file on the server into REDISCLI_AUTH. It reads the section Persistence:
rdb_changes_since_last_save:12
rdb_last_save_time:1793062803
rdb_last_bgsave_status:ok
aof_enabled:1
aof_last_bgrewrite_status:ok
aof_last_write_status:ok rdbisrdb_last_bgsave_status,okorerr: a snapshot that fails (a full disk, a refused fork) means a restart would lose what changed since the last one.rdb-ageis the time sincerdb_last_save_time, in hours, against the poller's clock. Without any snapshot saved since it started, Redis gives its start time.changesisrdb_changes_since_last_save, the changes a crash would lose without an append-only file.aofisoffwhen the append-only file is not enabled;errwhen its last write or its last rewrite failed;okotherwise.- A Redis that refuses the connection is critical: "Redis is not running". A refused account stops the collector
misconfigured, as does any other answer thanINFO. - Nothing is written:
INFOonly reads.
Prerequisites
The same as redis/ssh/memory: an SSH account without write rights, redis-cli in its path, the password, when Redis asks for one, in a file of that account, mode 0400 (redis:password-file), no sudo, and the fingerprint of the server's host key.
Variables
| Name | Label | Says | Default |
|---|---|---|---|
redis:port | Port | the port Redis listens on, on the server | 6379 |
redis:password-file | Password file | the path, on the server, of the file that holds the password; empty: no password | — |
Outputs
| Name | Label | Unit | Per instance |
|---|---|---|---|
rdb | Last snapshot | — | no |
rdb-age | Age of the last snapshot saved | h | no |
changes | Changes not saved | — | no |
aof | Append-only file | — | no |
Watches
| Name | Title | Kind | Defaults | Checked by default |
|---|---|---|---|---|
rdb-failed | Snapshot failed | expected value, on rdb | critical when anything but ok | yes |
aof-failed | Append-only file failing | expected value, on aof | critical when anything but ok or off | yes |
rdb-old | Snapshot too old | above a threshold, on rdb-age | warning above 24 h | no |
changes | Many changes not saved | above a threshold, on changes | no threshold: set one on the probe | no |
A Redis whose snapshots are turned off (save "") never saves one: rdb-age grows from its start, which is why "Snapshot too old" is unchecked.
Limits
- The age is counted against the poller's clock: a server whose clock drifts reads the age off by as much.
- Redis is reached on the server itself (
127.0.0.1), without TLS, as its default user only (seeredis/ssh/memory). - Not checked against a Redis: the fields are those of the documentation of
INFO(redis.io).