Score:1

Pacemaker error and warn log showing up in syslog rather than pacemaker.log

ug flag

I created a ping check on pacemaker, like so:

pcs resource create ping ocf:pacemaker:ping dampen=5s multiplier=1000 host_list=127.0.0.1 clone

Used something other than 127.0.0.1 of course.

Here's the source code: https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/ping

The ping check foresees an rc code of 0, 1, and any other.

Wanting to see warning and errors, I enabled debug:

pcs resource update ping debug=1

However, instead of logging to /var/log/pacemaker.log, these messages are logged to /var/log/syslog.

Articles like this are just descriptors: https://support.sciencelogic.com/s/article/3961

And this is outdated: http://www.beekhof.net/blog/2013/pacemaker-logging

There doesn't seem to be a way to set this. What am I missing?

EDIT: Most guides I'm finding on this assume CentOs.

On Ubuntu, it seems the pacemaker sysconfig it located here:/etc/default/pacemaker

Score:1
mx flag

This happens because pacemaker inherits the corosync config in /etc/corosync/corosync.conf and this contains

to_syslog: yes

You could check if the pacemaker log is written to corosync.log, in this case you should have this in your corosync.conf:

logfile: /var/log/corosync.log

If you want to have a dedicated pacemaker.log you have to add the following configuration items to your /etc/sysconfig/pacemaker:

PCMK_logfile=/var/log/pacemaker.log

You can control verbosity with e.g.

PCMK_logpriority=warning

Copy the modified config file to all nodes of your cluster and reload pacemaker.

ug flag
Thank you for that, I'll test this soon. I didn't know about the `to_syslog` option, a quick google says it is indeed default syslog and stderr. There's already a `/var/log/pacemaker.log` file, I assume it will just be added to that as well, or should I make a separate one to avoid two processes overwriting each other?
digijay avatar
mx flag
No, using the existing log file should work fine.
ug flag
I'm on ubuntu btw, grepped around a bit, found PCMK_logfile in `/etc/default/pacemaker`
mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.