我想使用 corosync+pacemaker+zabbix 来实现高可用。跟随是我的配置
crm(live)configure# show
node zabbix1 \
attributes standby="off" timeout="60"
node zabbix2 \
attributes standby="off"
primitive httpd lsb:httpd \
op monitor interval="10s"
primitive vip ocf:heartbeat:IPaddr \
params ip="192.168.56.110" nic="eth0" cidr_netmask="24" \
op monitor interval="10s"
primitive zabbix-ha lsb:zabbix_server \
op monitor interval="30s" timeout="20s" \
op start interval="0s" timeout="40s" \
op stop interval="0s" timeout="60s"
group webservice vip httpd zabbix-ha
property $id="cib-bootstrap-options" \
dc-version="1.1.8-7.el6-394e906" \
cluster-infrastructure="classic openais (with plugin)" \
expected-quorum-votes="2" \
stonith-enabled="false" \
last-lrm-refresh="1377489711" \
no-quorum-policy="ignore"
rsc_defaults $id="rsc-options" \
resource-stickiness="100"
我的 crm_mon 状态是:
Last updated: Mon Aug 26 18:52:48 2013
Last change: Mon Aug 26 18:52:33 2013 via cibadmin on zabbix1
Stack: classic openais (with plugin)
Current DC: zabbix1 - partition with quorum
Version: 1.1.8-7.el6-394e906
2 Nodes configured, 2 expected votes
3 Resources configured.
Node zabbix1: online
httpd (lsb:httpd): Started
vip (ocf::heartbeat:IPaddr): Started
zabbix-ha (lsb:zabbix_server): Started
Node zabbix2: online
现在我停止zabbix1上的zabbix-ha服务,等待300s,pacemaker无法启动我的zabbix-ha服务:
[root@zabbix1 tmp]# ps -ef|grep zabbix
root 13287 31252 0 18:59 pts/2 00:00:00 grep zabbix
我的 zabbix-ha 脚本可以crm resource stop/start zabbix-ha
用来停止/启动我的 zabbix-ha。