[Nagios-devel] Leading space in continuation lines

Gerhard Lausser Gerhard.Lausser at consol.de
Sat May 2 11:49:06 UTC 2009


i have a servicedefinition which looks like that:

define service {
   service_description             os_linux_fs_check_ping
   host_name                       nagsrv
   use                             os_linux_default,pnp-preview-popup
   check_command                   \

Now i found out that the leading blanks (the same applies for tabs) are
retained also in the macro $SERVICECHECKCOMMAND$. I write the checkresults
to a spoolfile with

where it comes out as:
....SERVICECHECKCOMMAND::check_nrpe_arg!30!       check_fs_ping....

If you postprocess these data, some tools might be confused by the white
space. (PNP for example, but it has a workaround for this in the upcoming

I attached a patch for base/utils.c(mmap_fgets_multiline) (v3.10) which cuts
off leading white space from continuation lines. Whoever feels responsible
for the Nagios code, he might have a look at it. And maybe give a feedback?
Possibly by the end of this decade? Huhu, anybody at home?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: nagios-3.1.0.stripspacefromcont.patch
Type: application/octet-stream
Size: 963 bytes
Desc: not available
URL: <http://lists.nagios.com/pipermail/nagios-devel/attachments/20090502/bffda199/attachment.obj>

More information about the Nagios-devel mailing list