I have CentOs 9.3 installed and using two VMs. That is I have two nodes HA
configuration. I configured one node as master and another as standby. I
have created three resources like vip-master, vip-rep and pgsql and again
creating resource as in following command. I want to configure HA failover
notification. When failover happen I want notification about fail node and
new master.

Once I execute following command
pcs resource create test ClusterMon ocf:pacemaker:ClusterMon params
user="root" update="30" extra_options="-E /usr/local/bin/test.sh" op monitor
on-fail="restart" interval="10" clone test-clone ClusterMon  meta
target-role="Started"
 
Then I did  # cibadmin --query > tmp.xml then check with tmp.xml. It has
entries for whatever resources created for HA along with test resource
created in above command.

Now I am using test.sh as external agent as

echo $CRM_notify_rc
echo $CRM_notify_task
echo $CRM_notify_recipient
echo $CRM_notify_node
echo $CRM_notify_rsc
echo $CRM_notify_desc
echo $CRM_notify_status
echo $CRM_notify_target_rc

After that I shut down cluster and start it again but no such notification
occur. I think test.sh is not get trigger. As per my knowledge 
ocf:pacemaker:ClusterMon resource runs crm_mon at background. Then why
environment variables from test.sh not able to read cluster status from
crm_mon output.
I have also set permission to all for test.sh 

Thank You,
Ranjan



--
View this message in context: 
http://linux-ha.996297.n3.nabble.com/Monitor-a-Pacemaker-Cluster-with-ocf-pacemaker-ClusterMon-and-or-external-agent-tp15951p15973.html
Sent from the Linux-HA mailing list archive at Nabble.com.
_______________________________________________
Linux-HA mailing list
Linux-HA@lists.linux-ha.org
http://lists.linux-ha.org/mailman/listinfo/linux-ha
See also: http://linux-ha.org/ReportingProblems

Reply via email to