I am using the mon-1-1-0pre1version.

I try to use the 'redistribute' option to log service status in a database following a suggestion of David Nolan in march 2005 ( http://hera.kernel.org/pipermail/mon/2005-March/001109.html ).

It seems the alert script given after the 'redistribute' option CAN'T take any argument because when parsing the @alertdirs to find the executable, the whole line is used instead of only the first word.

Looking how this is done with the regular alert scripts some lines below,  I added a similar line to just use the first word.
I check the last CVS version of mon 1.21 and the fix is still not there.

So, you will find my patch at the end of this mail.

Regards,

Denis Choulette


*** mon.~1.10.~ Mon Nov 15 15:45:16 2004
--- mon Wed May 31 11:19:34 2006
***************
*** 4512,4517 ****
--- 4512,4518 ----
        foreach my $service (keys %{$watch{$group}}) {
              if ($watch{$group}->{$service}->{"redistribute"} ne '') {
                  my $alert = $watch{$group}->{$service}->{"redistribute"};
+               $alert =~ s/^(\S+).*$/$1/;
                  $found = 0;
                  foreach (@alertdirs) {
                    if (-x "$_/$alert") {


_______________________________________________
mon mailing list
[email protected]
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to