LVS
lvs-users
Google
 
Web LinuxVirtualServer.org

lvs.alert modified

To: "LinuxVirtualServer.org users mailing list." <lvs-users@xxxxxxxxxxxxxxxxxxxxxx>
Subject: lvs.alert modified
From: Andrea Cerrito <is@xxxxxxxxxxxxxxx>
Date: Fri, 30 Apr 2004 11:54:24 +0200
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"

<Prev in Thread] Current Thread [Next in Thread>