help with debugging
Hi everyone, I posted this question a coule of months ago, but I have heard
anything. I assume many people were busy with the holidays.
I have a server running Nagios (nagios.org) that monitors some systems
where I work. When something goes wrong, it sends an email to us. It
does this using the commandline, Essentailly, it runs '/usr/bin/printf
"%b" "Service: $SERVICEDESC$\nHost: $HOSTNAME$\n" | mail $EMAILADDRESS'.
I would like to do the same thing except use Centericq. I have it setup
such that, instead of 'mail $EMAILADDRESS', I now say 'centericq -s msg
-p msn -t mr at bro.wn'. But this isn't working. From some testing, I get
the following from stderr:
terminate called after throwing an instance of 'std::logic_error'
what(): basic_string::_S_construct NULL not valid
I tried to look this up. From what I can tell, it's an exception thrown
by GNU's libstdc++. It means that a string object is constructed but not
initialized. I can't tell where in the source of Centericq this would
be. I have tried putting printf's in the source, but none of them show
up, including a printf I put in as the first statement after int main().
http://www.codecomments.com/printthread.php?threadid=411712
http://code.box.sk/forum.php?did=edge772&thread=12383
I have an assumption that, because Nagios runs with no tty, this may be
part of the problem. I can only replicate this problem by having Nagios
run it. Is there a way that I can debug Centericq, non-interactively,
by, I don't know, dumping a stack trace somewhere? I assume I would have
to recompile Centericq with extra debug flags. Are there other ways I
(Continue reading)