We've moved to a new support system!

The Nagios Answer Hub is a place where you can get help with technical questions from our experts. There, you can quickly open tickets and join discussion boards.

Request Nagios Answer Hub access here: https://info.nagios.com/answer-hub-access-new-users

After completing the access form, you will be given access to a portal where new tickets can be created. We will keep the old customer forum sections and ticket system available for current cases to be resolved.

Go to the Answer Hub

Service has no hosts and/or service_description (config file

Engage with the community of users including those using the open source solutions.
Includes Nagios Core, Plugins, and NCPA

Service has no hosts and/or service_description (config file

Postby yellowdog » Wed Feb 19, 2020 11:59 am

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.
yellowdog
 
Posts: 20
Joined: Mon Dec 02, 2013 7:22 am

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

Postby scottwilkerson » Wed Feb 19, 2020 12:04 pm

You need to add the following to the definition because it is a template
Code: Select all
register                        0
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
scottwilkerson
DevOps Engineer
 
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

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

Postby yellowdog » Thu Feb 20, 2020 3:09 am

Thanks a lot, it's working fine now.
yellowdog
 
Posts: 20
Joined: Mon Dec 02, 2013 7:22 am

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

Postby scottwilkerson » Thu Feb 20, 2020 7:58 am

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

Great!

Locking thread
As of May 25th, 2018, all communications with Nagios Enterprises and its employees are covered under our new Privacy Policy.
scottwilkerson
DevOps Engineer
 
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises


Return to Community Support

Who is online

Users browsing this forum: No registered users and 22 guests