{
  "id": "log-security",
  "title": "Manage logs",
  "url": "https://redis.io/docs/latest/operate/rs/7.8/clusters/logging/log-security/",
  "summary": "",
  "content": "Redis Enterprise comes with [a set of logs]() 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]() 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${logdir}/*.log {\n    su ${osuser} ${osgroup}\n    maxsize 200M\n    daily\n    missingok\n    copytruncate\n    rotate 10\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\" = \"${logdir}/cluster_wd.log\" ]; then\n            cp -p ${logdir}/cluster_wd.log ${logdir}/cluster_wd.log.long_retention\n        fi\n    endscript\n}\n${logdir}/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- `${logdir}/*.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- `${logdir}/cluster_wd.log.long_retention`: `cluster_wd.log` is copied to `cluster_wd.log.long_retention` before rotation. This copy is kept longer than usual, which is 30 days by default.\n\n- `maxsize 200M`: Rotate log files that exceed 200 MB.\n\n- `daily`: Rotate logs every day regardless of their size.\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 10`: Save a maximum of 10 rotated log files. To keep effectively infinite log files, use `rotate 2000` instead.\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\nFor 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\n",
  "tags": ["docs","operate","rs"],
  "last_updated": "2026-04-01T08:10:08-05:00"
}

