LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
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, 10: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, 06:50 PM   #2
chrism01
LQ Guru
 
Registered: Aug 2004
Location: Sydney
Distribution: Centos 6.8, Centos 5.10
Posts: 17,241

Rep: Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325Reputation: 2325
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, 11: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 02:57 PM
what do selinux can't apply partial context to unlabeled file /usr/local/nagios/sbin/ parthipan Linux - Server 1 06-07-2012 02:36 PM
what do selinux can't apply partial context to unlabeled file /usr/local/nagios/sbin/ parthipan Linux - Server 3 06-07-2012 08:15 AM
/usr/bin/lesspipe: line 223: syntax error: unexpected end of file fakie_flip Linux - Software 1 09-06-2006 03:22 AM
Question reguarding /usr/loca/bin and 'linking' Cecil Linux - Software 6 06-25-2003 03:15 AM


All times are GMT -5. The time now is 01:24 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration