From 70eac4af135cfbd9f223c7a45e68a7550d4b7a9c Mon Sep 17 00:00:00 2001 From: Joao Victor Portal Date: Mon, 7 Feb 2022 20:36:53 -0300 Subject: [PATCH] Added log file for "fm-api" service The file "/var/log/fm-api.log" was created to contain the logs of "fm-api" linux service. Currently, these logs are being directed to "/var/log/openstack.log". Test Plan: PASS: Successfully deploy an AIOSX and verify that the logs of "fm-api" service are present in file "/var/log/fm-api.log" and not present in "/var/log/openstack.log". PASS: In the deployed AIO-SX, execute command "collect --all" and check that the following files are included in the generated "tar" file: "/var/log/fm-api.log", "/var/log/fm-api.log.1.gz" and "/var/log/fm-api.log.2.gz". PASS: Successfully build "syslog-ng-config" package of this repository as Debian package. Story: 2009824 Task: 44462 Signed-off-by: Joao Victor Portal Change-Id: I0e3171453be6c7c86cb2c325955264e038152771 --- syslog-ng-config/debian-source/syslog-ng.conf | 4 ++++ syslog-ng-config/files/syslog-ng.conf | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/syslog-ng-config/debian-source/syslog-ng.conf b/syslog-ng-config/debian-source/syslog-ng.conf index b2f0bd0..bf84c2c 100644 --- a/syslog-ng-config/debian-source/syslog-ng.conf +++ b/syslog-ng-config/debian-source/syslog-ng.conf @@ -110,6 +110,7 @@ destination d_sm { file("/var/log/sm.log"); }; destination d_haproxy { file("/var/log/haproxy.log"); }; # Fault Management Log destination +destination d_fm_api { file("/var/log/fm-api.log" template(t_openstack)); }; destination d_fm_event { file("/var/log/fm-event.log"); }; destination d_fm_manager { file("/var/log/fm-manager.log" template(t_fm) perm(0600)); }; @@ -249,6 +250,7 @@ filter f_local2 { facility(local2) and not program(barbican-keystone-listener) and not program(barbican-worker) and not program(barbican-cleaner) + and not program(fm) and not filter(f_keystoneall) and not filter(f_keystoneapi) }; filter f_local3 { facility(local3); }; @@ -257,6 +259,7 @@ filter f_local6 { facility(local6); }; filter f_local7 { facility(local7); }; # Fault Management Filter +filter f_fm_api { facility(local2) and program(fm) }; filter f_fm_event { facility(local5) and program(fmManager); }; filter f_fm_manager { facility(local1) and program(fmManager); }; @@ -311,6 +314,7 @@ log { source(s_src); filter(f_local3); destination(d_sm); }; log { source(s_udp); filter(f_local1); destination(d_haproxy); }; # Fault Management Log Path +log { source(s_src); filter(f_fm_api); destination(d_fm_api); }; log { source(s_src); filter(f_fm_event); destination(d_fm_event); }; log { source(s_src); filter(f_fm_manager); destination(d_fm_manager); }; diff --git a/syslog-ng-config/files/syslog-ng.conf b/syslog-ng-config/files/syslog-ng.conf index c4e7e07..56b1662 100644 --- a/syslog-ng-config/files/syslog-ng.conf +++ b/syslog-ng-config/files/syslog-ng.conf @@ -110,6 +110,7 @@ destination d_sm { file("/var/log/sm.log"); }; destination d_haproxy { file("/var/log/haproxy.log"); }; # Fault Management Log destination +destination d_fm_api { file("/var/log/fm-api.log" template(t_openstack)); }; destination d_fm_event { file("/var/log/fm-event.log"); }; destination d_fm_manager { file("/var/log/fm-manager.log" template(t_fm) perm(0600)); }; @@ -249,6 +250,7 @@ filter f_local2 { facility(local2) and not program(barbican-keystone-listener) and not program(barbican-worker) and not program(barbican-cleaner) + and not program(fm) and not filter(f_keystoneall) and not filter(f_keystoneapi) }; filter f_local3 { facility(local3); }; @@ -257,6 +259,7 @@ filter f_local6 { facility(local6); }; filter f_local7 { facility(local7); }; # Fault Management Filter +filter f_fm_api { facility(local2) and program(fm) }; filter f_fm_event { facility(local5) and program(fmManager); }; filter f_fm_manager { facility(local1) and program(fmManager); }; @@ -311,6 +314,7 @@ log { source(s_src); filter(f_local3); destination(d_sm); }; log { source(s_udp); filter(f_local1); destination(d_haproxy); }; # Fault Management Log Path +log { source(s_src); filter(f_fm_api); destination(d_fm_api); }; log { source(s_src); filter(f_fm_event); destination(d_fm_event); }; log { source(s_src); filter(f_fm_manager); destination(d_fm_manager); };