From f32d385abf788f4712f583fc8a5b146f2842bdc9 Mon Sep 17 00:00:00 2001 From: David Date: Mon, 2 Feb 2026 10:34:25 +0100 Subject: [PATCH] Add logrotate package, update create-config --- bin/misp_create_configs.py | 12 ++++++++++++ packages | 1 + 2 files changed, 13 insertions(+) diff --git a/bin/misp_create_configs.py b/bin/misp_create_configs.py index 89395eb..bcbe5d6 100644 --- a/bin/misp_create_configs.py +++ b/bin/misp_create_configs.py @@ -481,6 +481,18 @@ def generate_vector_config(variables: dict): } if variables["ECS_LOG_FILE"]: + logrotate_config = f'{variables["ECS_LOG_FILE"]} {{ \n' \ + f' daily\n' \ + f' rotate 4\n' \ + f' dateext\n' \ + f' create\n' \ + f' compress\n' \ + f' missingok\n' \ + f' notifempty\n' \ + f' copytruncate\n' \ + f'}} \n' + write_file("/etc/logrotate.d/vector", logrotate_config) + if variables["ECS_LOG_FILE_FORMAT"] == "ecs": sinks = { "file": { diff --git a/packages b/packages index 996b6d5..dbeb627 100644 --- a/packages +++ b/packages @@ -8,6 +8,7 @@ ssdeep-libs rsyslog vector crypto-policies-scripts +logrotate # Python python3.12