From b38dbb6bad0fb310bfa5066897829d3dc52aaa3c Mon Sep 17 00:00:00 2001
From: Lubomir Bucek <lubomir.bucek@eox.at>
Date: Tue, 30 Jun 2020 15:48:37 +0200
Subject: [PATCH] add note about cleanup of logs from cws

---
 documentation/operator-guide/management.rst | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/documentation/operator-guide/management.rst b/documentation/operator-guide/management.rst
index 8d384438..3125157c 100644
--- a/documentation/operator-guide/management.rst
+++ b/documentation/operator-guide/management.rst
@@ -59,4 +59,19 @@ A new deployment of the stack will use the updated configuration. The above
 mentioned process necessarily involves a certain service downtime between
 shutting down of the stack and new deployment.
 
+Cleaning up
+-----------
+Current configuration of the services does not have any log rotation set up, which means that service logs can grow significantly over time, if left not maintained and set on verbose logging levels. In order to delete logs older than 7 days from a single node, a following command can be run
+
+.. code-block:: bash
+
+    journalctl --vacuum-time=7d
+
+Additionally in order to delete older logs from docker containers present on a node, keeping only a certain number of newest rows, a following command can be run.
+
+.. code-block:: bash
+
+    truncate -s <number rows to keep> $(docker inspect -f '{{.LogPath}}' $container 2> /dev/null)
+
+
 The final section :ref:`ingestion` explains how to get data into the VS.
-- 
GitLab