From: Mats Klepsland Date: Tue, 14 Feb 2017 09:53:34 +0000 (+0100) Subject: doc: add documentation for eve-log file rotation X-Git-Tag: suricata-4.0.0-beta1~223 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=37a12fe799252bde8cc37c187126ca6a2bfae018;p=thirdparty%2Fsuricata.git doc: add documentation for eve-log file rotation --- diff --git a/doc/userguide/output/eve/eve-json-output.rst b/doc/userguide/output/eve/eve-json-output.rst index d89430ebef..97ede6d941 100644 --- a/doc/userguide/output/eve/eve-json-output.rst +++ b/doc/userguide/output/eve/eve-json-output.rst @@ -203,6 +203,35 @@ enabled, then the log gets more verbose. By using ``custom`` it is possible to select which TLS fields to log. +Rotate log file +~~~~~~~~~~~~~~~ + +Eve-log can be configured to rotate based on time. + +:: + + outputs: + - eve-log: + filename: eve-%Y-%m-%d-%H:%M.json + rotate-interval: minute + +The example above creates a new log file each minute, where the filename contains +a timestamp. Other supported ``rotate-interval`` values are ``hour`` and ``day``. + +In addition to this, it is also possible to specify the ``rotate-interval`` as a +relative value. One example is to rotate the log file each X seconds. + +:: + + outputs: + - eve-log: + filename: eve-%Y-%m-%d-%H:%M:%S.json + rotate-interval: 30s + +The example above rotates eve-log each 30 seconds. This could be replaced with +``30m`` to rotate every 30 minutes, ``30h`` to rotate every 30 hours, ``30d`` +to rotate every 30 days, or ``30w`` to rotate every 30 weeks. + Multiple Logger Instances ~~~~~~~~~~~~~~~~~~~~~~~~~