Pacemaker - Logging the result of a ping check?
Nov 17
I read this page and the next: https://clusterlabs.org/pacemaker/doc/deprecated/en-US/Pacemaker/1.1/html/Pacemaker_Explained/_moving_resources_due_to_connectivity_changes.html
And it explains how to set up a ping that you can link to the allocation of a resource.
While this works, if I have more than 1 URL or more than 1 ping check, how can I know which one is failing?
It seems this isn't logged anywhere if it occurs. It just occurs and pacemaker makes a decision...
Reading this source code: https://github.com/ClusterLabs/pacemaker/blob/master/extra/resources/ping
It seems a debug environment variable needs to be enabled. I'd rather not do this, assuming I have to restart pacemaker for it and thus messing up allocations, plus whatever amount of extra logs will now be taking up disk space.
Is there a way to just only log a single line if a ping failed, saying only that, and affecting nothing else?
1 answer
Accepted answer · original discussion
Nov 30
It turns out that the debug option isn't just an environment variable, it can be set on the ping resource itself, like this:
pcs resource update ping debug=1
The only downside is: the log doesn't appear in /var/log/pacemaker.log as expected but in /var/log/syslog.
0 question comments
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.