New to Nagios - Need help with nagios.cfg
Hau Phan
hau at udeviant.com
Tue Feb 17 00:37:25 CET 2009
What's the first line in your commands.cfg?
Eric Chatham wrote:
> [root@ ~ bin]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
>
> Nagios 3.0.6
> Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
> Last Modified: 12-01-2008
> License: GPL
>
> Reading configuration data...
>
> Error: Unexpected token or statement in file '/opt/nagios/etc/main/commands.cfg' on line 1.
>
> ***> One or more problems was encountered while processing the config files...
>
> Check your configuration file(s) to ensure that they contain valid
> directives and data defintions. If you are upgrading from a previous
> version of Nagios, you should be aware that some variables/definitions
> may have been removed or modified in this version. Make sure to read
> the HTML documentation regarding the config files, as well as the
> 'Whats New' section to find out what has changed.
>
> Eric Chatham
>
>
> -----Original Message-----
> From: Marc Powell [mailto:marc at ena.com]
> Sent: Monday, February 16, 2009 16:38
> To: Nagios Users
> Subject: Re: [Nagios-users] New to Nagios - Need help with nagios.cfg
>
>
> On Feb 16, 2009, at 2:58 PM, Eric Chatham wrote:
>
>
>> Hello,
>>
>> I'm very new to Nagios. I'm running version Nagios 3.0.6 on CentOS
>> RHEL 5.1. I used the FC6 instructions for my installation. I've
>> successfully installed the program per the Quick-start guide
>> provided on the Website. We presently have another server with an
>> older version of Nagios installed. It's using "cfg_dir=/opt/nagios/
>> etc" as its location for all *.cfg giles.
>>
>> Here's a problem: When I try to create an alternate directory
>> (cfg_dir) in the nagios config file, I keep getting a CONFIG ERROR
>> when I try to restart the service. I would like to use "cfg_dir=/opt/
>> nagios/etc/main" to hold all the config files. Here is a list of
>> that directory right now:
>>
>> [root@ ~ main]# ls -l
>> total 68
>> -rwxrwxr-x 1 nagios nagios 7714 Feb 13 16:55 commands.cfg
>> -rwxrwxr-x 1 nagios nagios 2166 Feb 13 16:52 contacts.cfg
>> -rwxrwxr-x 1 nagios nagios 240 Feb 13 14:28 hostgroups.cfg
>> -rwxrwxr-x 1 nagios nagios 163 Feb 13 16:51 hosts.cfg
>> -rwxrwxr-x 1 nagios nagios 2414 Feb 13 16:39 services.cfg
>> -rwxrwxr-x 1 nagios nagios 10812 Feb 13 16:41 templates.cfg
>> -rwxrwxr-x 1 nagios nagios 3209 Feb 13 16:55 timeperiods.cfg
>> [root@ ~ main]# service nagios restart
>> Running configuration check... CONFIG ERROR! Restart aborted.
>> Check your Nagios configuration.
>>
>
> Seems like one of the config files probably has an error in it. Run '/
> path/to/nagios -v /path/to/nagios.cfg'.
>
> --
> Marc
>
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> 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
>
> CONFIDENTIAL. This e-mail and any attached files are confidential and should be destroyed and/or returned if you are not the intended and proper recipient.
>
> ------------------------------------------------------------------------------
> Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
> -OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
> -Strategies to boost innovation and cut costs with open source participation
> -Receive a $600 discount off the registration fee with the source code: SFAD
> http://p.sf.net/sfu/XcvMzF8H
> _______________________________________________
> 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
>
>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
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