Problem with applying configuration

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
BrianJones
Posts: 5
Joined: Tue Jul 01, 2014 10:05 am

Problem with applying configuration

Post by BrianJones »

Hello, after upgrade from Nagios 2012R2.9 to 2014R2.0 I have issues with applying configuration.

This is the error that I get:

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/P0-FR-CORE-1 UAID:10116.cfg', starting on line 85)

from that config, this is service staring from line 85

define service {
service_description Memory usage
check_command check_nrpe!check_mem!-a '-C -w 15 -c 5' !!!!!!
first_notification_delay 0
notification_options w,u,r,c,f,s

notifications_enabled 1
register 1 }

Here is the system info:


System:

Nagios XI Version : 2014R2.0
AL-NAGIOSXI 2.6.18-371.9.1.el5 i686
CentOS release 5.10 (Final)
Gnome is not installed
Apache Information

PHP Version: 5.1.6
Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/38.0.2125.104 Safari/537.36
Server Name: 10.116.30.200
Server Address: 10.116.30.200
Server Port: 80
Date/Time

PHP Timezone: Europe/NonDisc
PHP Time: Tue, 18 Nov 2014 15:03:04 +0100
System Time: Tue, 18 Nov 2014 15:03:04 +0100
Nagios XI Data

License ends in: PQSTRM

No lock file found in /usr/local/nagios/var/nagios.lock
NPCD running (pid 3691).
ndo2db (pid 3682) is running...
CPU Load 15: 0.42
Total Hosts: 466
Total Services: 4435
Function 'get_base_uri' returns: http://89.164.98.200/nagiosxi/
Function 'get_base_url' returns: http://89.164.98.200/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://89.164.98.200/nagiosxi/includes/ ... rofile.php
Function 'get_backend_url(internal_call=true)' returns: http://localhost/nagiosxi/backend/
Ping Test localhost

Running:
/bin/ping -c 3 localhost 2>&1
PING localhost.localdomain (127.0.0.1) 56(84) bytes of data.
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=1 ttl=64 time=0.024 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.028 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.030 ms

--- localhost.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.024/0.027/0.030/0.005 ms
Test wget To localhost

WGET From URL: http://localhost/nagiosxi/includes/components/ccm/
Running:
/usr/bin/wget http://localhost/nagiosxi/includes/components/ccm/
--2014-11-18 15:03:06-- http://localhost/nagiosxi/includes/components/ccm/
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: `/usr/local/nagiosxi/tmp/ccm_index.tmp'

0K ........ 428K=0.02s

2014-11-18 15:03:07 (428 KB/s) - `/usr/local/nagiosxi/tmp/ccm_index.tmp' saved [8604]
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Problem with applying configuration

Post by slansing »

Error: Service has no hosts and/or service_description (config file '/usr/local/nagios/etc/services/P0-FR-CORE-1 UAID:10116.cfg', starting on line 85)
define service {
service_description Memory usage
check_command check_nrpe!check_mem!-a '-C -w 15 -c 5' !!!!!!
first_notification_delay 0
notification_options w,u,r,c,f,s

notifications_enabled 1
register 1 }
I don't see a host assigned, or for that matter, a template that could have a host in it. You need to assign a host to your service as the error notes, through the CCM.
BrianJones
Posts: 5
Joined: Tue Jul 01, 2014 10:05 am

Re: Problem with applying configuration

Post by BrianJones »

Problem is that this is not working AFTER restart, was working before.

When I even remove that host and service, I still got error for another host:

Error: Could not find any host matching 'F-IB-MAIN - IsActive' (config file '/usr/local/nagios/etc/services/F-IB-MAIN - IsActive.cfg', starting on line 14)
Error: Failed to expand host list 'F-IB-MAIN - IsActive' for service 'MSSQL Query - IsActive Databases Query' (/usr/local/nagios/etc/services/F-IB-MAIN - IsActive.cfg:14)
Error processing object config files!
User avatar
lmiltchev
Bugs find me
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Problem with applying configuration

Post by lmiltchev »

If you haven't be able to finish the upgrade successfully, because of config errors you will need to run the Write Config Tool, identify the errors and fix them in the CCM as described here:

http://support.nagios.com/wiki/index.ph ... 14_Upgrade

Tip: An easy "workaround" would be do deactivate offending configs temporarily, until you finish the upgrade successfully. Also, make sure that you don't have any "ghost" hosts/services.

In case you were able to complete the upgrade, you won't need to run the upgrade script again - just fix the errors in the CCM.

If you don't see any more config errors, while running the Write Config Tool, you can apply configuration.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked