标签:chm form 服务器 sof sha lock file cat blog 高可用
! Configuration File for keepalived global_defs { notification_email { xuequn@kingsoft.com } notification_email_from zabbix@kingsoft.com smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_DEVEL } vrrp_script chk_zabbix_server { script "/etc/keepalived/chk_zabbix_server.sh" interval 30 weight 2 } vrrp_instance VI_1 { state MASTER interface eth0 virtual_router_id 60 priority 150 advert_int 1 mcast_src_ip 142.162.196.111 authentication { auth_type PASS auth_pass ZabbixServer } track_script { chk_zabbix_server } virtual_ipaddress { 142.162.196.116 } }
! Configuration File for keepalived global_defs { notification_email { xuequn@kingsoft.com } notification_email_from zabbix@kingsoft.com smtp_server 127.0.0.1 smtp_connect_timeout 30 router_id LVS_DEVEL } vrrp_script chk_zabbix_server { script "/etc/keepalived/chk_zabbix_server.sh" interval 30 weight 2 } vrrp_instance VI_1 { state BACKUP interface eth0 virtual_router_id 60 priority 99 advert_int 1 mcast_src_ip 142.162.196.112 authentication { auth_type PASS auth_pass ZabbixServer } track_script { chk_zabbix_server } virtual_ipaddress { 142.162.196.116 } }
#!/bin/bash # # status1=$(ps aux|grep -w "zabbix_server" | grep -v grep | grep -v bash | wc -l) if [ "${status1}" = "0" ]; then /etc/init.d/zabbix-server start sleep 3 status2=$(ps aux|grep zabbix_server | grep -v grep | grep -v bash |wc -l) if [ "${status2}" = "0" ]; then /etc/init.d/keepalived stop fi fi
<sersync> <localpath watch="/usr/share/zabbix/"> <remote ip="172.29.31.112" name="zabbixweb"/> </localpath> <rsync> <commonParams params="-artuz"/> <auth start="true" users="zabbixmonitor" passwordfile="/etc/rsyncd/zabbixmonitor.pas"/> <userDefinedPort start="false" port="874"/><!-- port=874 --> <timeout start="false" time="100"/><!-- timeout=100 --> <ssh start="false"/> </rsync> <failLog path="/tmp/rsync_fail_log.sh" timeToExecute="60"/><!--default every 60mins execute once--> <crontab start="false" schedule="600"><!--600mins--> <crontabfilter start="false"> <exclude expression="*.php"></exclude> <exclude expression="info/*"></exclude> </crontabfilter> </crontab> <plugin start="false" name="command"/> </sersync>
标签:chm form 服务器 sof sha lock file cat blog 高可用
原文地址:http://www.cnblogs.com/skyflask/p/7501104.html