Page 1 of 5

Install Issues

Posted: Mon Nov 22, 2010 4:32 pm
by sappjt
I did an install of nagiosxi and I put all proxy information in the correct places (wget, rpmmacros, yum.conf, pear). After the install Everything looks like it installed correctly, but nagios has configuration problems. It said it couldn't start the service because there was multiple .cfg files missing. I copied the files from the working centos that I downloaded until the nagios could start correctly. Now I can log in, but can't access anything in the nagios core. It won't except any password I give it. I have changed the htpasswd.users file and made sure that the nagios.cfg points to the right file, but it still doesn't work. Since my config files didn't get copied in the install, do you think that I am missing more files that are needed? If so what would they be?

Re: Install Issues

Posted: Tue Nov 23, 2010 11:32 am
by mguthrie
Are you able to log into the Nagios XI interface? If so you could try logging into the Core Config Manager and using the Write Config Tool to manually write the configuration files out from the DB (assuming the install scripts got far enough to be able to do that).

If the config files didn't import correctly, then there was a problem somewhere in the E-nagiosql installation scripts. I would run that script again and look for any error output that might narrow down the problem.

Re: Install Issues

Posted: Tue Nov 23, 2010 11:19 pm
by sappjt
I will check it out. Thanks for the reply. I am able to log into the nagiosxi web interface. I am also now able to log into the core manager where I was not able to before. Now that I can log into the core config I have errors like the files aren't there.

On the nagios core main config link I get

Cannot open the data file (check the permissions)!
I get the same with the nagios core cgi config

On import config files I get...

Could not open directory /etc/nagios
Could not open directory /etc/nagiosql/hosts
Could not open directory /etc/nagiosql/services
Could not open directory /etc/nagios/import

I ran the E-nagiosql script and the only thing that was interesting was
PHP Warning: Module 'SourceGuardian' already loaded in Unknown on line 0

This happens a couple of times in the script.

I used the write config tool and It failed at the Check configuration files

Error: Cannot open main configuration file '/etc/nagios/nagios.cfg' for reading!
Error processing main config file!

I don't have the /etc/nagios/ directory since it is located at /usr/local/

Any other suggestions for me?

Re: Install Issues

Posted: Wed Nov 24, 2010 10:52 am
by mguthrie
Just for documenting purposes, can you give us the following info?

Linux Distro and version?
32 or 64 bit?
Manual Install?

OK, I think I know what's going on. You'll have to re-run the install scripts starting from A-subcomponents. NagiosQL stores it's directory locations in the MySQL database, and it looks like the XI locations didn't install correctly, which would also mean the DB info for all of the config files didn't load properly either, hence the errors. The particular scripts you'll have to make sure run correctly are in the nagiosxi/basedir/subcomponents/nagiosql directory.

To be noted: We don't officially support proxy installs, but enough people have muscled their way through them now that we know most of the issues it causes. We generally recommend people turn them off altogether during the install process, but if your situation requires that you keep it, we'll do our best to point you through it as long as you don't mind taking the extra steps.

Re: Install Issues

Posted: Wed Nov 24, 2010 1:21 pm
by sappjt
This is a rhel 5.5
It is 32 bit
and I am using what I believe to be the manual install from 0-13 and a-e plus z scripts.
I will re-run the install scripts and see what happens.

Re: Install Issues

Posted: Fri Dec 03, 2010 11:18 am
by mguthrie
Just wanted to follow up and see if you were able to get this installed ok. Let us know if you're still hitting any roadblocks.

Re: Install Issues

Posted: Mon Dec 06, 2010 1:35 pm
by sappjt
I still am having troubles here is what I get when I run E-importnagiosql

Code: Select all

Starting httpd: 
/tmp/nagiosxi/nagiosxi/basedir/scripts /tmp/nagiosxi
PHP Warning:  Module 'SourceGuardian' already loaded in Unknown on line 0
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUsername=nagiosxi&tfPassword=pc3b9m' -O nagiosql.login--2010-12-01 23:45:38--  http://localhost/nagiosql/index.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:39--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.login'

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

2010-12-01 23:45:39 (177 MB/s) - `nagiosql.login' saved [5259/5259]

PHP Warning:  Module 'SourceGuardian' already loaded in Unknown on line 0
IMPORTING CONFIG FILES...Array
(
    [0] => commands.cfg
    [1] => contacts.cfg
    [2] => localhost.cfg
    [3] => nagiosadmin.cfg
    [4] => templates.cfg
    [5] => timeperiods.cfg
    [6] => xicommands.cfg
    [7] => xiobjects.cfg
    [8] => xitemplates.cfg
    [9] => xiwzardtemplates.cfg
)
IMPORTING /usr/local/nagios/etc/import/commands.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/commands.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:39--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:39--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:39 (109 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/contacts.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/contacts.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:39--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:39--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:39 (202 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/localhost.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/localhost.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:39--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:39--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:39 (237 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/nagiosadmin.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/nagiosadmin.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:39--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:39--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:39 (214 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/templates.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/templates.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:39--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:39--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:39 (221 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/timeperiods.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/timeperiods.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:39--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:40--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:40 (151 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/xicommands.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xicommands.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:40--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:40--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:40 (215 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/xiobjects.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xiobjects.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:40--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:40--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:40 (244 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/xitemplates.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xitemplates.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:40--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:40--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:40 (240 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

IMPORTING /usr/local/nagios/etc/import/xiwzardtemplates.cfg
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/import.php --no-check-certificate --post-data 'chbOverwrite=1&selImportFile[]=/usr/local/nagios/etc/import/xiwzardtemplates.cfg' -O nagiosql.import.monitoring
--2010-12-01 23:45:40--  http://localhost/nagiosql/admin/import.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:40--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.import.monitoring'

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

2010-12-01 23:45:40 (211 MB/s) - `nagiosql.import.monitoring' saved [5259/5259]

RESETTING PERMS
SETUID ROOT OK
PHP Warning:  Module 'SourceGuardian' already loaded in Unknown on line 0
CMDLINE
/usr/bin/wget --save-cookies nagiosql.cookies --keep-session-cookies http://localhost/nagiosql/index.php --no-check-certificate --post-data 'Submit=Login&tfUsername=nagiosxi&tfPassword=pc3b9m' -O nagiosql.login--2010-12-01 23:45:40--  http://localhost/nagiosql/index.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:40--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.login'

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

2010-12-01 23:45:40 (232 MB/s) - `nagiosql.login' saved [5259/5259]

PHP Warning:  Module 'SourceGuardian' already loaded in Unknown on line 0
CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeMonitoring=Go' -O nagiosql.export.monitoring
--2010-12-01 23:45:41--  http://localhost/nagiosql/admin/verify.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:41--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.export.monitoring'

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

2010-12-01 23:45:41 (181 MB/s) - `nagiosql.export.monitoring' saved [5259/5259]

--2010-12-01 23:45:41--  http://localhost/nagiosql/admin/verify.php
Resolving localhost... 127.0.0.1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2010-12-01 23:45:41--  http://localhost/nagiosql/index.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: `nagiosql.export.additional'

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

2010-12-01 23:45:41 (179 MB/s) - `nagiosql.export.additional' saved [5259/5259]

CMDLINE:
/usr/bin/wget --load-cookies=nagiosql.cookies http://localhost/nagiosql/admin/verify.php --no-check-certificate --post-data 'writeAdditional=Go' -O nagiosql.export.additional
OUTPUT: 
Nagios Core 3.2.3
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 10-03-2010
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config directory '/usr/local/nagios/etc/static'...
Processing object config file '/usr/local/nagios/etc/static/xiobjects.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/contactgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/hostgroups.cfg'...
Processing object config file '/usr/local/nagios/etc/servicegroups.cfg'...
Processing object config file '/usr/local/nagios/etc/hosttemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicetemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/servicedependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostdependencies.cfg'...
Processing object config file '/usr/local/nagios/etc/hostescalations.cfg'...
Processing object config file '/usr/local/nagios/etc/hostextinfo.cfg'...
Processing object config file '/usr/local/nagios/etc/serviceextinfo.cfg'...
Processing object config directory '/usr/local/nagios/etc/hosts'...
Processing object config file '/usr/local/nagios/etc/hosts/lindev.inl.gov.cfg'...
Processing object config directory '/usr/local/nagios/etc/services'...
Processing object config file '/usr/local/nagios/etc/services/lindev.inl.gov.cfg'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
	Checked 2 services.
Checking hosts...
	Checked 1 hosts.
Checking host groups...
	Checked 2 host groups.
Checking service groups...
	Checked 2 service groups.
Checking contacts...
	Checked 2 contacts.
Checking contact groups...
	Checked 2 contact groups.
Checking service escalations...
	Checked 0 service escalations.
Checking service dependencies...
	Checked 0 service dependencies.
Checking host escalations...
	Checked 0 host escalations.
Checking host dependencies...
	Checked 0 host dependencies.
Checking commands...
	Checked 71 commands.
Checking time periods...
	Checked 8 time periods.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
RET: 0
Running configuration check...done.
Stopping nagios: done.
Starting nagios: done.
RESETTING PERMS
/tmp/nagiosxi
SETUID ROOT OK
/usr/local/nagiosxi/nom/checkpoints/nagioscore /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
In the nagios core config manager I am now getting

Error: Cannot open main configuration file '/etc/nagios/nagios.cfg' for reading!
Error processing main config file!

On the Core configuration import I get this result

Could not open directory /etc/nagios
Could not open directory /etc/nagiosql/hosts
Could not open directory /etc/nagiosql/services
Could not open directory /etc/nagios/import


To prevent errors or misconfigurations, you should import your configurations in an useful order. We recommend to do it like this:

commands -> timeperiods -> contacttemplates -> contacts -> contactgroups -> hosttemplates -> hosts -> hostgroups -> servicetemplates -> services -> servicegroups

Check your configuration after import!
In cause of an error or an uncomplete configuration, re-importing the wrong configuration can solve the problem

I hope this give you more of an Idea of what I'm still missing.

Also what specific scripts need to be run in the nagiosxi/basedir/subcomponents/nagiosql directory?

Re: Install Issues

Posted: Tue Dec 07, 2010 12:16 pm
by mguthrie
So let me make sure I understand where you're at:

You're able to login to Nagios XI as well as the Core Config Manager.

The issues that you're facing are with importing your configuration files?
If so, what steps have you taken for importing?

NagiosQL store it's directory locations in the database, which means the default schema didn't load correctly during the install process. Was this install run on a fresh system, or was the mysql root password set before the installer was run?

Re: Install Issues

Posted: Tue Dec 07, 2010 12:47 pm
by sappjt
I haven't tried to import any configuration files in, but I thought I would have some default ones in the /etc/nagios directory. I don't have a nagios directory there. It was on a fresh system and I can start over again if needed, because its a vm. I didn't have the mysql password set. Is there a way to reset the password to be empty and rerun the script that imports the sql stuff?

Re: Install Issues

Posted: Tue Dec 07, 2010 2:42 pm
by mguthrie
Just out of curiosity, did you run the installer scripts from the /tmp directory?

If not re-run the installer scripts from that directory. It shouldn't hurt anything to do so.

Are you able to turn off your proxy altogether for the install?