Page 1 of 1

Error in config file

Posted: Fri Oct 21, 2016 10:34 am
by emartine
The error

Read main config file okay...
Error: Could not find a service matching host name 'server1' and description 'SQL Server Agent' (config file '/usr/local/nagios/etc/servicegroups.cfg', starting on line 64)
Error: Service description, host name, or check command is NULL
Error: Could not register service (config file '/usr/local/nagios/etc/services/servx-1-2.cfg', starting on line 16)
Error processing object config files!



I don't see server1 in any service groups through the gui but I do see it in the servicegroup.cfg configuration file.

I was using the host cloning wizard to clone servx-1-1 to servex1-2 whe I saw the error above. Any idea what can be done to resolve this?

Re: Error in config file

Posted: Fri Oct 21, 2016 11:17 am
by avandemore
What is the output of this process?

XI > Configure > Core Config Manager > Config File Management > Delete Files > Write Configs > Verify Files > Restart Nagios Core

Re: Error in config file

Posted: Fri Oct 21, 2016 11:40 am
by emartine
I am running Nagios XI 2014R2.6 The above is the error I get when I do that verification.

Re: Error in config file

Posted: Fri Oct 21, 2016 11:48 am
by dwhitfield
could you post your /usr/local/nagios/etc/servicegroups.cfg and /usr/local/nagios/etc/services/servx-1-2.cfg?

Re: Error in config file

Posted: Fri Oct 21, 2016 12:21 pm
by emartine
I added the missing service to the host and added the service to the service group. Applied the configuration and everything applied fine. Afterwards I removed the service from the service group and removed the service from the host and it applied fine without any errors. This was most likely caused by someone attempting to delete a service from one host and trying to clone it at the same time for another. This issue has been resolved.

Re: Error in config file

Posted: Fri Oct 21, 2016 12:23 pm
by dwhitfield
Glad to hear it is resolved. I am going to lock the thread. Please feel free to post again if you have you another issue. Thank you for using the Nagios forums!