[PATCH] - 3.0.3 / 3.2.0 - enhanced diagnostic output when a regular expression fails to compile (xodtemplate.c)

Ton Voon ton.voon at opsera.com
Tue Mar 30 09:47:19 CEST 2010


On 29 Mar 2010, at 20:49, Max wrote:

> Hi,
>
> For Nagios 3.0.3 and 3.2.0.
>
> http://github.com/netoisstools/Nagios-3-Patches/blob/master/xodtemplate.c.patch
>
> Patched to provide better diagnostic output when a regular expression
> compile (regcomp()) in xodtemplate.c fails.
>
> Example output post-patch for a file file.cfg with a hostgroup line of
>
> hostgroups +my_correct_additive_group,another_group,+my_host_group
>
> Error: Invalid regular expression '+my_host_group' found while
> expanding host group names in file '/path/to/file.cfg' starting on
> line 23.  NOTE: regex could be inherited from a template in a
> different file.

Hi Max,

This looks useful. Can you provide some sample configurations in t/etc  
and a test script to look for each of those specific error messages  
when this occurs? See CVS HEAD and t/910-service.t as an example.

Ton

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://www.monitoring-lists.org/archive/developers/attachments/20100330/f6d45806/attachment.html>
-------------- next part --------------
------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
-------------- next part --------------
_______________________________________________
Nagios-devel mailing list
Nagios-devel at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-devel


More information about the Developers mailing list