Configuration error with no explanation

John Simpson jms1 at jms1.net
Sat Jan 29 02:13:23 CET 2011


(Sorry for top-posting, the iPad knows no better...)

After some more detailed debugging, including using strace, and then re-compiling nagios with "-ggdb" and stepping through the code in gdb, I found two bugs.

One was in my perl script which generates the config files, it had generated a "define host" block containing a "hostgroups" line with no group names listed. I've fixed the bug in my script, and nagios is now runnng correctly on this node.

The other bug is in nagios itself. It detected the invalid config file and correctly failed the validation check, however I consider it a bug that it didn't identify what or where the problem was.

In nagios-3.2.1, xdata/xodtemplate.c line 9050 has a check which fails if a "define host" block contains a "hostgroups" line with no group names. I'm not sure if this is the right place in the code to emit an error message, but there does need to be an error message.

--
Sent from my iPad

On Jan 28, 2011, at 11:27, Mark Elsen <mark.elsen at gmail.com> wrote:

> On Fri, Jan 28, 2011 at 4:44 PM,  <jms1 at jms1.net> wrote:
>> Greetings.
>> 
>> I'm working on a distributed nagios system, with two "master" servers
>> running the web interface to view status, and several dozen "slave"
>> servers running the actual tests. So far it's working pretty well, but
>> I've run into a very strange situation with one of the slave servers,
>> where the syntax check is failing, but not telling me what the problem is.
>> 
>> 
>> # /usr/sbin/nagios -v /etc/nagios/nagios.cfg
>> 
>> ...
> 
> - You did not provide OS details; check for file protection issue(s)
> , disk quota and those low level issues.
> Check your system logs too, for nagios process error(s).
> 
> More advanced ; using strace on the nagios command to track system
> calls, will probably give more info.
> 
> M.
> 
> ------------------------------------------------------------------------------
> Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
> Finally, a world-class log management solution at an even better price-free!
> Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
> February 28th, so secure your free ArcSight Logger TODAY! 
> http://p.sf.net/sfu/arcsight-sfd2d
> _______________________________________________
> Nagios-users mailing list
> Nagios-users at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/nagios-users
> ::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
> ::: Messages without supporting info will risk being sent to /dev/null

------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires 
February 28th, so secure your free ArcSight Logger TODAY! 
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list