Hello Nagios!
I am currently unable to apply any new configurations to our Nagios-xi instance. I am repeatedly getting the same error, no matter the change I try to make. The changes I am trying to make have nothing to do with the services associated with the file hwmaint54.cfg.
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/hwmaint54.cfg', starting on line 173)
When I vi /usr/local/nagios/etc/services/hwmaint54.cfg every service appears to be correctly configured.
We are running NagiosXI 5.2.9 with the Database offloaded to a separate machine.
I have tried the following.
Rolling back to a listed previous good configuration. I get the same error when I apply the supposedly previous good configuration.
restarting the nagios engine
stopping the engine>stopping the database>starting the database>starting the engine
running the /usr/local/nagiosxi/scripts/repairmysql.sh script
Please help me figure this out as we cannot remove or add checks currently.
Thank you
Error: Service has no hosts and/or service_description (conf
Re: Error: Service has no hosts and/or service_description (
Just a suggestion. I'd try moving the /usr/local/nagios/etc/services/hwmaint54.cfg
out of the way (like in /tmp) and apply the config and see if a new one gets built.
If that doesn't help, I'd try deleting the services and host completely and apply the config.
If that works, then re-add the host and services using the gui.
out of the way (like in /tmp) and apply the config and see if a new one gets built.
If that doesn't help, I'd try deleting the services and host completely and apply the config.
If that works, then re-add the host and services using the gui.
Re: Error: Service has no hosts and/or service_description (
Thanks @jwelch! This is a good step if the corruption is possibly in the database. The 'Write Config Files' tool in the CCM does essentially, this when you run a delete -> write -> verify.
Could you post /usr/local/nagios/etc/services/hwmaint54.cfg for us to look at?
Another thing I've seen in the past, is when the time betwee the XI machine and offloaded DB do not match up. Could you run this on both machines and verify the time is lining up between system / php / mysql? (some will fail which is fine, we will need to see the time SQL is running though)
Could you post /usr/local/nagios/etc/services/hwmaint54.cfg for us to look at?
If previous changes were incorrect, Nagios will still try to validate them.The changes I am trying to make have nothing to do with the services associated with the file hwmaint54.cfg.
Another thing I've seen in the past, is when the time betwee the XI machine and offloaded DB do not match up. Could you run this on both machines and verify the time is lining up between system / php / mysql? (some will fail which is fine, we will need to see the time SQL is running though)
Code: Select all
grep "date.timezone" /etc/php.ini
ls -l /etc/localtime
php -r 'echo date("D M j G:i:s T Y")."\n";'
date
mysql -unagiosxi -pn@gweb -e "SELECT NOW();"
Former Nagios Employee
Re: Error: Service has no hosts and/or service_description (
Thanks for all the help.
I ended up having to delete all the services and host and recreating them to get it to work in the end.
I ended up having to delete all the services and host and recreating them to get it to work in the end.
-
dwhitfield
- Former Nagios Staff
- Posts: 4583
- Joined: Wed Sep 21, 2016 10:29 am
- Location: NoLo, Minneapolis, MN
- Contact:
Re: Error: Service has no hosts and/or service_description (
It sounds like this issue has been resolved. Is it okay if we lock this thread? Thanks for choosing the Nagios forums!