Include

Nicolas DECKMYN nidecker at nidecker.net
Tue Jun 3 11:42:42 CEST 2003


There is again the same problem :

    nidecker at cathia:/usr/local/etc/nagios$ more contacts.cfg
    cfg_file=/usr/local/etc/nagios/contacts_nagios.cfg
    nidecker at cathia:/usr/local/etc/nagios$ sudo
    /usr/local/etc/rc.d/nagios.sh restart
    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.



Fredrik Wänglund wrote:

> Add the line
> cfg_file=/usr/local/nagios/etc/contact_temp.cfg
> to nagios.cfg
>
> /FredrikW
>
>
>
> Nicolas DECKMYN wrote:
>
>> 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 !
>>
>
>
>
>
> -------------------------------------------------------
> 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
>
>

-- 
  .:: Nicolas DECKMYN
      nidecker at nidecker.net
      http://www.nidecker.net ::.





-------------------------------------------------------
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