There are several ways to perform health checks against ClusterControl to ensure it runs correctly. Since ClusterControl consists of several components, every component may have different ways to probe its liveliness.
The following tabs show examples on how to perform health checks based on ClusterControl components:
Sysvinit/Upstart:
service cmon status
Systemd:
systemctl status cmon
curl:
curl -sSf http://localhost/clustercontrol/ > /dev/null
lynx:
lynx http://localhost/clustercontrol/
Sysvinit/Upstart:
service cmon-ssh status
Systemd:
systemctl status cmon-ssh
Sysvinit/Upstart:
service cmon-cloud status
Systemd:
systemctl status cmon-cloud
Sysvinit/Upstart:
service cmon-event status
Systemd:
systemctl status cmon-event
In shell scripting, expect the above commands to return a good response like exit code 0 to indicate a running process. You could also use other means by checking the process list, connecting to the respective service ports or inspecting the log files.
By default, a failed cmon
process will be restarted by a cron script automatically. This is installed by default and gets enabled whenever the user starts the service.