[Nagios-users] Bug in 3.0.2 with service escalation contact groups
Mathieu Gagné
mgagne at iweb.com
Wed May 28 00:18:49 CEST 2008
Hi,
Andy Shellam wrote:
>
> Good point.
>
> From my amateur experience with C, I know the "," will split the string
> "contactgroup1, contactgroup2" into "contactgroup1" and " contactgroup2"
> (note the space.)
Yes. That's what I thought. :-/
> Whether Nagios would then realise that " contactgroup2" and
> "contactgroup2" should be the same thing, I'm not sure.
strip() is called after the parsing of hostescalation's contactgroups
but not after the parsing of:
- hostescalation's contacts
- serviceescalation's contactsgroups
- serviceescalation's contacts.
- And some other places where comma separated values are authorized like
*_commands. Note however that *_options, *_coords and timeranges should
not need call to strip().
/* strip newline, carriage return, and tab characters from beginning and
end of a string */
void strip(char *buffer)
So the example I gave you before would only work for hostescalation's
contactgroups but not anywhere else.
A cleanup should be done by removing the white-space delimiter and
adding strip() calls where necessary.
--
Mathieu Gagné
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
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