Service has no hosts and/or service_description (config file

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
yellowdog
Posts: 20
Joined: Mon Dec 02, 2013 7:22 am

Service has no hosts and/or service_description (config file

Post by yellowdog »

Hello,

I have installed a fresh NAGIOS Core server 4.4.5 and begin to transfer the CFG files from my old FAN distrib.
But I have an error with my templates.cfg
The following message appears when checking the configuration:

Code: Select all

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/objects/templates.cfg', starting on line 622)
The definition is correct and works fine for ages on the FAN. If I remove this define service in the templates.cfg, it generates an error on an other define service and so on.

Code: Select all

define service{
        name                     decisionnel-service
        use                      generic-service
        max_check_attempts       3
        check_interval           3
        notification_interval    240
        retry_interval           1
        contact_groups           Decisionnel
        }
Thanks a lot for your help.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service has no hosts and/or service_description (config

Post by scottwilkerson »

You need to add the following to the definition because it is a template

Code: Select all

register                        0
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
yellowdog
Posts: 20
Joined: Mon Dec 02, 2013 7:22 am

Re: Service has no hosts and/or service_description (config

Post by yellowdog »

Thanks a lot, it's working fine now.
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises
Contact:

Re: Service has no hosts and/or service_description (config

Post by scottwilkerson »

yellowdog wrote:Thanks a lot, it's working fine now.
Great!

Locking thread
Former Nagios employee
Creator:
ahumandesign.com
enneagrams.com
Locked