Error: Could not read object configuration data!

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
alan_6k8
Posts: 1
Joined: Sun Mar 13, 2016 7:36 am

Re: Error: Could not read object configuration data!

Post 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.
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error: Could not read object configuration data!

Post by tmcdonald »

Great to hear! Are we all clear to close this thread?
Former Nagios employee
dwall
Posts: 4
Joined: Mon Oct 26, 2015 12:31 pm
Location: Olathe, KS
Contact:

Re: Error: Could not read object configuration data!

Post 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.
Dan Wall
Systems Engineer
tmcdonald
Posts: 9117
Joined: Mon Sep 23, 2013 8:40 am

Re: Error: Could not read object configuration data!

Post by tmcdonald »

Thanks for updating, but I am going to lock this since the issue has been resolved.
Former Nagios employee
Locked