Page 2 of 2

Re: Error: Could not read object configuration data!

Posted: Sun Mar 13, 2016 7:41 am
by alan_6k8
Hi,
many thanks for this post. My environment is CentOS 7, Apache 2.4.6, Nagios Core 4.1.1.
nagios:x:1000:nagios,apache
nagcmd:x:1001:nagios,apache

Fixed it for me, I was missing nagios,apache part on the first line.

Re: Error: Could not read object configuration data!

Posted: Mon Mar 14, 2016 9:52 am
by tmcdonald
Great to hear! Are we all clear to close this thread?

Re: Error: Could not read object configuration data!

Posted: Fri Mar 24, 2017 9:38 am
by dwall
I started playing with servicegroups.cfg file.
I wanted to create service groups for each windows disk. In the configuration I used:

define servicegroup {
servicegroup_name sg-c
alias C:\
}

But when I ran the check, it error out:
Read main config file okay...
Error: Unexpected start of object definition in file '/usr/local/nagios/etc/objects/servicegroups.cfg' on line 11. Make sure you close preceding objects before starting a new one.
Error processing object config files!

So I changed it to:

define servicegroup {
servicegroup_name sg-c
alias C:\\
}

So I get:

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

But the Nagios wouldn't display on the web pages. I decided to change the service groups to:

define servicegroup {
servicegroup_name sg-c
alias C Drive
}

Everything is FAT, DUMB, & HAPPY now.

Re: Error: Could not read object configuration data!

Posted: Fri Mar 24, 2017 9:48 am
by tmcdonald
Thanks for updating, but I am going to lock this since the issue has been resolved.