Error: Service has no hosts and/or service_description

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Post Reply
infra.arte.tef
Posts: 4
Joined: Fri Feb 04, 2022 3:53 am

Error: Service has no hosts and/or service_description

Post by infra.arte.tef »

Hello,

We have migrated our Nagios from On-Premise to Azure, performing a clean install on RedHat 8.10 and then importing our configuration files from the old Nagios. We have Nagios XI 2024R1.3.2 version.
However, we have encountered a problem. When we try to import or even modify/create a new service, we get the following error:

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

We have tried running the restore_nagios and database_repair scripts, as well as using the File Management tab to delete and write the configuration, but the issue persists.

Any suggestions on how to resolve it?

Thank you in advance for your help.
sgardil
Posts: 327
Joined: Wed Aug 09, 2023 9:58 am

Re: Error: Service has no hosts and/or service_description

Post by sgardil »

infra.arte.tef wrote: Thu Jan 30, 2025 5:31 am Hello,

We have migrated our Nagios from On-Premise to Azure, performing a clean install on RedHat 8.10 and then importing our configuration files from the old Nagios. We have Nagios XI 2024R1.3.2 version.
However, we have encountered a problem. When we try to import or even modify/create a new service, we get the following error:

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

We have tried running the restore_nagios and database_repair scripts, as well as using the File Management tab to delete and write the configuration, but the issue persists.

Any suggestions on how to resolve it?

Thank you in advance for your help.
Hey @infra.arte.tef

Could you give us an example of what your config file looks like? The error is suggesting that the service is missing required values. Here is a similar issue that may provide some insight to help fix this issue for you.
infra.arte.tef
Posts: 4
Joined: Fri Feb 04, 2022 3:53 am

Re: Error: Service has no hosts and/or service_description

Post by infra.arte.tef »

Hello,
We have checked that post but the solutions provided did not work for us.
Here you have a cfg imported from our old Nagios (We have censored the command for privacity).
Also, a test.cfg created via Nagios XI Web.

Thank you.
You do not have the required permissions to view the files attached to this post.
sgardil
Posts: 327
Joined: Wed Aug 09, 2023 9:58 am

Re: Error: Service has no hosts and/or service_description

Post by sgardil »

infra.arte.tef wrote: Fri Jan 31, 2025 4:56 am Hello,
We have checked that post but the solutions provided did not work for us.
Here you have a cfg imported from our old Nagios (We have censored the command for privacity).
Also, a test.cfg created via Nagios XI Web.

Thank you.
Thanks for providing the images. Is it safe to assume the old cfg is the first picture with the censored command and the new cfg is the other image? The second image is missing information that it needs like the command and a host or host group associated with it. Can you access the services in question in the gui to be able to add this information? If so that would be the prefered route to access it and add the command and hostgroup back in, if not you may need to manually edit the config file to be similar to the old config and then restart your nagios service.

With the config files being messed up there might be issues with the database on the migration you did. If you are seeing more issues and this doesnt fix the problems it may be best to open up a support case to get more indepth with what the issue was on migration. You can do so here.
infra.arte.tef
Posts: 4
Joined: Fri Feb 04, 2022 3:53 am

Re: Error: Service has no hosts and/or service_description

Post by infra.arte.tef »

Yes, the old cfg is the one censored.
We tried to add the missing information to the "Test" service, but it did not work. Once I apply the configuration, it shows the error as we got with test.cfg.
Otherwise, it failed to import de old cfg, which has no missing information, so if we try to write the test.cfg to be similar to the old one, we got the same issue.
Our support license has ended just 2 weeks ago, so we are not able to open up a case.

Thank you so much for your response.
Post Reply