[Nagios-devel] Line continuations not working as expected

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Guest

[Nagios-devel] Line continuations not working as expected

Post by Guest »

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 post was automatically imported from historical nagios-devel mailing list archives
Original poster: [email protected]
Locked