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 <Joao.VictorPortal@windriver.com>
Change-Id: I0e3171453be6c7c86cb2c325955264e038152771
This commit is contained in:
Joao Victor Portal 2022-02-07 20:36:53 -03:00
parent 7a74d90618
commit 70eac4af13
2 changed files with 8 additions and 0 deletions

View File

@ -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); };

View File

@ -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); };