Page 1 of 1

Re: [Nagios-devel] convertcfg and newtemplatedefiions

Posted: Tue Nov 27, 2001 3:47 pm
by Guest
Hi paul,
I don't think is the same,leaving the main config file as it is, I changed
only inside host definition, just the definition of the 24x7 timeperiod (the
beginning of host.cfg follows):
# '24x7' timeperiod definition
define timeperiod{
name 24x7; The 'name' of this timperiod definition - can be used for template
recursion/resolution
timeperiod_name 24x7 ; The name of this timperiod, as used/recognized
byNagios alias 24 Hours A Day, 7 Days A Week
sunday 00:00-24:00
monday 00:00-24:00
tuesday 00:00-24:00
wednesday 00:00-24:00
thursday 00:00-24:00
friday 00:00-24:00
saturday 00:00-24:00
}
#timeperiod[24x7]=24 Hours A Day, 7 Days
#A Week;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00:00-24:00;00
#:00-24:00;00:00-24:00

As you suggested I changed tab chars to single space.

Nagios 1.0a0
Copyright (c) 1999-2001 Ethan Galstad (nagios@nagios.org)
Last Modified: 10-31-2001
License: GPL

Reading configuration data...

Error in host configuration file '/usr/local/nagios/etc/hosts.cfg' - Line 2
(Could not parse input)

first line is right !!! And is a different error from yours

Massimiliano.



paul_pot@nl.sonymusic.com wrote:

> Hi Massimiliano,
>
> I've had similar problem with the config files. This could be caused by a
> between the define and spaces after the '{'
>
> My messages were like 'illegal character on line '
>
> Might be the same case ?
>
> hth
> regards
> paul
> *speaking for himself
>
> I started to convert old config files, and rebuilding in the new
> template definition style
> but I was surprised that every line begging with
> define command{
> define timeperiod{
> define host{
> and so ... generates the following
>
> Error ..... ..... .... (Could not parse input)
>
> (dots stays for config file and line number containing define directive)
>
> Is template based system described and still not working in this
> release or do I miss something in the configuration/building of nagios ?

Massimiliano Balsamo
CSA
www.securegroup.it






This post was automatically imported from historical nagios-devel mailing list archives
Original poster: massimiliano.balsamo@securegroup.it