用Heartbeat配置Linux高可用性集群(下)
2008-08-30 10:54:41 来源:WEB开发网#wget http://www.kernel.org/pub/software/admin/mon/fping-2.2b1.tar.bz2
5 下载安装Mon
#bunzip2 fping-2.2b1.tar.bz2
#./configure
#make
#make check
#make install
#wget ftp://ftp.kernel.org/pub/software/admin/mon/mon-0.99.2.tar.gz
建立Mon报告目录和Mon报告文件
#tar -xzf mon-0.99.2.tar.gz
#cd mon-0.99.2
#mkdir /etc/mon
#cp auth.cf mon.cf /etc/mon
#mkdir /usr/lib/mon
#cp -r alert.d mon.d state.d mon /usr/lib/mon
#mkdir /usr/lib/mon/log.d
内容如下:
#vi /etc/mon/auth.cf
disable: root
#vi /etc/mon/mon.cf
dump: root
enable: root
get: root
loadstate: root
reset: root
savestate: root
set: root
start: root
stop: root
term: root
内容如下:
不要写跟随他们的箭和数字; 他们仅仅出现在这里说明参数。
alertdir = /usr/lib/mon/alert.d ← [1]
mondir = /usr/lib/mon/mon.d ← [2]
logdir = /usr/lib/mon/logs ← [3]
histlength = 500 ← [4]
dtlogging = yes ← [5]
dtlogfile = /usr/lib/mon/logs/dtlog ← [6]
hostgroup clusternodes clnode1 clnode2 clnode3 ← [7]
← [8]
watch clusternodes ← [9]
service cluster-ping-check [10]
interval 5s [11]
monitor fping.monitor [12]
period wd ...{Sa-Su} [13]
alert mail.alert alert@domain.com ← [14]
upalert mail.alert alert@domain.com ← [15]
alertevery 1h ← [16]
更多精彩
赞助商链接