Need to write a Shell Script for Zabbix Application Level Clustering
Dear All,
We have zabbix Network monitoring tool installed on two servers 172.17.11.6 ( Master ) and 172.17.11.3 ( Slave ) RHEL 5.4 Servers with 172.17.11.4 being Virtual Ipaddress. We are trying to implement High Availability with Red Hat Cluster Suite. OS level Clustering has been implemented with following cluster configuraiton. Code:
<?xml version="1.0"?> But we need to implement Application level clustering for Zabbix_server process which inturn depends on httpd and mysqld deamons to be running. So I have to check the health of mysqld and httpd with a shell script along with the health of zabbix_server process. Any good tutorials for this ? Any guidlines that I have to follow ? Here I may need to take care of following things when any one of the process goes down 1. Shifhting Virtual IP 2. Shifting /dev/sdb1 ( Shared drive to slave ) 3. stopping other services on master 4. starting all the services on slave Please help.. Thanks in advance |
For quick hints, you can check if the process of mysqld, httpd and zabbix_server is still running by using pidof. Example
Code:
pidof mysqld >/dev/null 2>&1 || echo 'mysqld is no longer running.' Code:
[[ -d /proc/$PID ]] || echo '... is no longer running.' Code:
kill -s 0 "$PID" || echo '... is no longer running.' Code:
killall -s 0 mysqld || echo 'mysqld is no longer running.' |
Example implementation script:
Code:
#!/bin/bash |
Thanks konsolebox !!
I am Writing the script, thanks again for your inputs. |
No prob.
|
All times are GMT -5. The time now is 08:31 AM. |