From 7069ed1cd80dce6f3017e01780c3cadf9df93a3a Mon Sep 17 00:00:00 2001 From: ionutboangiu Date: Fri, 23 May 2025 20:11:05 +0300 Subject: [PATCH] Fix rsyslog config to capture logs across distros Add three conditions to properly capture CGRateS logs: - programname startswith 'cgr-engine': catches logs from external libraries that don't use our syslogger (e.g. diameter conn errors) - programname startswith 'CGRateS': handles deb-based distros where our syslog tag becomes the program name - msg contains 'CGRateS': handles rpm-based distros where systemd journal overrides programname but our tag remains in message content --- data/conf/logging/rsyslog.conf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/data/conf/logging/rsyslog.conf b/data/conf/logging/rsyslog.conf index 98427e8b7..cf53d0693 100644 --- a/data/conf/logging/rsyslog.conf +++ b/data/conf/logging/rsyslog.conf @@ -1,4 +1,4 @@ -if ($programname startswith 'cgr-engine' or $programname startswith 'CGRateS') then { +if ($programname startswith 'cgr-engine' or $programname startswith 'CGRateS' or $msg contains 'CGRateS') then { action(type="omfile" File="/var/log/cgrates/CGRateS.log") stop -} \ No newline at end of file +}