]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
doc: add documentation for eve-log file rotation
authorMats Klepsland <mats.klepsland@gmail.com>
Tue, 14 Feb 2017 09:53:34 +0000 (10:53 +0100)
committerVictor Julien <victor@inliniac.net>
Thu, 6 Apr 2017 14:19:45 +0000 (16:19 +0200)
doc/userguide/output/eve/eve-json-output.rst

index d89430ebef48b841f9d6021e84c3e6589d185540..97ede6d94115ad0385e9fcedac1320064aa37502 100644 (file)
@@ -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
 ~~~~~~~~~~~~~~~~~~~~~~~~~