LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 12-12-2012, 09:43 AM   #1
loreley
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Rep: Reputation: Disabled
Nagios Core 3.4.1 on Debian: Unexpected start of object definition in file '/usr/loca


Hi,

When I try to restart Nagios, I get this error message:

Unexpected start of object definition in file '/usr/local/nagios/etc/objects/localhost.cfg' on line 61 Make sure you close preceding objects before starting a new one.Error processing object config files!

Here's how my localhost.cfg file is configured:

# Define an optional hostgroup for Linux machines

define hostgroup{
hostgroup_name linux-servers ; The name of the hostgroup
alias Linux Servers ; Long name of the group
members localhost ; backup.abc.com, master.abc.com
}
I can't find anything wrong when I check line 61: define hostgroup{

Thanks for your help!
 
Old 12-12-2012, 05:50 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Rocky 9.2
Posts: 18,359

Rep: Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751Reputation: 2751
Check the whole of that file for stray characters.
You may need a space before the '{' for the parser to work thus 'define hostgroup {'.
Do ensure that the file has not been edited on MSWin and txfrd; use 'dos2unix' to fix the line-endings issue.
http://linux.die.net/man/1/dos2unix
 
Old 12-13-2012, 10:07 AM   #3
loreley
LQ Newbie
 
Registered: Dec 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi Chris,

Thanks for your answer. I modified the line 61 adding spaces etc...I actually tried different things but the same error message remains: Error: Unexpected start of object definition in file '/usr/local/nagios/etc/objects/localhost.cfg' on line 61. Make sure you close preceding objects before starting a new one.
Error processing object config files!

I know that the file has not been edited on MSWin or txfrd. I'm using Debian Squeeze 6.0.6 by the way.

Thanks!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
ould not create external command file '/usr/local/nagios/var/rw/nagios.cmd gerard.zapata Linux - Newbie 2 09-14-2012 01:57 PM
what do selinux can't apply partial context to unlabeled file /usr/local/nagios/sbin/ parthipan Linux - Server 1 06-07-2012 01:36 PM
what do selinux can't apply partial context to unlabeled file /usr/local/nagios/sbin/ parthipan Linux - Server 3 06-07-2012 07:15 AM
/usr/bin/lesspipe: line 223: syntax error: unexpected end of file fakie_flip Linux - Software 1 09-06-2006 02:22 AM
Question reguarding /usr/loca/bin and 'linking' Cecil Linux - Software 6 06-25-2003 02:15 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration