Page 1 of 2

Service has no hosts and/or service_description

Posted: Wed May 29, 2019 1:07 pm
by nagios-apom
Good morning,

We’ve been a long time NagiosXI client and we’ve never had any issues with Nagios not until recent upgrade to version 5.6.2 and I would like to get some assistance.

I've started getting this error:

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/otonoah.oto.domain.local.cfg', starting on line 67)

It's preventing me to make any changes (add/remove) a host or service as it is giving me the mentioned error.

Even if I restore from a last known good config every time after I restore the good configuration and I add/edit something the errors comes up.

If anyone can assist me on this matter I would appreciate it.

Thanks!

Re: Service has no hosts and/or service_description

Posted: Wed May 29, 2019 1:46 pm
by benjaminsmith
Hi @nagios-apom,

It's possible there is an issue writing to the database. However, to start, go to Configure > CCM > Tools > Config File Management and then:

1. Delete Files
2. Write Files
3. Verify Files - Do you see the same error? If not, then Restart Nagios Core.

If there error is still there, search for the service from Configure > CCM > Monitoring > Services and try to correct object ( as directed by the error message) and then apply configuration.

If the error persists, please PM your system profile for us to review.

To send us your system profile.
Login to the Nagios XI GUI using a web browser.
Click the "Admin" > "System Profile" Menu
Click the "Download Profile" button
Save the profile.zip file and share in a private message or upload it to the post/ticket.

Re: Service has no hosts and/or service_description

Posted: Wed May 29, 2019 2:24 pm
by nagios-apom
Thanks for the quick reply @benjaminsmith

I've tried your recommendation but unfortunately I'm still getting the same errors.

I've sent you my System Profile through PM. Thank you for looking into it.

Re: Service has no hosts and/or service_description

Posted: Wed May 29, 2019 4:42 pm
by benjaminsmith
Hi @nagios-apom,

A few things I noticed in the system profile. The database logs contain entries for crashed tables, so let's run the repair script. Log into the Nagios Xi terminal and run the following command as root:

Code: Select all

/usr/local/nagiosxi/scripts/repair_databases.sh
Also, you have a configuration file in the import directory that is failing.
Importing into the CCM failed!
OUTPUT=Importing into the CCM failed!
RETURNCODE=2
Can you remove this file from /usr/local/nagios/etc/import, then go to Configure > CCM > Tools > Config File Management and then:
1. Delete Files
2. Write Files
3. Verify Files - If everything is ok, then Restart Nagios Core.

If you're still not able to apply configuration, please tail the subsystem log while applying configuration and post the output. Thanks.

Code: Select all

tail -F /usr/local/nagiosxi/var/cmdsubsys.log

Re: Service has no hosts and/or service_description

Posted: Sat Jun 01, 2019 8:33 pm
by nagios-apom
@benjaminsmith

That did the trick! I'm able to apply the configuration now and add new hosts/services.

One thing that I've noticed since I've upgraded to the latest version is that if I schedule a downtime for multiple hosts I don't get all the notification alerts even if I have them all selected to send an alert. For instance if I schedule a downtime for 6 hosts, I should get 6 scheduled downtime start alerts but I'm only getting a few email alerts. I used to get them all prior to the upgrade. Can you help on this as well?

Thank you!

Re: Service has no hosts and/or service_description

Posted: Mon Jun 03, 2019 9:37 am
by lmiltchev
We haven't been able to recreate the issue in-house... Can you confirm that you are scheduling a fixed downtime?

If you were scheduling a flexible downtime, it is possible that not all of the servers went down at the same time, so you wouldn't be receiving DOWNSTART notifications for all these hosts.

Re: Service has no hosts and/or service_description

Posted: Mon Jun 03, 2019 10:06 am
by nagios-apom
Yes, I'm scheduling a Fixed downtime.

Last night I've performed server maintenance for 12x hosts and I've scheduled a Fixed downtime. We've only received 8 email DOWNTIMESTART Host alerts instead of 12. These alerts gets sent out to a team so its very crucial to get proper notification. And once the scheduled downtime has ended we've only received 6 email DOWNTIMEEND Host notification alerts.

I never had this issue prior to updating to the latest version.

Re: Service has no hosts and/or service_description

Posted: Mon Jun 03, 2019 1:55 pm
by lmiltchev
Can you PM me your latest profile?

Admin > System Config > System Profile > Download Profile

Let me know what are the servers that were placed in scheduled downtime, and what are the users that were supposed to receive the DOWNTIMESTART and DOWNTIMEEND notifications.

Re: Service has no hosts and/or service_description

Posted: Mon Jun 03, 2019 3:23 pm
by nagios-apom
Profile and info has been sent to your inbox.

Re: Service has no hosts and/or service_description

Posted: Mon Jun 03, 2019 4:00 pm
by lmiltchev
Replied in PM