---
title: "Redis cluster logs"
sidebar_label: "Cluster logs"
sidebar_position: 8
description: "How to enable Redis cluster logging, get logs, and disable cluster logging"
---

import Formbricks from '@theme/MDXComponents/Formbricks';
import EnableLogs from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/managed-databases/common/enable-logs.mdx';
import DisableLogs from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/managed-databases/common/disable-logs.mdx';
import { CustomTable } from '@selectel/docux/components';

# Redis cluster logs

The [Logs](/logs/) service is used for logging. Read more about how the service works and its pricing in the [Logs Service Description](/logs/about/about-logs.mdx) article. You can check Logs service availability in different locations in the [Logs availability by location](/logs/about/logs-availability-by-location.mdx) article.

Logged events in a Redis Managed Database cluster are defined by the parameter `loglevel = notice`.

To collect cluster logs in the Logs service, you need to [enable logging](#enable-logs). [You can retrieve logs](#get-logs) in the Control Panel using API requests or [AWS CLI](/logs/tools/aws-cli.mdx). If you no longer need to collect logs, you can [disable logging](#disable-logs).

Logs are stored for 30 days.

## Enable logging \{#enable-logs}

<EnableLogs DatabaseName="Redis" ArticleName="Monitoring of the cluster, nodes and databases Redis" slug="redis" />

## Get logs \{#get-logs}

Use the [Get logs](/logs/manage/get-logs.mdx) instruction in the Logs section.

an event stream `redis.log-<instance_id>` has been created for the Redis Managed Database cluster, where `<instance_id>` is the cluster node ID.

See the description of [log fields](#fields) for a Redis cluster.

## Log fields \{#fields}

<CustomTable>
  <table>
    <tbody>
      <tr>
        <th>\_HOSTNAME</th><td>cluster node name in the format `dbaas-<instance_id>`, where `<instance_id>` is the Redis cluster node ID</td>
      </tr>

      <tr>
        <th>SYSLOG\_IDENTIFIER</th><td>Log source name</td>
      </tr>

      <tr>
        <th>SYSLOG\_TIMESTAMP</th><td>Event time in the log</td>
      </tr>

      <tr>
        <th>MESSAGE</th><td>Description of the event transmitted by the log source</td>
      </tr>
    </tbody>
  </table>
</CustomTable>

## Disable logging \{#disable-logs}

<DisableLogs />

<Formbricks />
