I've modified the script lvs.alert (script used with mon) to handle a
hostgroup config.
I mean: until now, you have to config one hostgroup for host, because
lvs.alert needed a full command line as alert.command.
With lvs.alert modified, you can use hostgroup to have all servers
monitored.
In other words, before:
-----------------------
hostgroup smtp1 smtpserver-1
hostgroup smtp2 smtpserver-2
watch smtp1
service smtp
interval 30s
monitor smtp.monitor
alert lvs.alert -P tcp -V smtpvip:25 -R smtpserver-1
upalert lvs.alert -P tcp -V smtpvip:25 -R smtpserver-1
watch smtp2
service smtp
interval 30s
monitor smtp.monitor
alert lvs.alert -P tcp -V smtpvip:25 -R smtpserver-2
upalert lvs.alert -P tcp -V smtpvip:25 -R smtpserver-2
-----------------------
Now you can "glue" with hostgroup
-----------------------
hostgroup smtp smtpserver-1 smtpserver-2
watch smtp
service smtp
interval 30s
monitor smtp.monitor
alert lvs.alert -P tcp -V smtpvip:25
upalert lvs.alert -P tcp -V smtpvip:25
-----------------------
May it be useful?
Where may I send it?
--
Enjoy your freedom
Andrea Cerrito
http://www.gentestrana.net/
Linux User #103564
=== (17:57:49) Nietzsche: "niente è quello che sembra"
|