Page 1 of 1

Configuration error during 2014R1.0 upgrade

Posted: Fri May 16, 2014 6:14 am
by mrochelle

Code: Select all

Nagios XI Installation Profile
Download Profile System:
Nagios XI Version : 2014R1.0
nagprod11.cellnet.local 2.6.32-279.11.1.el6.x86_64 x86_64
CentOS release 6.3 (Final)
Gnome is not installed

Apache Information
PHP Version: 5.3.3
Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; GTB7.5; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; McAfee; InfoPath.3)
Server Name: 148.80.x.x
Server Address: 148.80.x.x
Server Port: 80

Date/Time
PHP Timezone: America/Chicago 
PHP Time: Fri, 16 May 2014 06:04:34 -0500
System Time: Fri, 16 May 2014 06:04:34 -0500

Nagios XI Data
License ends in: NSMOSV

nagios (pid 28303) is running...
NPCD running (pid 2226).
ndo2db (pid 28263) is running...
CPU Load 15: 1.47 
Total Hosts: 11343 
Total Services: 1 
Function 'get_base_uri' returns: http://148.80.x.x/nagiosxi/
Function 'get_base_url' returns: http://148.80.x.x/nagiosxi/
Function 'get_backend_url(internal_call=false)' returns: http://148.80.x.x/nagiosxi/includes/components/profile/profile.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.021 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=2 ttl=64 time=0.045 ms
64 bytes from localhost.localdomain (127.0.0.1): icmp_seq=3 ttl=64 time=0.042 ms

--- localhost.localdomain ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2000ms
rtt min/avg/max/mdev = 0.021/0.036/0.045/0.010 ms

Test wget To locahost
WGET From URL: http://localhost/nagiosql/index.php 
Running: 
/usr/bin/wget http://localhost/nagiosql/index.php --2014-05-16 06:04:36-- http://localhost/nagiosql/index.php
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: "/usr/local/nagiosxi/tmp/nagiosql_index.tmp"

0K ..... 100% 466M=0s

2014-05-16 06:04:36 (466 MB/s) - "/usr/local/nagiosxi/tmp/nagiosql_index.tmp" saved [5259/5259]
____________________________________________

Prior to the upgrade I've made sure the hosts and services can be viewed.
After the error, following is the etc directory:

Code: Select all

-rwxrwxr-x 1 apache nagios    210 Jun  6  2012 resource.cfg
-rw-rw-r-- 1 apache nagios   2229 Jun  6  2012 ndo2db.cfg
-rw-rw-r-- 1 apache nagios   1627 Jun  6  2012 send_nsca.cfg
-rw-rw-r-- 1 apache nagios   5345 Jun  6  2012 nsca.cfg
-rw-rw-r-- 1 apache nagios   7207 Aug 22  2012 nrpe.cfg
-rw-rw-r-- 1 apache nagios   4729 Feb 16  2013 ndomod.cfg
-rw-rw-r-- 1 apache nagios   1210 Dec 16 11:09 cgi.cfg
-rwxrwxr-x 1 apache nagios   5877 Mar 10 16:10 nagios.cfg
-rw-rw-r-- 1 apache nagios    638 May 11 15:30 servicegroups.cfg
-rw-rw-r-- 1 apache nagios  14192 May 11 15:30 hosttemplates.cfg
-rw-rw-r-- 1 apache nagios   1024 May 11 15:30 hostgroups.cfg
-rw-rw-r-- 1 apache nagios   5714 May 11 15:30 timeperiods.cfg
-rw-rw-r-- 1 apache nagios  21373 May 11 15:30 servicetemplates.cfg
-rw-rw-r-- 1 apache nagios    668 May 11 15:30 serviceextinfo.cfg
-rw-rw-r-- 1 apache nagios    650 May 11 15:30 serviceescalations.cfg
-rw-rw-r-- 1 apache nagios    648 May 11 15:30 servicedependencies.cfg
-rw-rw-r-- 1 apache nagios    662 May 11 15:30 hostextinfo.cfg
-rw-rw-r-- 1 apache nagios    644 May 11 15:30 hostescalations.cfg
-rw-rw-r-- 1 apache nagios    642 May 11 15:30 hostdependencies.cfg
-rw-rw-r-- 1 apache nagios   1500 May 11 15:30 contacttemplates.cfg
-rw-rw-r-- 1 apache nagios   3761 May 11 15:30 contacts.cfg
-rw-rw-r-- 1 apache nagios   1031 May 11 15:30 contactgroups.cfg
-rw-rw-r-- 1 apache nagios  23577 May 11 15:30 commands.cfg
drwsrwsr-x 2 apache nagios   4096 May 13 07:36 import
drwsrwsr-x 2 apache nagios   4096 May 13 07:37 static
drwsrwsr-x 2 apache nagios   4096 May 13 07:37 services
drwxrwsr-x 4 apache nagios   4096 May 13 07:37 pnp
drwsrwsr-x 2 apache nagios 495616 May 13 07:37 hosts
____________________________________________________

Following is the last few lines of the upgrade:

Code: Select all

   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Error: There are no services defined!
        Checked 0 services.
Error: There are no hosts defined!
        Checked 0 hosts.
        Checked 3 host groups.
        Checked 0 service groups.
        Checked 7 contacts.
        Checked 3 contact groups.
        Checked 119 commands.
        Checked 13 time periods.
        Checked 0 host escalations.
        Checked 0 service escalations.
Checking for circular paths...
        Checked 0 hosts
        Checked 0 service dependencies
        Checked 0 host dependencies
        Checked 13 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   2

***> One or more problems was encountered while running the pre-flight check...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.
RET: 1
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /usr/local/nagiosxi/scripts
tar: Removing leading `/' from member names
/usr/local/nagiosxi/scripts
LATEST NOM SNAPSHOT: /usr/local/nagiosxi/nom/checkpoints/nagioscore/1400211607.tar.gz
/ /usr/local/nagiosxi/scripts
RESTORING NOM SNAPSHOT : /usr/local/nagiosxi/nom/checkpoints/nagioscore/1400211607.tar.gz
/usr/local/nagiosxi/scripts
SETUID ROOT OK
RESETTING PERMS
This system has 11343 hosts and 1 service by design. The service is just a ping on the localhost since you have to have one service for things to work.
Any recommendations and thoughts are appreciate.
The priority is low since the Nagios server remains operational in the current state.

It appears I may be running into some threshold.
I have the large installation configs in place.

Mod note: Please use code tags to keep long output from filling the screen

Re: Configuration error during 2014R1.0 upgrade

Posted: Fri May 16, 2014 9:15 am
by mrochelle
Ok, since everything look good from the GUI, I decided to write config files. Following are the results:

Code: Select all

[root@nagprod11 libexec]# ls -lrt /usr/local/nagios/etc
total 672
-rwxrwxr-x 1 apache nagios    210 Jun  6  2012 resource.cfg
-rw-rw-r-- 1 apache nagios   2229 Jun  6  2012 ndo2db.cfg
-rw-rw-r-- 1 apache nagios   1627 Jun  6  2012 send_nsca.cfg
-rw-rw-r-- 1 apache nagios   5345 Jun  6  2012 nsca.cfg
-rw-rw-r-- 1 apache nagios   7207 Aug 22  2012 nrpe.cfg
-rw-rw-r-- 1 apache nagios   4729 Feb 16  2013 ndomod.cfg
-rw-rw-r-- 1 apache nagios   1210 Dec 16 11:09 cgi.cfg
-rwxrwxr-x 1 apache nagios   5877 Mar 10 16:10 nagios.cfg
drwsrwsr-x 2 apache nagios   4096 May 13 07:36 import
drwsrwsr-x 2 apache nagios   4096 May 13 07:37 static
drwxrwsr-x 4 apache nagios   4096 May 13 07:37 pnp
drwsrwsr-x 2 apache nagios   4096 May 16 08:39 services
drwsrwsr-x 2 apache nagios 495616 May 16 08:39 hosts
-rw-r--r-- 1 apache nagios    981 May 16 08:52 hostgroups.cfg
-rw-r--r-- 1 apache nagios    638 May 16 08:52 servicegroups.cfg
-rw-r--r-- 1 apache nagios  15629 May 16 08:52 hosttemplates.cfg
-rw-r--r-- 1 apache nagios  22878 May 16 08:52 servicetemplates.cfg
-rw-r--r-- 1 apache nagios   5714 May 16 08:52 timeperiods.cfg
-rw-r--r-- 1 apache nagios  25202 May 16 08:52 commands.cfg
-rw-r--r-- 1 apache nagios   3761 May 16 08:52 contacts.cfg
-rw-r--r-- 1 apache nagios   1031 May 16 08:52 contactgroups.cfg
-rw-r--r-- 1 apache nagios   1500 May 16 08:52 contacttemplates.cfg
-rw-r--r-- 1 apache nagios    648 May 16 08:52 servicedependencies.cfg
-rw-r--r-- 1 apache nagios    642 May 16 08:52 hostdependencies.cfg
-rw-r--r-- 1 apache nagios    650 May 16 08:52 serviceescalations.cfg
-rw-r--r-- 1 apache nagios    644 May 16 08:52 hostescalations.cfg
-rw-r--r-- 1 apache nagios    668 May 16 08:52 serviceextinfo.cfg
-rw-r--r-- 1 apache nagios    662 May 16 08:52 hostextinfo.cfg

[root@nagprod11 libexec]# ls -lrt /usr/local/nagios/etc/services
total 0
[root@nagprod11 libexec]# ls -lrt /usr/local/nagios/etc/hosts
total 0
?
:(

Re: Configuration error during 2014R1.0 upgrade

Posted: Fri May 16, 2014 12:41 pm
by lmiltchev
Do you see any config errors if you run the Write Config Tool now?

CCM->Tools->Write Config Files

Re: Configuration error during 2014R1.0 upgrade

Posted: Fri May 16, 2014 1:01 pm
by mrochelle
Yes, exactly as indicated in the "Last few lines of the upgrade" code text above. It has a problem reading the hosts and services, although they are there in their respective directory. I can manually view the hosts and services.

Also I have opened a ticket with nagios support so, I'm not sure what the policy is, but can end the discussion here to prevent duplication of resources.

Re: Configuration error during 2014R1.0 upgrade

Posted: Fri May 16, 2014 1:14 pm
by abrist
I am assisting mrochelle in the ticket system, so we will lock it up here.