[Pacemaker] monitoring attributes

Giuliano Zorzi g.zorzi at telerix.it
Mon Mar 3 04:26:30 EST 2014

Hi all,
I'm stuck on something I thought to be very simple, but googling hasn't 
helped me :(

I have a 2 node cluster with an IPaddress2 resource and a 
pacemaker:pingd clone. The resource goes away from the node with pingd 
value = 0 just fine.

Now I need to run a script on the "failed" node when it comes back but I 
can't seem to find a way.

I tried ClusterMon but it seems to work only when the clone resource is 
started/stopped, not when the atrtibute value changes

Is there a way to have this done ?
As last resort I could use a cronjob and monitor the pingd attribute 
with crm_attribute (crm_attribute --query --name=pingd --node node1 
returns "name=pingd value=(null) Error performing operation: cib object 
missing", any idea ?)

Any help will be greatly appreciated



versions details
OS is centos 5
kernel is 2.6.18-194.26.1.el5 #1 SMP Tue Nov 9 12:54:40 EST 2010 i686 
i686 i386 GNU/Linux
all from clusterlabs repo

crm config
primitive p_ping ocf:pacemaker:ping \
         params host_list="" multiplier="100" dampen="5s" \
         op monitor interval="60" timeout="60" \
         op start interval="0" timeout="60" \
         op stop interval="0" timeout="60"
clone c_ping p_ping
primitive res_IPaddr2 ocf:heartbeat:IPaddr2 \
         params ip="" cidr_netmask="32" \
         operations $id="res_IPaddr2-operations" \
         op start interval="0" timeout="20" \
         op stop interval="0" timeout="20" \
         op monitor interval="10" timeout="20" start-delay="0"
location l_ping res_IPaddr2 \
         rule $id="l_ping-rule" -inf: not_defined pingd or pingd lte 0
property $id="cib-bootstrap-options" \
         dc-version="1.0.12-unknown" \
         cluster-infrastructure="Heartbeat" \
         stonith-enabled="false" \
         no-quorum-policy="ignore" \
rsc_defaults $id="rsc-options" \

More information about the Pacemaker mailing list