Skip to main content

Redis - Classic Collector

Thumbnail icon

Redis is an in-memory data structure implementing a distributed, in-memory key-value database with optional durability.

The Sumo Logic app for Redis helps you monitor the state of the database cluster. The preconfigured dashboards provide information about cluster status, resource usage, commands running, and cache hit rate. You can easily determine the health of the cluster by just a glance at the dashboards.

Log and Metrics types

This Sumo Logic app for Redis supports Metrics and Logs for Redis in Cluster or Standalone mode. The Redis logs are generated in files as configured in the cluster node configuration files in /etc/redis/redis.conf. For more details on Redis logs, click here.

The app supports metrics generated by the Redis plugin for Telegraf and assumes prometheus format metrics.

Sample log messages

{
"timestamp": 1615988485842,
"log": "1:M 17 Mar 2021 13:41:19.103 * Synchronization with replica 100.96.3.30:6379 succeeded",
"stream": "stdout",
"time": "2021-03-17T13:41:19.103646109Z"
}

Sample queries

This sample Query is from the the Redis - Logs dashboard > Logs panel.

Query String
<Redis_DB_Cluster_Filter> component="database" and db_system="redis"
| json auto maxdepth 1 nodrop
| if (isEmpty(log), _raw, log) as message
| count by message
| limit 100
| fields message

Collecting logs and metrics for Redis

This section provides instructions for configuring log and metric collection for the Sumo Logic app for Redis. Configuring log and metric collection for the Redis ULM app includes the following tasks:

Configure Collection for Redis

Sumo Logic supports collection of logs and metrics data from Redis in both Kubernetes and non-Kubernetes environments. Click on the appropriate tab below based on the environment where your Redis clusters are hosted.

In Kubernetes environments, we use the Telegraf Operator, which is packaged with our Kubernetes collection. You can learn more about it here.The diagram below illustrates how data is collected from Redis in Kubernetes environments. In the architecture shown below, there are four services that make up the metric collection pipeline: Telegraf, Telegraf Operator, Prometheus, and Sumo Logic Distribution for OpenTelemetry Collector.


redis-flow

The first service in the metrics pipeline is Telegraf. Telegraf collects metrics from Redis. Note that we’re running Telegraf in each pod we want to collect metrics from as a sidecar deployment: that is, Telegraf runs in the same pod as the containers it monitors. Telegraf uses the Redis input plugin to obtain metrics. (For simplicity, the diagram doesn’t show the input plugins.) The injection of the Telegraf sidecar container is done by the Telegraf Operator. Prometheus pulls metrics from Telegraf and sends them to Sumo Logic Distribution for OpenTelemetry Collector which enriches metadata and sends metrics to Sumo Logic.

In the logs pipeline, Sumo Logic Distribution for OpenTelemetry Collector collects logs written to standard out and forwards them to another instance of Sumo Logic Distribution for OpenTelemetry Collector, which enriches metadata and sends logs to Sumo Logic.

Configure Metrics Collection

prerequisites

Ensure that you are monitoring your Kubernetes clusters with the Telegraf operator. If you are not, then follow these instructions to do so.

  1. To collect metrics from a Kubernetes environment, add the following annotations on your Redis pods:
 annotations:
telegraf.influxdata.com/class: sumologic-prometheus
prometheus.io/scrape: "true"
prometheus.io/port: "9273"
telegraf.influxdata.com/inputs: |+
servers = ["tcp://:<username-CHANGEME>:<password-CHANGEME>@localhost:6379"]
[inputs.redis.tags]
environment: "ENV_TO_BE_CHANGED"
component="database"
db_system="redis"
db_cluster: "ENV_TO_BE_CHANGED"
db_cluster_address = "ENV_TO_BE_CHANGED"
db_cluster_port = "ENV_TO_BE_CHANGED"
  1. Enter in values for the following parameters (marked ENV_TO_BE_CHANGED in the snippet above):

    • telegraf.influxdata.com/inputs. As telegraf will be run as a sidecar the host should always be localhost.
      • In the input plugins section i.e.:
        • servers. The URL to the Redis server. This can be a comma-separated list to connect to multiple Redis servers.
      • In the tags section, [inputs.redis.tags]:
        • environment. This is the deployment environment where the Redis cluster identified by the value of servers resides. For example: dev, prod or qa. While this value is optional we highly recommend setting it.
        • db_cluster. Enter a name to identify this Redis cluster. This cluster name will be shown in the Sumo Logic dashboards.
        • db_cluster_address. Enter the cluster hostname or ip address that is used by the application to connect to the database. It could also be the load balancer or proxy endpoint.
        • db_cluster_port. Enter the database port. If not provided, a default port will be used.
    note

    db_cluster_address and db_cluster_port should reflect the exact configuration of DB client configuration in your application, especially if you instrument it with OT tracing. The values of these fields should match exactly the connection string used by the database client (reported as values for net.peer.name and net.peer.port metadata fields).

    For example, if your application uses “redis-prod.sumologic.com:3306” as the connection string, the field values should be set as follows: db_cluster_address=redis-prod.sumologic.com db_cluster_port=3306

    If your application connects directly to a given redis node, rather than the whole cluster, use the application connection string to override the value of the “host” field in the Telegraf configuration: host=redis-prod.sumologic.com

    Pivoting to Tracing data from Entity Inspector is possible only for “Redis address” Entities.

    • Do not modify the following values, as they will cause the Sumo Logic apps to not function correctly.
      • telegraf.influxdata.com/class: sumologic-prometheus. This instructs the Telegraf operator what output to use. This should not be changed.
      • prometheus.io/scrape: "true". This ensures our Prometheus will scrape the metrics.
      • prometheus.io/port: "9273". This tells prometheus what ports to scrape on. This should not be changed.
      • telegraf.influxdata.com/inputs
        • In the tags section, that is [inputs.redis.tags]
        • component: "database". This value is used by Sumo Logic apps to identify application components.
        • db_system: "redis". This value identifies the database system.
    • See this doc for more parameters that can be configured in the Telegraf agent globally.
    • For more information on configuring the Redis input plugin for Telegraf, see this doc.
  2. Once this has been done, the Sumo Logic Kubernetes collection will automatically start collecting metrics from the pods having the labels and annotations defined in the previous step.

  3. Verify metrics in Sumo Logic by running the following metrics query:

db_cluster=<Your_Redis_Cluster_Name> component="database" \
and db_system="redis"

Configure Logs Collection

This section explains the steps to collect Redis logs from a Kubernetes environment.

  1. Collect Redis logs written to standard output. If your Redis helm chart/pod is writing the logs to standard output, then follow the steps listed below.

    1. Apply the following labels to your Redis pods:
    environment: "ENV_TO_BE_CHANGED"
    component: "database"
    db_system: "redis"
    db_cluster: "ENV_TO_BE_CHANGED"
    db_cluster_address = "ENV_TO_BE_CHANGED"
    db_cluster_port = "ENV_TO_BE_CHANGED"
    1. Enter in values for the following parameters (marked ENV_TO_BE_CHANGED above):
      • environment. This is the deployment environment where the Redis cluster identified by the value of servers resides. For example: dev, prod or qa. While this value is optional we highly recommend setting it.
      • db_cluster. Enter a name to identify this Redis cluster. This cluster name will be shown in the Sumo Logic dashboards.
      • db_cluster_address. Enter the cluster hostname or ip address that is used by the application to connect to the database. It could also be the load balancer or proxy endpoint.
      • db_cluster_port. Enter the database port. If not provided, a default port will be used.
    note

    db_cluster_address and db_cluster_port should reflect the exact configuration of DB client configuration in your application, especially if you instrument it with OT tracing. The values of these fields should match exactly the connection string used by the database client (reported as values for the net.peer.name and net.peer.port metadata fields).

    For example, if your application uses “redis-prod.sumologic.com:3306” as the connection string, the field values should be set as follows: db_cluster_address=redis-prod.sumologic.com db_cluster_port=3306

    If your application connects directly to a given Redis node, rather than the whole cluster, use the application connection string to override the value of the “host” field in the Telegraf configuration: host=redis-prod.sumologic.com

    Pivoting to Tracing data from Entity Inspector is possible only for “Redis address” Entities.

    • Do not modify these values as they will cause the Sumo Logic apps to not function correctly.
      • component: “database”. This value is used by Sumo Logic apps to identify application components.
      • db_system: “redis”. This value identifies the database system.
    • For all other parameters, see this doc for more parameters that can be configured in the Telegraf agent globally.
    1. The Sumologic-Kubernetes-Collection will automatically capture the logs from stdout and will send the logs to Sumologic. For more information on deploying Sumologic-Kubernetes-Collection, see this page.
  2. Collect Redis logs written to log files (Optional). If your Redis helm chart/pod is writing its logs to log files, you can use a sidecar to send log files to standard out. To do this:

    1. Determine the location of the Redis log file on Kubernetes. This can be determined from the redis.conf for your Redis cluster along with the mounts on the Redis pods.
    2. Install the Sumo Logic tailing sidecar operator.
    3. Add the following annotation in addition to the existing annotations.
    annotations:
    tailing-sidecar: sidecarconfig;<mount>:<path_of_redis_log_file>/<redis_log_file_name>

    Example:

    annotations:
    tailing-sidecar: sidecarconfig;data:/redis-master-data/redis.log
    1. Make sure that the Redis pods are running and annotations are applied by using the command:
    kubectl describe pod <redis_pod_name>
    1. Sumo Logic Kubernetes collection will automatically start collecting logs from the pods having the annotations defined above.


FER to normalize the fields in Kubernetes environments. Labels created in Kubernetes environments automatically are prefixed with pod_labels. To normalize these for our app to work, a Field Extraction Rule named AppObservabilityRedisDatabaseFER is automatically created for Database Application Components.


Installing the Redis app

To install the app, do the following:

note

Next-Gen App: To install or update the app, you must be an account administrator or a user with Manage Apps, Manage Monitors, Manage Fields, Manage Metric Rules, and Manage Collectors capabilities depending upon the different content types part of the app.

  1. Select App Catalog.
  2. In the 🔎 Search Apps field, run a search for your desired app, then select it.
  3. Click Install App.
    note

    Sometimes this button says Add Integration.

  4. Click Next in the Setup Data section.
  5. In the Configure section of your respective app, complete the following fields.
    1. Is K8S deployment involved. Specify if resources being monitored are partially or fully deployed on Kubernetes (K8s)
  6. Click Next. You will be redirected to the Preview & Done section.

Post-installation

Once your app is installed, it will appear in your Installed Apps folder, and dashboard panels will start to fill automatically.

Each panel slowly fills with data matching the time range query received since the panel was created. Results will not immediately be available but will be updated with full graphs and charts over time.

As part of the app installation process, the following fields will be created by default:

  • component
  • environment
  • db_system
  • db_cluster
  • db_cluster_address
  • db_cluster_port

Additionally, if you are using Redis in the Kubernetes environment, the following additional fields will be created by default during the app installation process:

  • pod_labels_component
  • pod_labels_environment
  • pod_labels_db_system
  • pod_labels_db_cluster
  • pod_labels_db_cluster_address
  • pod_labels_db_cluster_port

For information on setting up fields, see Fields.

Viewing Redis dashboards

All dashboards have a set of filters that you can apply to the entire dashboard. Use these filters to drill down and examine the data to a granular level.

  • You can change the time range for a dashboard or panel by selecting a predefined interval from a drop-down list, choosing a recently used time range, or specifying custom dates and times. Learn more.
  • You can use template variables to drill down and examine the data on a granular level. For more information, see Filtering Dashboards with Template Variables.
  • Most Next-Gen apps allow you to provide the scope at the installation time and are comprised of a key (_sourceCategory by default) and a default value for this key. Based on your input, the app dashboards will be parameterized with a dashboard variable, allowing you to change the dataset queried by all panels. This eliminates the need to create multiple copies of the same dashboard with different queries.

Overview

The Redis - Overview dashboard provides an at-a-glance view of the Redis server status, error logs along with database metrics.

Use this dashboard to:

  • Gain insights into Redis cluster Master and Slave status.
  • Gain insights into your Redis health using Cache Hit Rate, Fragmentation Ratio, and Slow Queries Log.
  • Get insights into Active and rejected client connections.
Redis dashboards

Cluster Overview

The Redis - Cluster Overview dashboard provides a high-level view of cluster infrastructure, comparisons, and trends.

Use this dashboard to:

  • Review Cluster infrastructure.
  • Manage Redis versions running on nodes.
  • Understand Master and Slave replication offsets.
Redis dashboards

Cluster Operations

The Redis - Cluster Operations dashboard provides a high-level view of the activity and health of Master and Slaves on your network. Dashboard panels display visual graphs and detailed information on replication offsets, cache rate, and most importantly, resource usage.

Use this dashboard to:

  • To understand the Cluster resource usage.
  • Gain insights into cache hit and miss rates.
Redis dashboards

Logs

The Redis - Logs dashboard provides a detailed analysis based on logs. The panels provide details such as RDBMemory Usage, events, RDB, and AOF events.

Use this dashboard to:

  • Review errors and warnings generated by the server.
  • Review the RDBMemory Usage, events, RDB and AOF events.
Redis dashboards

Command Stats Deltas

The Redis - Command Stats Deltas dashboard provides an at-a-glance view of commands running on your Redis server.

Use this dashboard to:

  • To gain insights into the commands running on your cluster.
Redis dashboards

Create monitors for Redis app

From your App Catalog:

  1. From the Sumo Logic navigation, select App Catalog.
  2. In the Search Apps field, search for and then select your app.
  3. Make sure the app is installed.
  4. Navigate to What's Included tab and scroll down to the Monitors section.
  5. Click Create next to the pre-configured monitors. In the create monitors window, adjust the trigger conditions and notifications settings based on your requirements.
  6. Scroll down to Monitor Details.
  7. Under Location click on New Folder.
    note

    By default, monitor will be saved in the root folder. So to make the maintenance easier, create a new folder in the location of your choice.

  8. Enter Folder Name. Folder Description is optional.
    tip

    Using app version in the folder name will be helpful to determine the versioning for future updates.

  9. Click Create. Once the folder is created, click on Save.

Redis alerts

Alert Name Alert Description and conditions Alert Condition Recover Condition
Redis - Instance Down This alert fires when we detect that the Redis instance is down for 5 minutes. == 0 >0
Redis - Missing Master This alert fires when we detect that a Redis cluster has no node marked as master for 5 minutes. <=0 >0
Redis - Replication Broken This alert fires when we detect that a Redis instance has lost a slave. <0 >=0
Redis - Too Many Connections This alert fires when we detect a given Redis server has too many connections (over 100). >100 <=100
Redis - Rejected Connections This alert fires when we detect that some connections to a Redis cluster have been rejected. >0 <=0
Redis - High Memory Fragmentation Ratio This alert fires when the ratio of Redis memory usage to Linux virtual memory pages (mapped to physical memory chunks) is higher than 1.5.

A high ratio will lead to swapping and can adversely affect performance.

>=1.5 <1.5
Redis - Potential Master-Slave Communication Failure This alert fires when we detect that communication between the Redis master and slave nodes has not occurred for the past 60 seconds or more. >=60 <60
Redis - Replica Lag This alert fires when we detect that the replica lag for a given Redis cluster is greater than 60 seconds. Please review how replication has been configured. >60 <=60
Redis - Replication Broken This alert fires when we detect that a Redis instance has lost all slaves. This will affect the redundancy of data stored in Redis. Please review how replication has been configured. <0 >=0
Redis - Replication Offset This alert fires when the replication offset in a given Redis cluster is greater than 1 MB for the last five minutes. Please review how replication has been configured. >=1 <1
Redis - Out of Memory This alert fires when we detect that a Redis node is running out of memory (> 90%). > 90% < 90%
Redis - High CPU Usage This alert is fired if user and system cpu usage for a host exceeds 80%. > 80% < 80%
Status
Legal
Privacy Statement
Terms of Use

Copyright © 2025 by Sumo Logic, Inc.