Include
Michael Hüttig
Michael.Huettig at Medien-Systempartner.de
Tue Jun 3 10:54:44 CEST 2003
Am Dienstag, 3. Juni 2003 10:13 schrieb Nicolas DECKMYN:
> Hi
>
> I wanted to know if it's possible to link a configuration file (ex:
> contacts.cfg) with another one : like in C language with the #include
> contacts2.cfg.
>
> So i want to have two files like this (for example) :
>
> *contact.cfg
> **********
>
> include "contact_temp.cfg"
>
>
>
> *contact_temp.cfg
> ***************
>
>
> ###########################################################################
>##### # CONTACT DEFINITIONS
> #
> # SYNTAX:
> #
>
> ###########################################################################
>#####
>
> # 'supervision' contact definition
> ...
>
> But when i do the things like this and i start nagios, the nagios erros
> configs checker return :
>
> Running configuration check...
> Nagios 1.0
> Copyright (c) 1999-2002 Ethan Galstad (nagios at nagios.org)
> Last Modified: 11-24-2002
> License: GPL
>
> Reading configuration data...
>
> Error: Unexpected token or statement in file
> '/usr/local/etc/nagios/contacts.cfg' on line 1.
>
> So ... Is there a syntax for include ??
>
> Thanks !
Yes and No,
look at your nagios.cfg and use directive
cfg-dir=/usr/local/nagios/etc/<path/to/include-config>
this would include any CFGs which represent your includings and follows the
cfg-syntax.
--
Regards
Michael
**********************************************************************
Diese E-Mail wurde auf Viren ueberprueft.
www.mimesweeper.com
**********************************************************************
-------------------------------------------------------
This SF.net email is sponsored by: eBay
Get office equipment for less on eBay!
http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5
_______________________________________________
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