Page 1 of 1

2009R1.4B installation failing at E-importnagiosql

Posted: Thu May 26, 2011 6:55 am
by TSCAdmin
Hello,

I am trying to install 2009R1.4B on CentOS 5.6 64 bit. I ran the script sequentially and everything seemed to work fine except E-importnagiosql.

The error is:

Code: Select all

Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
   Error processing object config files!
The complete output of the script is as follows:

Code: Select all

# ./E-importnagiosql
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
Found config files to import - continuing...
/tmp/nagiosxi/nagiosxi/basedir/scripts /tmp/nagiosxi
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=n@gweb' -O nagiosql.login--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.login'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.login' saved [0/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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

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
--2011-05-26 02:48:12--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.import.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:12 (0.00 B/s) - `nagiosql.import.monitoring' saved [0/0]

SETUID ROOT OK
RESETTING PERMS
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=n@gweb' -O nagiosql.login--2011-05-26 02:48:13--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.login'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:13 (0.00 B/s) - `nagiosql.login' saved [0/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
--2011-05-26 02:48:13--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.export.monitoring'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:13 (0.00 B/s) - `nagiosql.export.monitoring' saved [0/0]

--2011-05-26 02:48:13--  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... 200 OK
Length: 0 [text/html]
Saving to: `nagiosql.export.additional'

    [ <=>                                                                      ] 0           --.-K/s   in 0s

2011-05-26 02:48:13 (0.00 B/s) - `nagiosql.export.additional' saved [0/0]

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/xitemplates.cfg'...
Processing object config file '/usr/local/nagios/etc/static/xitest.cfg'...
Processing object config file '/usr/local/nagios/etc/contacttemplates.cfg'...
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.
RET: 254
/usr/local/nagiosxi/nom/checkpoints/nagioscore/errors /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi/nagiosxi/basedir/scripts
ls: /usr/local/nagiosxi/nom/checkpoints/nagioscore/*.gz: No such file or directory
NO NOM SNAPSHOT FOUND!
/tmp/nagiosxi
ERROR: NagiosQL import appears to have failed - exiting.  (Reason: Nagios Core configuration is invalid)
Is there something I am missing?

Thanks

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Thu May 26, 2011 4:06 pm
by nscott
TSCAdmin,

It looks as if the templates are not being created properly. This could be from a couple places during the install.

Could you run the the ./fullinstall from the nagiosxi directory, dumping the entire output of the ./fullinstall to some text file and emailing the text file to [email protected]? I just tried installing this on CentOS 5.6 64-bit box to ensure no compatibility issues, and that doesn't seem to be the problem.

Also, just out curiosity, why are you installing 2009?

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Fri May 27, 2011 1:24 am
by TSCAdmin
nscott wrote:TSCAdmin,
Could you run the the ./fullinstall from the nagiosxi directory, dumping the entire output of the ./fullinstall to some text file and emailing the text file to [email protected]? I just tried installing this on CentOS 5.6 64-bit box to ensure no compatibility issues, and that doesn't seem to be the problem.
I have just e-mailed the output of fullinstall to [email protected]
Also, just out curiosity, why are you installing 2009?
We are running Nagios XI 2009R1.3 on our production server and intend to import files from it to the dev environment. I am unsure whether 2011R1.3 is backward compatible with 2009. Do you have any suggestions?

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Fri May 27, 2011 10:31 am
by admin
It looks like the following file doesn't exist:

/usr/local/nagios/etc/contacttemplates.cfg

You might want to run the following script to make sure the permissions on the /usr/local/nagios/etc directory are correct:

Code: Select all

/usr/local/nagiosxi/scripts/reset_config_perms.sh

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Thu Jun 02, 2011 5:56 am
by TSCAdmin
I was wondering if I install 2011 would it be:

1. able to understand the configuration files from 2009? I intend to do backup files from 2009 and import on 2011 install.
2. support license keys generated for 2009?

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Thu Jun 02, 2011 9:29 am
by tonyyarusso
TSCAdmin wrote:1. able to understand the configuration files from 2009? I intend to do backup files from 2009 and import on 2011 install.
Yes.
TSCAdmin wrote:2. support license keys generated for 2009?
I believe it uses the same actual key, but you have to do an extra activation process for it.

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Fri Jun 03, 2011 5:16 am
by TSCAdmin
Sounds great. I will try it and give you a shout if I am stuck. Thanks

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Fri Jun 03, 2011 9:34 am
by nscott
Alright, hope all goes well!

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Fri Jun 24, 2011 4:43 am
by TSCAdmin
I think I have cracked it!!!

I am actually behind a proxy server that could not be bypassed. I understand that Nagios XI installation is not supported behind proxy server but in some cases you have no choice.

After reading the scripts, here is what I think can work for almost everyone as it did for me

1. Before running any installation script install php-pear package manually

2. Set proxy for PHP Pear

Code: Select all

pear config-set http_proxy 'http://example.com:8080'
3. Run Nagios installation scripts sequentially

4. Unset system proxy before running E-importnagiosql script

Thank you Nagios support team and especially Mike Guthrie. Cheers :)

Re: 2009R1.4B installation failing at E-importnagiosql

Posted: Fri Jun 24, 2011 9:43 am
by mguthrie
Thanks for the feedback! I posted your steps to our wiki on proxy installs:
http://support.nagios.com/wiki/index.ph ... th_Proxies