Xymon Mailing List Archive search

[BUG] hobbitd_alert fails to execute script on large message

2 messages in this thread

list Charles Goyard · Mon, 17 Dec 2007 16:43:51 +0100 ·
Hi,

I encounter a serious problem when using the following rule in hobbit-alerts.cfg :

EXSERVICE=_site
        SCRIPT=/usr2/hobbitlocal/bin/send_to foobar FORMAT=text RECOVERED REPEAT=6m

when BBALPHAMSG is large (ie a "procs" or "ports" on a very busy box),
the log says : 

2007-12-17 16:31:01 Could not launch paging script /usr2/hobbitlocal/bin/send_to: Argument list too long

The problem is with execlp in do_alert.c.

I could use a different format (sms) for columns such as ports/procs and other
verbose ones, but it's not foolproof. (in the meantime, I'll do this
anyway).

Maybe a safer approach would be to add a SIZELIMIT=xxx in
hobbit-alerts.cfg or automatically
crop the BBALPHAMSG depending on the local OS prior to execlp().


Regards,

-- 
Charles Goyard - user-a6cdca7046e2@xymon.invalid - (+33) 1 45 38 01 31
Orange Business Services - online multimedia  // ingénierie
list Henrik Størner · Wed, 2 Jan 2008 15:17:52 +0100 ·
quoted from Charles Goyard
On Mon, Dec 17, 2007 at 04:43:51PM +0100, Charles Goyard wrote:
Hi,

I encounter a serious problem when using the following rule in hobbit-alerts.cfg :

EXSERVICE=_site
        SCRIPT=/usr2/hobbitlocal/bin/send_to foobar FORMAT=text RECOVERED REPEAT=6m

when BBALPHAMSG is large (ie a "procs" or "ports" on a very busy box),
the log says : 

2007-12-17 16:31:01 Could not launch paging script /usr2/hobbitlocal/bin/send_to: Argument list too long
The attached patch can be used to solve this, it puts an upper limit on
the size of the status message passed through the BBALPHAMSG environment
variable. The limit is defined at compile-time through a setting in the
top-level Makefile.

I think this will apply on top of 4.2.0 as well.


Henrik
Attachments (1)