大网数据广告活动
服务器运维问答

Pacemaker - Logging the result of a ping check?

· 52CE 我爱测

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 lin…

问题原文

原帖链接 · KdgDev · CC BY-SA 4.0

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?

已采纳解答

原帖链接 · KdgDev · CC BY-SA 4.0

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.

摘自公开归档,保留原文语言,版式经整理,外部媒体与邮箱地址已移除。

资料来源与适用范围

资料来源
Server Fault
适用范围
以原帖系统、软件版本与发布日期为准(2021-11-17)
内容语言
中文;命令、路径和错误标识保留技术原文
本地收录日期
2026-11-15
授权说明
CC BY-SA 4.0

正文与所需资源由本站本地存储。查看来源及更新记录 ↗

请按适用版本和实际日志确认原因;本站没有对每一种系统或设备逐项执行文中的操作。