First time install, big fubar mess

Dan Lang dlang at sevenl.net
Wed Dec 31 02:17:53 CET 2003


Andres L. Figari wrote:
> I would start here:
> 
> Error in object configuration file '/usr/nagios/etc/checkcommands.cfg' -
> 
> Line 51 (Could not parse input
> 
> Are you using a sample config with no existent hosts and services?
> 

I started with sample configs, and changed them for my environment. 
Maybe I didn't explain it well enough before, but line 51 of 
'/usr/nagios/etc/checkcommands.cfg' is the first line of the config that 
is not commented.  For instance line 51 of 
/usr/nagios/etc/checkcommands.cfg is:

define command{
         command_name    check_tcp
         command_line    $USER1$/check_tcp -H $HOSTADDRESS$ -p $ARG1$
         }

and line 50 of /usr/nagios/etc/miscommands.cfg is

define command{
         command_name    notify-by-email
         command_line    /usr/bin/printf "%b" "***** Nagios 
*****\n\nNotification Type: $NOTIFICATIONTYPE$\n\nService: 
$SERVICEDESC$\nHost: $HOSTALIAS$\nAddress: $HOSTADDRESS$\nState: 
$SERVICESTATE$\n\nDate/Time: $DATETIME$\n\nAdditional Info:\n\n$OUTPUT$" 
| /bin/mail -s "** $NOTIFICATIONTYPE$ alert - $HOSTALIAS$/$SERVICEDESC$ 
is $SERVICESTATE$ **" $CONTACTEMAIL$
         }

A note that I forgot to mention last time.  I moved my checkcommands.cfg 
to checkcommands.cfg.bak and copied the example config to 
checkcommands.cfg.  running nagios -v gave the same error.

Thanks,

Dan Lang

> Regards,
>  
> Andres L. Figari
> Systems Administrator
> http://www.hostito.com 
> 
> -----Original Message-----
> From: Dan Lang [mailto:dlang at sevenl.net] 
> Sent: Tuesday, December 30, 2003 5:02 PM
> To: nagios-users at lists.sourceforge.net
> Subject: [Nagios-users] First time install, big fubar mess
> 
> Greetings,
> 
> I've installed a standard nagios setup for my employer, monitoring 
> several servers and services.  Initially, nagios seemed to be working, 
> though not exactly as expected, but now I seemed to have fubar'd
> everything.
> 
> I orginally compiled nagios to use mysql and without the --with-cgiurl 
> or --with-htmlurl flags.  I just wanted to get nagios working before 
> playing with web interface.  After getting nagios to work for the most 
> part, I recompiled with the appropriate flags for using the web 
> interface.  However, nagios can't seem to parse any of the config files
> now.
> 
> Running nagios with -v gives the following errors which seem to suggest 
> nagios is croaking on the first line of the config that is not
> commented.
> 
> Nagios 1.1
> Copyright (c) 1999-2003 Ethan Galstad (nagios at nagios.org)
> Last Modified: 06-02-2003
> License: GPL
> 
> Reading configuration data...
> 
> Error in object configuration file '/usr/nagios/etc/checkcommands.cfg' -
> 
> Line 51 (Could not parse input)
> 
> Error in object configuration file '/usr/nagios/etc/misccommands.cfg' - 
> Line 50 (Could not parse input)
> 
> Error in object configuration file '/usr/nagios/etc/contactgroups.cfg' -
> 
> Line 21 (Could not parse input)
> 
> Error in object configuration file '/usr/nagios/etc/contacts.cfg' - Line
> 
> 21 (Could not parse input)
> 
> Error in object configuration file '/usr/nagios/etc/hostgroups.cfg' - 
> Line 21 (Could not parse input)
> 
> Error in object configuration file '/usr/nagios/etc/hosts.cfg' - Line 21
> 
> (Could not parse input)
> 
> Error in object configuration file '/usr/nagios/etc/services.cfg' - Line
> 
> 21 (Could not parse input)
> 
> Error in object configuration file '/usr/nagios/etc/timeperiods.cfg' - 
> Line 21 (Could not parse input)
> 
> Running pre-flight check on configuration data...
> 
> Checking services...
> Error: There are no services defined!
>          Checked 0 services.
> Checking hosts...
> Error: There are no hosts defined!
>          Checked 0 hosts.
> Checking host groups...
> Error: There are no host groups defined!
>          Checked 0 host groups.
> Checking contacts...
> Error: There are no contacts defined!
>          Checked 0 contacts.
> Checking contact groups...
> Error: There are no contact groups defined!
> 
>          Checked 0 contact groups.
> Checking service escalations...
>          Checked 0 service escalations.
> Checking host group escalations...
>          Checked 0 host group escalations.
> Checking service dependencies...
>          Checked 0 service dependencies.
> Checking host escalations...
>          Checked 0 host escalations.
> Checking host dependencies...
>          Checked 0 host dependencies.
> Checking commands...
>          Checked 0 commands.
> Checking time periods...
>          Checked 0 time periods.
> Checking for circular paths between hosts...
> Checking for circular service execution dependencies...
> Checking global event handlers...
> Checking obsessive compulsive service processor command...
> Checking misc settings...
> 
> Total Warnings: 0
> Total Errors:   5
> 
> What would cause such a problem?  I have not seen such an error in the 
> documentation or through my scanning of the list archives.
> 
> Also, while I compiled nagios to use mysql, it doesn't seem to be 
> writing data to the mysql DB.  I have checked the mysql logs, and there 
> are no errors.  In fact, it doesn't look as if nagios is even trying to 
> connect to mysql at this time.  I set the appropriate variables in the 
> resources.cfg. Is there another config file I need to edit that maybe I 
> missed in the documentation?
> 
> Thanks for any help.  Regards
> 
> Dan Lang
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for
> IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys
> admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> 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
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.net email is sponsored by: IBM Linux Tutorials.
> Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
> Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
> Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
> _______________________________________________
> 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



-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id=1278&alloc_id=3371&op=click
_______________________________________________
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