Collect statistics before transferring a role
Anton-PG opened this issue · 1 comments
Anton-PG commented
Good day! I would like to collect statistics before proceeding to move the master role. Is there a way to do this? I use the SQL command to collect statistics
ioguix commented
Hello,
I don't understand what you mean by "collect statistics". Furthermore, how would you collect anything using SQL on a failing node?
But whatever you have in mind, maybe you could have a look at alert scripts in Pacemaker:
- https://clusterlabs.org/pacemaker/doc/en-US/Pacemaker/2.0/html-single/Pacemaker_Explained/#idm46061203925104
- https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/configuring_and_managing_high_availability_clusters/assembly_configuring-pacemaker-alert-agents_configuring-and-managing-high-availability-clusters
You can then write a script complying with this specs and that execute what you need based on the environment variables passed to your script.