Line continuations not working as expected
Matthew Richardson
matthew-ln at itconsult.co.uk
Mon Dec 31 18:06:39 CET 2007
I have just tried the config:-
|define host{
| use template-host-generic,connectivity
| host_name connectivity_test1
| alias connectivity_test1
| check_interval 1
| check_command check_cluster_test1!\
|$SERVICESTATEID:connectivity_test1:ping1$,\
|$SERVICESTATEID:connectivity_test1:ping2$,\
|$SERVICESTATEID:connectivity_test1:ping3$\
|!1
| address nohost.itconsult.net
| }
in order to assemble a very long check command in a readable way (the real
one will be much longer than the test!).
However it fails thus:-
|Nagios 3.0rc1
|Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
|Last Modified: 12-17-2007
|License: GPL
|
|Reading configuration data...
|
|Error: Invalid host object directive '$SERVICESTATEID:connectivity_test1:ping1$,\'.
|Error: Could not add object property in file '/etc/nagios/connectivity/test1.cfg' on line 16.
|
|***> One or more problems was encountered while processing the config files...
Am I doing something stupid, or is this a bug with the new line
continuation feature?
The config works fine with the command in one long line...
Best wishes,
Matthew
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
More information about the Developers
mailing list