Missing host_name in service.cfg after update

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
Support_Talea
Posts: 73
Joined: Wed Oct 04, 2017 7:12 am

Missing host_name in service.cfg after update

Post by Support_Talea »

Hi support,
i am not able to open topic in customer forum (but we have purchased the license, we have the customer id).
We encounter a problem after nagios upgrade from 5.2.9 to 5.4.9.
Once we modify any service inside the config manager we receive an "apply configuration" error:
Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/myservername.cfg', starting on line 88)

This is the original configuration:

###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.5.2
# Date: 2017-09-06 18:10:29
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
host_name myservername
service_description CPU Usage
use TMP_srv_gen_noH24
check_command check_xi_service_nsclient!!CPULOAD!-l 5,90,95!!!!!
_xiwizard windowsserver_sacmi
register 1
}


after the apply the service cfg result like this, but in the gui the hostname is correctly associated:
###############################################################################
#
# Service configuration file
#
# Created by: Nagios Core Config Manager 2.6.8
# Date: 2017-10-02 17:18:20
# Version: Nagios 3.x config file
#
# --- DO NOT EDIT THIS FILE BY HAND ---
# Nagios CCM will overwrite all manual settings during the next update if you
# would like to edit files manually, place them in the 'static' directory or
# import your configs into the CCM by placing them in the 'import' directory.
#
###############################################################################

define service {
service_description CPU Usage
use TMP_srv_gen_noH24
check_command check_xi_service_nsclient!!CPULOAD!-l 5,90,95!!!!!
_xiwizard windowsserver_sacmi
register 1
}


If we modify host/hostgroup and so.. we do not encounter any error in applyng the config.
Thanks
Support Talea :ugeek:
User avatar
mcapra
Posts: 3739
Joined: Thu May 05, 2016 3:54 pm

Re: Missing host_name in service.cfg after update

Post by mcapra »

Support_Talea wrote: i am not able to open topic in customer forum (but we have purchased the license, we have the customer id).
I would recommend contacting sales (sales at nagios dot com) with either your customer ID number or the last 4 of your product key as well as your forums username. They can get you access to the customer section.

Regarding the problem itself, have you tried the steps mentioned in this article:
https://support.nagios.com/kb/article.php?id=144

Typically a Delete -> Write -> Verify can help solve such inconsistencies.
Former Nagios employee
https://www.mcapra.com/
kyang

Re: Missing host_name in service.cfg after update

Post by kyang »

Thanks @mcapra!

As mcapra said, please contact our sales department and they can give you access to the customer forums.

Let us know if the Delete --> Write --> Verify --> Apply configuration has solved your host_name issue. (This is done in the Core Config Manager)
Locked