NagiosXI installation from RPM packages incomplete

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
Locked
arangel
Posts: 7
Joined: Thu Sep 22, 2016 9:17 am

NagiosXI installation from RPM packages incomplete

Post by arangel »

Hi,

We successfully installed NagiosXI on our testing server using this same method but when trying on the production one the installation is incomplete.

Steps performed:

1. Got the tarball from here:

Code: Select all

https://repo.nagios.com/nagiosxi-offline/nagiosxi-5-2.9.el6.i386.tar.gz
2. Added packages to our local mrepo server and regenerated repo (we used the same method for our testing server).

3. yum install nagiosxi on the production server (as you can see installation together with all the dependencies is complete):
nagios_yum-install.txt
<--- this file contains the messages from xi-install.log

4. Only errors noticed during the installation:

Code: Select all

chown: cannot access `/etc/openldap/cacerts': No such file or directory
/bin/chmod: cannot access `/etc/openldap/cacerts': No such file or directory
but we do not use openldap and do not have it installed so we ignored this.

Outcome:

Files missing after all RPMS are installed (NO other errors found in installation log):

Code: Select all

/etc/init.d/nagiosxi
/usr/local/nagiosxi/html/
/usr/local/nagios/etc/(a lot of .cfg files)
When trying to start the nagios service we get:

Code: Select all

# /etc/init.d/nagios start
Starting nagios:
Nagios Core 4.1.1
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 08-19-2015
License: GPL

Website: https://www.nagios.org
Reading configuration data...
   Read main config file okay...
Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
   Error processing object config files!


***> One or more problems was encountered while processing the config files...

     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.

We followed the exact same steps earlier and everything worked out fine.

We have SELinux disabled on the box. Operating system is RHEL6.

Tried erasing and re-installing all RPM packages several times.


Please let me know if I can provide any other information.

Thanks in advance.
You do not have the required permissions to view the files attached to this post.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: NagiosXI installation from RPM packages incomplete

Post by avandemore »

What does

Code: Select all

# ll /usr/local/nagios/etc/
look like on both test and production? If they are different(other than timestamps), there must be some difference in your process.
Previous Nagios employee
dwhitfield
Former Nagios Staff
Posts: 4583
Joined: Wed Sep 21, 2016 10:29 am
Location: NoLo, Minneapolis, MN
Contact:

Re: NagiosXI installation from RPM packages incomplete

Post by dwhitfield »

Also, for clarity, this is what I get:

Code: Select all

[root@centos7x64 ~]# ls /etc/openldap/cacerts/
ls: cannot access /etc/openldap/cacerts/: No such file or directory
[root@centos7x64 ~]# ls /usr/local/nagios/html/
ls: cannot access /usr/local/nagios/html/: No such file or directory
[root@centos7x64 ~]# ls /usr/local/nagios/etc/
cgi.cfg            contacts.cfg          hostescalations.cfg  hosts              nagios.cfg  nrpe.cfg  resource.cfg             serviceescalations.cfg  services              timeperiods.cfg
commands.cfg       contacttemplates.cfg  hostextinfo.cfg      hosttemplates.cfg  ndo2db.cfg  nsca.cfg  send_nsca.cfg            serviceextinfo.cfg      servicetemplates.cfg
contactgroups.cfg  hostdependencies.cfg  hostgroups.cfg       import             ndomod.cfg  pnp       servicedependencies.cfg  servicegroups.cfg       static

arangel
Posts: 7
Joined: Thu Sep 22, 2016 9:17 am

Re: NagiosXI installation from RPM packages incomplete

Post by arangel »

test:

Code: Select all

# ll /usr/local/nagios/etc
total 236
drwxrwS---. 2 apache nagios  4096 Dec  5 13:58 bak
-rw-rw----. 1 apache nagios  2458 Dec  5 10:30 cgi.cfg
-rw-rw-r--. 1 apache nagios 25782 Dec  9 08:22 commands.cfg
-rw-rw-r--. 1 apache nagios  2527 Dec  9 08:22 contactgroups.cfg
-rw-rw-r--. 1 apache nagios 15972 Dec  9 08:22 contacts.cfg
-rw-rw-r--. 1 apache nagios  1675 Dec  9 08:22 contacttemplates.cfg
-rw-rw-r--. 1 apache nagios   817 Dec  9 08:22 hostdependencies.cfg
-rw-rw-r--. 1 apache nagios   819 Dec  9 08:22 hostescalations.cfg
-rw-rw-r--. 1 apache nagios   837 Dec  9 08:22 hostextinfo.cfg
-rw-rw-r--. 1 apache nagios  3234 Dec  9 08:22 hostgroups.cfg
drwxrwxr-x. 2 apache nagios  4096 Dec  7 10:38 hosts
-rw-rw-r--. 1 apache nagios 16501 Dec  9 08:22 hosttemplates.cfg
drwxrwxr-x. 2 apache nagios  4096 Dec  9 08:09 import
-rw-rw-r--. 1 apache nagios  5856 Nov 24 16:53 nagios.cfg
-rw-rw----. 1 apache nagios  2253 Dec  5 12:59 ndo2db.cfg
-rw-rw----. 1 apache nagios  2255 Oct 28 17:27 ndo2db.cfg.20161205
-rw-rw-r--. 1 apache nagios  2229 Oct 19 18:09 ndo2db.cfg.orig
-rw-rw-r--. 1 apache nagios  4827 Oct 19 18:09 ndomod.cfg
-rw-rw-r--. 1 apache nagios  7988 Jun 22 20:48 nrpe.cfg
-rw-rw-r--. 1 apache nagios  5358 Nov  2 10:39 nsca.cfg
drwxrwxr-x. 4 apache nagios  4096 Dec  6 08:54 pnp
-rw-rw----. 1 apache nagios     0 Mar 30  2016 recurringdowntime.cfg
-rw-rw-r--. 1 apache nagios   210 Jun 22 20:47 resource.cfg
-rw-rw-r--. 1 apache nagios  1627 Jun 22 20:48 send_nsca.cfg
-rw-rw-r--. 1 apache nagios   823 Dec  9 08:22 servicedependencies.cfg
-rw-rw-r--. 1 apache nagios   825 Dec  9 08:22 serviceescalations.cfg
-rw-rw-r--. 1 apache nagios   843 Dec  9 08:22 serviceextinfo.cfg
-rw-rw-r--. 1 apache nagios  2090 Dec  9 08:22 servicegroups.cfg
-rw-rw-r--. 1 apache nagios  2084 Dec  2 14:31 servicegroups.cfg.20161202
drwxrwxr-x. 2 apache nagios  4096 Dec  9 08:22 services
-rw-rw-r--. 1 apache nagios 24990 Dec  9 08:22 servicetemplates.cfg
drwxrwxr-x. 2 apache nagios  4096 Dec  6 08:54 static
-rw-rw-r--. 1 apache nagios 17093 Dec  9 08:22 timeperiods.cfg


production:

Code: Select all

# ll /usr/local/nagios/etc
total 68
-rw-r--r--. 1 nagios nagios  744 Jun 22 20:47 cgi.cfg
drwxrwxr-x. 2 apache nagios 4096 Jun 22 20:52 hosts
drwxrwxr-x. 2 nagios nagios 4096 Jun 22 20:52 import
-rw-r--r--. 1 nagios nagios 5670 Jun 22 20:47 nagios.cfg
-rw-rw-r--. 1 nagios nagios 2229 Dec  8 16:06 ndo2db.cfg
-rw-rw-r--. 1 nagios nagios 4827 Dec  8 16:06 ndomod.cfg
-rw-rw-r--. 1 nagios nagios 7988 Jun 22 20:48 nrpe.cfg
-rw-rw-r--. 1 nagios nagios 5345 Jun 22 20:48 nsca.cfg
drwxr-xr-x. 4 nagios nagios 4096 Dec  8 16:06 pnp
-rw-r--r--. 1 nagios nagios  210 Jun 22 20:47 resource.cfg
-rw-rw-r--. 1 nagios nagios 1627 Jun 22 20:48 send_nsca.cfg
drwxrwxr-x. 2 apache nagios 4096 Jun 22 20:52 services
drwxrwxr-x. 2 nagios nagios 4096 Jun 22 20:52 static

but there is nothing in / usr/local/nagiosxi/html and that is where install.php is located on the test box.

test:

Code: Select all

# ll /usr/local/nagiosxi/html
total 464
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 about
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 account
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 addons
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 admin
-rwxr-xr-x.  1 nagios nagios  27400 Oct 19 18:09 ajaxhelper.php
-rwxr-xr-x.  1 nagios nagios   1685 Oct 19 18:09 ajaxproxy.php
drwxr-xr-x.  4 nagios nagios   4096 Oct 19 15:16 api
drwxr-xr-x.  3 nagios nagios   4096 Oct 19 15:16 backend
drwxr-xr-x.  3 nagios nagios   4096 Oct 19 15:16 config
-rwxr-x---.  1 nagios nagios   8821 Dec  5 13:49 config.inc.php
-rwxr-xr-x.  1 nagios nagios   8821 Oct 28 17:27 config.inc.php.20161202
-rwxr-xr-x.  1 nagios nagios   8821 Dec  2 12:17 config.inc.php.20161205
-rwxr-xr-x.  1 nagios nagios   8699 Oct 19 18:09 config.inc.php.orig
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 dashboards
drwxr-xr-x.  4 nagios nagios   4096 Oct 19 15:16 db
drwxr-xr-x.  3 nagios nagios   4096 Oct 19 15:16 downloads
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 help
drwxr-xr-x.  5 nagios nagios  12288 Nov  1 10:39 images
drwxr-xr-x. 11 nagios nagios   4096 Oct 28 14:08 includes
-rwxr-xr-x.  1 nagios nagios    884 Oct 19 18:09 index.php
-rwxr-xr-x.  1 nagios nagios  10189 Oct 19 18:09 install.php
-rwxr-xr-x.  1 nagios nagios 250956 Oct 19 18:09 login.php
-rw-r--r--.  1 nagios nagios   2303 Oct 19 18:09 loginsplash.inc.php
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 perfgraphs
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 reports
-rw-r--r--.  1 nagios nagios  20509 Oct 19 18:09 rr.php
-rwxr-xr-x.  1 nagios nagios  12206 Oct 19 18:09 suggest.php
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 tools
-rwxr-xr-x.  1 nagios nagios   2010 Oct 19 18:09 upgrade.php
drwxr-xr-x.  2 nagios nagios   4096 Oct 19 15:16 views

production:

Code: Select all

# ll /usr/local/nagiosxi/html
ls: cannot access /usr/local/nagiosxi/html: No such file or directory
Also as mentioned in my first post the nagiosxi init script that should be in /etc/init.d/nagiosxi is there on the test box and not there on the production box.
arangel
Posts: 7
Joined: Thu Sep 22, 2016 9:17 am

Re: NagiosXI installation from RPM packages incomplete

Post by arangel »

I've just tried downloading the latest version of the tarball:

Code: Select all

https://repo.nagios.com/nagiosxi-offline/nagiosxi-5-3.3.el6.x86_64.tar.gz
files missing in

Code: Select all

/usr/local/nagiosxi/html

Code: Select all

/etc/init.d/nagiosxi
is not there again.
arangel
Posts: 7
Joined: Thu Sep 22, 2016 9:17 am

Re: NagiosXI installation from RPM packages incomplete

Post by arangel »

Issue solved.

Would be useful if the nagios installation gives a little bit more verbose output of what is happening. The installation was broken because it was stopped at:

Code: Select all

run_sub ./B-installxi
most probably due to the fact that we had a custom ssl.conf file deployed to the server automatically. Once we removed the httpd package and all the custom httpd configuration files, then re-run:

Code: Select all

yum install nagiosxi
the installation finally finished successfully and all the missing files were there (of course httpd was pulled as a dependency and installed with the default configuration files).

I advise using a clean Apache install before trying to install nagiosxi.
avandemore
Posts: 1597
Joined: Tue Sep 27, 2016 4:57 pm

Re: NagiosXI installation from RPM packages incomplete

Post by avandemore »

Nagios XI is designed to be installed and used as a single purpose system. Ideally Apache wouldn't be install prior to a full install. Locking thread as it's resolved.
Previous Nagios employee
Locked