Masking Line Breaks in Nagios Config Files

Ralph.Grothe at itdz-berlin.de Ralph.Grothe at itdz-berlin.de
Mon Jul 25 11:10:49 CEST 2005


Sorry Folks, for bothering you with such a daft question here.
But I cannot find any remarks about line breaks in config files
within Nagios docs, nor in the files' comments.


I run pre-flight check:


[nagios at daisy:~]
$ bin/nagios -v etc/nagios.cfg

Nagios 2.0b3
Copyright (c) 1999-2005 Ethan Galstad (www.nagios.org)
Last Modified: 04-03-2005
License: GPL

Reading configuration data...

Error: Invalid command object directive '-c'.
Error: Could not add object property in file
'/opt/sw/nagios/etc/checkcommands.cfg' on line 173.

***> One or more problems was encountered while processing the
config files...

     Check your configuration file(s) to ensure that they contain
valid
     directives and data defintions.  If you are upgrading from a
previous
     version of Nagios, you should be aware that some
variables/definitions
     may have been removed or modified in this version.  Make
sure to read
     the HTML documentation regarding the config files, as well
as the
     'Whats New' section to find out what has changed.



This is the surrounding of the offending line:


[nagios at daisy:~]
$ cat -n etc/checkcommands.cfg|sed -n 170,175p
   170  define command{
   171          command_name    check-host-alive
   172          command_line    $USER1$/check_ping -H
$HOSTADDRESS$ -w 3000.0,80% \
   173                                             -c 5000.0,100%
-p 1
   174  }
   175



I know this is only cosmetic since I could well join the broken
lines.
But this degrades readibilty I think.
If I ommit the line feed quoting backslash altogether nagios
still "thinks" that -c... was meant as a new statement.



While I am at it.
Do I have to restart nagios (or rather send it a SIGHUP) each
time I append entries to my config files,
or will it scan the new stuff prior to a new check execution?



--
Ralph Grothe (GBII1Gr)
IT Dienstleistungszentrum Berlin 
Berliner Strasse 112-115
D-10713 Berlin
Phone:   +49 30 9012 6481
Fax:     +49 30 9012 3151


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
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