{
  "schema_version": 2,
  "id": "operate/rs/clusters/logging/log-security",
  "title": "Manage logs",
  "url": "https://redis.io/docs/latest/operate/rs/7.4/clusters/logging/log-security/",
  "summary": "",
  "content": "Redis Enterprise comes with [a set of logs](https://redis.io/docs/latest/operate/rs/clusters/logging) on the server and available through the user interface to assist users in investigating actions taken on the server and to troubleshoot issues.\n\n## Send logs to a remote logging server\n\nRedis Enterprise sends logs to syslog by default. You can send these logs to a remote logging server by configuring syslog.\n\nTo do this, modify the syslog or rsyslog configuration on your operating system to send logs in the `$logdir` directory (`/var/opt/redislabs/log` in default installations) to a remote monitoring server of your choice. See [rsyslog logging](https://redis.io/docs/latest/operate/rs/clusters/logging/rsyslog-logging) for additional details.\n\n## Log rotation\n\nRedis Enterprise Software's job scheduler runs `logrotate` every five minutes to examine logs stored on the operating system and rotate them based on the log rotation configuration. You can find the log rotation configuration file at `$pkgconfdir/logrotate.conf` as of Redis Enterprise Software version 7.2 (`pkgconfdir` is `/opt/redislabs/config` by default, but can be changed in a custom installation).\n\nBy default, log rotation occurs when a log exceeds 200 MB. We recommend sending log files to a remote logging server so you can maintain them more effectively.\n\nThe following log rotation policy is enabled by default in Redis Enterprise Software, but you can modify it as needed.\n\n```sh\n/var/opt/redislabs/log/*.log {\n    su ${osuser} ${osgroup}\n    size 200M\n    missingok\n    copytruncate\n    # 2000 is logrotate's way of saying 'infinite'\n    rotate 2000\n    maxage 7\n    compress\n    notifempty\n    nodateext\n    nosharedscripts\n    prerotate\n        # copy cluster_wd log to another file that will have longer retention\n        if [ \"\\$1\" = \"/var/opt/redislabs/log/cluster_wd.log\" ]; then\n        \tcp -p /var/opt/redislabs/log/cluster_wd.log /var/opt/redislabs/log/cluster_wd.log.long_retention\n        fi\n    endscript\n}\n/var/opt/redislabs/log/cluster_wd.log.long_retention {\n    su ${osuser} ${osgroup}\n    daily\n    missingok\n    copytruncate\n    rotate 30\n    compress\n    notifempty\n    nodateext\n}\n```\n\n- `/var/opt/redislabs/log/*.log` - `logrotate` checks the files under the `$logdir` directory (`/var/opt/redislabs/log/`) and rotates any files that end with the extension `.log`.\n\n- `/var/opt/redislabs/log/cluster_wd.log.long_retention` - The contents of `cluster_wd.log` is copied to `cluster_wd.log.long_retention` before rotation, and this copy is kept for longer than normal (30 days).\n\n- `size 200M` - Rotate log files that exceed 200 MB.\n\n- `missingok` - If there are missing log files, do nothing.\n\n- `copytruncate` - Truncate the original log file to zero sizes after creating a copy.\n\n- `rotate 2000` - Keep up to 2000 (effectively infinite) log files.\n\n- `compress` - gzip log files.\n\n- `maxage 7` - Keep the rotated log files for 7 days.\n\n- `notifempty` - Don't rotate the log file if it is empty.\n\n\u003e [!NOTE]\n\u003e For large scale deployments, you might need to rotate logs at faster intervals than daily. You can also use a cronjob or external vendor solutions.\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-10-21T09:46:20-07:00"
}
