Skip to main content
Sumo Logic

Collect Logs and Metrics for Redis

This page provides instructions for collecting logs for the Sumo App for Redis ULM.

This page provides instructions for configuring log and metric collection for the Sumo Logic App for Redis.

Collection Process Overview

Configuring log and metric collection for the Redis ULM App includes the following tasks:

  • Step 1: Configure Fields in Sumo Logic.
  • Step 2: Configure Collection for Redis
    • Collect Redis Logs and Metrics for Non-Kubernetes environments.
    • Collect Redis Logs and Metrics for Kubernetes environments.

Step 1: Configure Fields in Sumo Logic

Create the following Fields in Sumo Logic prior to configuring collection. This ensures that your logs and metrics are tagged with relevant metadata, which is required by the app dashboards. For information on setting up fields, see the Fields help page.

If you are using Redis in a  non-Kubernetes environment create the fields:

  • component
  • environment
  • db_system
  • db_cluster

If you are using Redis in a Kubernetes environment create the fields:

  • pod_labels_component
  • pod_labels_environment
  • pod_labels_db_system
  • pod_labels_db_cluster

Step 2: Configure Collection for Redis

Sumo Logic supports collection of logs and metrics data from Redis in both Kubernetes and non-Kubernetes environments. 

Please click on the appropriate links below based on the environment where your Redis clusters are hosted.

db_cluster=<Your_Redis_cluster_Name> component="database" and db_system="redis"

Sample Log Messages

Kubernetes:
{
"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"
}
Non-Kubernetes:
5275:S 17 Mar 2021 19:13:38.138 * MASTER <-> REPLICA sync: Finished with success

Query Sample

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

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