[ClusterLabs] About the pacemaker

Ken Gaillot kgaillot at redhat.com
Tue Jan 8 11:14:37 EST 2019


On Tue, 2019-01-08 at 15:27 +0800, T. Ladd Omar wrote:
> Hey guys. I have a question, if the Pacemaker has an event-notify
> interface which is realized by push&pull. Recently I want to do
> something extra using other process when the resources being started
> or deleted. So I need a way to monitor the resources events.
> ClusterMon and alerts both use external-scripts for extra actions,
> but in my situation, the specific process might have not being
> started. I hope pacemaker itself could store the old events and flush
> them for updating until the specific process starts and subscribe to
> Pacemaker, then pull all the old events. Also the Pacemaker could
> push to it when new events come.

I would use alerts with alert_file.sh (with custom modifications if
desired) to record them to a file, then have your process look at that.
(Tip: if you only care about events since the last boot, put the file
in /run so you don't have to worry about cleaning it up.)

> Above is all what I thought, maybe it is not accurate. Anyway, I need
> some advice.
> By the way, there is no deletion notify in ClusterMon and alerts,
> right ?

Correct, configuration changes are not alerted. The only way I know of
to get configuration changes is to use the C API for update/replace
callbacks. It would also be possible to poll the configuration at
intervals and use crm_diff to compare them, but that's probably not any
easier.
-- 
Ken Gaillot <kgaillot at redhat.com>




More information about the Users mailing list