Set up local logging for lrmd

Write lrmd logs to the /var/log/lrmd.log on controllers.

Also disabled collecting all pacemaker logs into /var/log/pacemaker.log
because Pacemaker already does that itself. In our installation rsyslog
does not write that file because in most cases Pacemaker creates it
first. For example, see the file's owner in any env, it will be
hacluster, not syslog.

Closes-Bug: #1661003
Change-Id: I0acb59a43bd856b1689918a7cf066624efa13a63
(cherry picked from commit 4d18ef0dad)
This commit is contained in:
Dmitry Mescheryakov 2017-02-02 15:05:05 +04:00 committed by Dmitry Mescheryakov (dmitryme)
parent 7e9c9021b3
commit 3e67eb0043
2 changed files with 8 additions and 4 deletions

View File

@ -1,6 +1,11 @@
# managed by puppet
### collect HA logs of all levels in /var/log/pacemaker.log
### Collect lrmd logs separately as
### they are not collected in pacemaker.log
if $programname == 'lrmd' then -/var/log/lrmd.log
### Pacemaker already writes logs to /var/log/pacemaker.log
### So no need to process these further
if ($programname == 'lrmd' \
or $programname == 'pengine' \
or $programname == 'stonith-ng' \
@ -10,6 +15,4 @@ if ($programname == 'lrmd' \
or $programname == 'crmd' \
or $programname == 'crm_verify' \
or $programname == 'corosync') \
then -/var/log/pacemaker.log
### stop further processing for the matched entries
& stop
then stop

View File

@ -23,6 +23,7 @@
"/var/log/dnsmasq.log"
"/var/log/fuelmenu.log"
"/var/log/kern.log"
"/var/log/lrmd.log"
"/var/log/mail.log"
"/var/log/mcollective*.log"
"/var/log/messages"