Page 1 of 1

Error: Service has no hosts and/or service_description

Posted: Fri Apr 11, 2025 3:45 pm
by adamsj
Hi,

So here's an odd one. My boss was trying to apply a configuration to silence some alerts, and he got this error:

Code: Select all

<div>Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/aspace4.net.ualr.edu.cfg', starting on line 108)</div>
What's particularly odd about that is that the file in question is only eighty-four lines long.

I created this entry a couple of days ago, and it looks good to me when I inspect it. What gives?

Thanks,

John A

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

Posted: Sat Apr 12, 2025 10:05 pm
by kg2857
You probably want to look in the cfg file for the things the error message says are missing.

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

Posted: Mon Apr 14, 2025 3:01 pm
by adamsj
Every entry in that file has both a host and a service description--thus my confusion.

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

Posted: Mon Apr 14, 2025 10:25 pm
by kg2857
The error message mentions a line number in the cfg file. What do you see at or around that line?
I'd probably grep the service name, host, and description from the file since I imagine there are many services in the file.