From 8bb9e79dc1e3291c73a8b2ed2ac46ba3cbd0f246 Mon Sep 17 00:00:00 2001 From: Pierre Penhouet Date: Fri, 20 Oct 2023 11:50:32 +0200 Subject: [PATCH] Print intake list --- CHANGELOG.md | 2 +- generate_config.py | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f89f678..1fc27ba 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,7 +6,7 @@ All notable changes with sekoiaio concentrator will be documented in this file. - Manage syslog RFC 3164 (only 5424 in 1.0 version) - Add advanced debug options -- Update implemention from bash to jinja +- Update implementation from bash to jinja ## [1.0] diff --git a/generate_config.py b/generate_config.py index 052540f..6ed573e 100644 --- a/generate_config.py +++ b/generate_config.py @@ -13,6 +13,11 @@ i=1 # Generate one file per intake for item in data.get("intakes", []): + print("Intake name: " + str(item["name"].lower())) + print("Protocol: " + str(item["protocol"])) + print("Port: " + str(item["port"])) + print("Intake key: " + str(item["intake_key"])) + print("") config = template.render(item) filename = f"/etc/rsyslog.d/{i}_{item['name'].lower()}.conf" # Écrire le contenu généré dans le fichier