On Sun, 6 Feb 2011, gulikoza wrote:

I'm new at setting mon and I have a question regarding UPALERT content.
UPALERTs seem to include MON_LAST_OUTPUT instead of current monitor output.
This seems very confusing to me. I am currently only working with (my
modified) DRBD monitor so I don?t know how other monitors handle that.
Please excuse me if there is some really important reason why UPALERT should
contain last error which apparently I?ve missed, but having mon send me
current output seems to make a lot more sense :). Instead of:

[... lots of newlines]


Above output was achieved applying the following patch:


- do_alert ($group, $service, $sref->{"_upalertoutput"}, 0,
$FL_UPALERT);
+ do_alert ($group, $service, $output, 0, $FL_UPALERT);


sure, that's acceptable, as long as the alert script knows what to expect.

the idea for sending the previous output to the upalert script is so
you can easily send an alert that shows what error condition was fixed.

i guess another way to do it is to send both the previous and the current
output to the alert script and let it decide what to do, or to provide
a way to configure which to send to the alert.

_______________________________________________
mon mailing list
mon@linux.kernel.org
http://linux.kernel.org/mailman/listinfo/mon

Reply via email to