Problems with config-file, I think.

Marc Powell marc at ena.com
Fri Jul 14 03:56:44 CEST 2006



> -----Original Message-----
> From: nagios-users-bounces at lists.sourceforge.net [mailto:nagios-users-
> bounces at lists.sourceforge.net] On Behalf Of Hugo van der Kooij
> Sent: Thursday, July 13, 2006 3:53 PM
> To: Nagios Users Mailinglist
> Subject: Re: [Nagios-users] Problems with config-file, I think.
> 
> On Thu, 13 Jul 2006, Alexander Davidsen wrote:
> 
> > Hi,
> > I have installed nagios via ports in FreeBSD, and configured it to
work
> > with my network. But when i do nagios -v nagios.cfg i get a kind of
> > wired error: "Error in configuration file
> > '/usr/local/etc/nagios/nagios.cfg' - Line 20 (NULL value)"
> > On line 20 I have:
> > define timeperiod{
> >         timeperiod_name 24x7
> >         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
> >         }
> > If i comment out this I just get the same error on the next section.
> > What can be wrong? I have attached my config file.
> 
> And just what do you have above? Is there an illegal character that
> slipped in there somewhow?

Actually, it's the fact that he appears to have the timeperiod
definition in nagios.cfg itself.

Nagios.cfg is special in that it can only contain directives that
control the overall operation of nagios. You'll need to move any
template definitions such as the timeperiod definition above into a
different file and reference that as a cfg_file within nagios.cfg.

http://nagios.sourceforge.net/docs/2_0/configmain.html

--
Marc


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
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