does anybody have a solution for the following error once attempting to generate nagios config after adding a host?
Full error:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL
Website: https://www.nagios.org
Reading configuration data...
Read main config file okay...
Error: Service has no hosts and/or service_description (config file '/var/www/html/nconf/temp/Default_collector/advanced_services.cfg', starting on line 78)
Error processing object config files!
***> The name of the main configuration file looks suspicious...
Make sure you are specifying the name of the MAIN configuration file on
the command line and not the name of another configuration file. The
main configuration file is typically '/usr/local/nagios/etc/nagios.cfg'
***> One or more problems was encountered while processing the config files...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
Any help would be much appreciated, I have recently got rid of the hosts which are first put on there as a starter. (i.e. the test printer)
Generate Nagios Config Error - Service has no hosts...
Re: Generate Nagios Config Error - Service has no hosts...
While we can't really assist with nconf, the error is indicating that in the /var/www/html/nconf/temp/Default_collector/advanced_services.cfg file you have a service that is not attached to an existing host, or that the service is lacking a service_description field. It could be either, you'll need to check it out or post the file here, but if you are using nconf you'll likely need to make the changes through that.
Former Nagios employee
Re: Generate Nagios Config Error - Service has no hosts...
thanks tmcdonald.
Noticed last thing after I had posted that putting in a test host, assigning all services to it made this work again.
Noticed last thing after I had posted that putting in a test host, assigning all services to it made this work again.
Re: Generate Nagios Config Error - Service has no hosts...
Great to hear it!
Mind if we mark this thread as resolved and close it up?
Mind if we mark this thread as resolved and close it up?
Former Nagios employee
Re: Generate Nagios Config Error - Service has no hosts...
Absolutely! - Thanks.