MON启动问题求救
用LINUX9.0做LVS.用MON做监控机器.装有这几个软件
fping-2.2b1-1.i386.rpm
Mon-0.11.tar.gz
mon-0.99.2-1.asp.i386.rpm
perl-convert-ber-1.3101-66576cl.i386.rpm
perl-Period-1.20-9asp.i386.rpm启动时报错.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
那解决拉。现在MON软件也能正常启动。二个配置文件分别是mon.cf
lvs.alert
#lvs.alert
use Getopt::Std;
getopts ("s:g:h:t:l:V:R:W:F:u";
$ipvsadm = "/sbin/ipvsadm";
$protocol = $opt_P;
$virtual_service = $opt_V;
$remote = $opt_R;
if ($opt_u) {
$weight = $opt_W;
if ($opt_F eq "nat" {
$forwarding = "-m";
} elsif ($opt_F eq "tun" {
$forwarding = "-i";
} else {
$forwarding = "-g";
}
if ($protocol eq "tcp" {
system("$ipvsadm -a -t $virtual_service -r $remote -w $weight $forwarding";
} else {
system("$ipvsadm -a -u $virtual_service -r $remote -w $weight $forwarding";
}
} else {
if ($protocol eq "tcp" {
system("$ipvsadm -d -t $virtual_service -r $remote";
} else {
system("$ipvsadm -d -u $virtual_service -r $remote";
}
}
和mon.cfcfbasedir = /etc/mon
pidfile = /var/run/mon.pid
statedir = /var/run/mon/state.d
logdir = /var/run/mon/log.d
dtlogfile = /var/run/mon/log.d/downtime.log
alertdir = /usr/lib/mon/alert.d
mondir = /usr/lib/mon/mon.d
maxprocs = 20
histlength = 100
randstart = 60s
authtype = userfile
userfile = /etc/mon/userfile
#
# group definitions (hostnames or IP addresses)
#
hostgroup www1 localhost
hostgroup www2 192.168.0.224
watch www1
service http
interval 10s
monitor http.monitor
period wd {Sun-Sat}
# alert mail.alert wensong
# upalert mail.alert wensong
alert lvs.alert -P tcp -V 192.168.0.100:80 -R 192.168.0.222 -W 5 -F dr
upalert lvs.alert -P tcp -V 192.168.0.100:80 -R 192.168.0.222 -W 5 -F dr
#
# Web server 2
#
watch www2
service http
interval 10s
monitor http.monitor
period wd {Sun-Sat}
# alert mail.alert wensong
# upalert mail.alert wensong
alert lvs.alert -P tcp -V 192.168.0.100:80 -R 192.168.0.224 -W 5 -F dr
upalert lvs.alert -P tcp -V 192.168.0.100:80 -R 192.168.0.224 -W 5 -F dr
LVS和MON都正常运行后。我断掉一台后。它不能自动删除和增加。不知问题出在那。请高手指点
Time-HiRes-1.87.tar.gz解压后怎么安装啊
这是有几个perl modules没有安装的原因,请查看解压缩后的INSTALL文件。需要安装以下几个文件
Convert-BER-1.3101.tar
Period-1.20.tar
Time-HiRes-1.87.tar