Redis Integration

Track Redis performance and health metrics (commands/sec, CPU, memory, keyspace, replication, I/O) in Middleware.

Prerequisites

  • Install the Middleware Host/Infra Agent on the machine that will collect metrics.

Setup

1 Create Database Credentials

Put your connection details in a YAML file (adjust host/port, auth, and TLS as needed):

1# /home/ubuntu/redis-creds.yaml
2redis:
3  endpoint: localhost:7379
4  ## all fields below are optional ##
5  password: redis
6  transport: tcp    ## tcp or Unix
7  tls:
8    - insecure: true
9    - ca_file: <path_to_certificate>
10    - cert_file: <path_to_certificate>
11    - key_file: <path_to_file>

Docker Agents look for this file inside /var/log on the Agent host.

A quick reachability check helps before enabling the integration:

1# Plain TCP
2redis-cli -h <redis-host> -p 7379 PING
3# TLS (example using a CA file)
4redis-cli --tls -h <redis-host> -p 7379 --cacert <path_to_certificate> PING

Expect PONG if the server is reachable and the credentials/certs are valid.

2 Access Integrations

In Middleware, open Installations → All Integrations → Redis.

Redis Overview

3 Enable Integration

Pick the host (where the Agent runs), enter the credential file path from Step 1, and Save.

Redis Host

Visualize Analytics

  • A default Redis dashboard appears in Dashboard Builder after setup.
  • To add custom charts, choose Add New Widget → redis to browse available metrics.

Alerts

Create alerts on any Redis metric: choose Detection Method: Database, Database Type: Redis, pick a metric, and set your conditions.

Metrics Collected

MetricDescription
redis.maxmemoryConfigured maxmemory value
redis.roleNode’s role
redis.cmd.callsTotal number of calls for a command
redis.cmd.usecTotal time for all executions of this command
redis.uptimeNumber of seconds since server start
redis.cpu.timeSystem CPU consumed since start
redis.clients.connectedClient connections (excludes replica connections)
redis.clients.max_input_bufferLargest input buffer among current clients
redis.clients.max_output_bufferLongest output list among current clients
redis.clients.blockedClients pending a blocking call
redis.keys.expiredTotal key expiration events
redis.keys.evictedKeys evicted due to maxmemory
redis.connections.receivedConnections accepted by the server
redis.connections.rejectedConnections rejected due to maxclients
redis.memory.usedTotal bytes allocated by Redis
redis.memory.peakHistorical max bytes consumed by Redis
redis.memory.rssBytes allocated from operating system
redis.memory.luaBytes used by the Lua engine
redis.memory.fragmentation_ratioRatio between memory.rss and memory.used
redis.rdb.changes_since_last_saveNumber of changes since latest dump
redis.commandsNumber of commands processed per second
redis.commands.processedTotal commands processed
redis.net.inputBytes read from the network
redis.net.outputBytes written to the network
redis.keyspace.hitsSuccessful key lookups
redis.keyspace.missesUnsuccessful key lookups
redis.latest_forkDuration of latest fork (µs)
redis.slaves.connectedNumber of connected replicas
redis.replication.backlog_first_byte_offsetMaster offset of the replication backlog buffer
redis.replication.offsetCurrent replication offset
redis.db.keysNumber of keyspace keys
redis.db.expiresKeys with expiration
redis.db.avg_ttlAverage key TTL

Troubleshooting

  • Integrations menu is missing: Ask an admin to grant your role Installation permissions in Settings.
  • Agent can’t reach Redis: Test from the Agent host: redis-cli -h <host> -p <port> PING (or add --tls --cacert <ca> for TLS). You should get PONG. Fix DNS/firewall/port or credentials if it fails.
  • Authentication errors: Supply the password with -a or REDISCLI_AUTH and retry the probe: REDISCLI_AUTH='<pass>' redis-cli -h <host> -p <port> PING.
  • TLS handshake fails: Verify CA/cert/key paths and server certificate trust; retry with correct --cacert (avoid --insecure except for quick tests).
  • Clustered/replicated setups show only one node: Add each node you want monitored (metrics are per instance/endpoint). You can sanity-check per node with redis-cli INFO or sectioned calls like INFO replication.

Need assistance or want to learn more about Middleware? Contact our support team at [email protected] or join our Slack channel.