Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-12343

Document How to Integreate MongoDB with LogRotate for Advanced Log Rotation

      Description

      It is fairly common for users to wish for more advanced log rotation. For example:

      • Automatically rotating the logs at time intervals, e.g. at 00:00:00 every Monday
      • Automatically rotating the logs when they reach a certain size, e.g. 250MB

      Rather than re-implement these features directly in MongoDB, we have chosen instead to implement work that allows us to integrate well with the de-facto standard and ubiquitous system tooling – the logrotate project – which is available on Linux, macOS, and Windows. (See SERVER-18335)

      We have documentation on how to do manual rotations using the built-in features here: https://docs.mongodb.com/manual/tutorial/rotate-log-files/ 

      We should build on that and demonstrate how those underlying features allow us to easily integrate with LogRotate and show examples of how to implement some common requests for MongoDB log files, such as those noted above.

      Some related documentation can be seen here:

      Scope of changes

      • Test and document using logrotate on Ubuntu 18.04, 16.04, 14.04
      • Test and document using logrotate on Windows Server 2008/2012
      • Test and document using logrotate on OSX
      • Document procedure and backport to 3.4 (modify existing log rotation documentation to reference logrotate utility with prominent admonition / disclaimer given third-party tech

       

            Assignee:
            Unassigned Unassigned
            Reporter:
            matt.lord Matt Lord (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              1 year, 25 weeks, 2 days ago