Mon works properly with scripts that came with the program, but isn't able
to launch my handmade scripts.
In mon.cf I have two alert:
1) alert mail.alert
2) alert lvs.alert
The first one works, the other not.
But if I launch "lvs.alert", with all its parameters, from the command
line it works finely.
##############
this is my lvs.alert file:
#!/usr/bin/perl
#
#lvs.alert - allarme di Linux Virtual Server per mon
#
use Getopt::Std;
getopts ("s:g:h:t:l:P: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 = "-m";
}
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");
}
};
###############
Is there something wrong?
Please help me.
regards
andrea
_______________________________________________
mon mailing list
[EMAIL PROTECTED]
http://linux.kernel.org/mailman/listinfo/mon