nagios xi install
nagios xi install
I am tried to re-install nagiosxi the same day I installed it first time and I get the below error re-installing NagiosXI.
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Reloading httpd: [ OK ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './B-installxi'
below is the logfile output when it fails
It appears as though Ajaxterm is already configured, so we'll skip that step.
Subcomponent 'ajaxterm' installed OK
Subcomponents installed OK
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Reloading httpd: [ OK ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
Thanks,
Chandra
Running './B-installxi'...
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Reloading httpd: [ OK ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1
===================
INSTALLATION ERROR!
===================
Installation step failed - exiting.
Check for error messages in the install log (install.log).
If you require assistance in resolving the issue, please include install.log
in your communications with Nagios XI technical support.
The script that failed was: './B-installxi'
below is the logfile output when it fails
It appears as though Ajaxterm is already configured, so we'll skip that step.
Subcomponent 'ajaxterm' installed OK
Subcomponents installed OK
Installing Nagios XI base files...
Creating product directory...
Adding password for user nagiosadmin
Reloading httpd: [ OK ]
Building latest perms binary...
Checking PostgresQL status...
PostgresQL running - continuing...
Creating role and database...
ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
Thanks,
Chandra
Re: nagios xi install
Can you give a little more detail as to what wasn't working from the first time? If there's a part of the installation that didn't appear to work we can talk you through how to rerun that part of the installation.
Re: nagios xi install
I want to reinsall nagios which fails. could you please walk me through nagiosxi reinstalltion. its on redhat 5.8 OS.
Thanks
Thanks
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nagios xi install
Part of creating an Nagios XI install is starting with a clean System
http://assets.nagios.com/downloads/nagi ... stallation
http://assets.nagios.com/downloads/nagi ... stallation
As mguthrie mentioned, if you are having a problem it would be much easier to diagnose the problem, otherwise I would recommend starting with a clean system and running ./fullinstallNote: Nagios XI can only be installed to RHEL, CentOS, or Fedora Core Linux distributions. We highly recommend installing Nagios XI on a 32-bit distribution.
Important: Nagios Enterprises highly recommends and will only support installing Nagios XI on a newly installed, "clean" system. Attempting to install Nagios XI on a pre-existing system with other applications already installed can cause the Nagios XI installation process to fail, critical system components and settings (e.g. database servers) to be modified in a way that negatively affects other applications, and previously installed applications to be automatically upgraded or removed. While installing XI on a system with other applications is possible, it is not recommended due to the possible interactions and complexity of multiple components that are required for Nagios XI to function. If you choose to ignore these warnings, you do so at your own risk.
Internet access is required for installation and upgrades!
Re: nagios xi install
Thanks for the inputs.
I tried reinstall and it fails at ./B-installxi script with the same error mentioned earlier in my first post
run_sub ./0-yum noupdate
run_sub ./1-prereqs
run_sub ./2-usersgroups
run_sub ./3-dbservers
run_sub ./4-services
run_sub ./5-sudoers
run_sub ./6-firewall
run_sub ./7-sendmail
run_sub ./8-selinux
run_sub ./9-dbbackups
run_sub ./10-phplimits
run_sub ./11-sourceguardian
run_sub ./12-mrtg
run_sub ./13-cacti
run_sub ./14-timezone
run_sub ./A-subcomponents
run_sub ./B-installxi
run_sub ./C-cronjobs
run_sub ./D-chkconfigalldaemons
run_sub ./E-importnagiosql
run_sub ./F-startdaemons
run_sub ./Z-webroot
Thanks,
Chandra
I tried reinstall and it fails at ./B-installxi script with the same error mentioned earlier in my first post
run_sub ./0-yum noupdate
run_sub ./1-prereqs
run_sub ./2-usersgroups
run_sub ./3-dbservers
run_sub ./4-services
run_sub ./5-sudoers
run_sub ./6-firewall
run_sub ./7-sendmail
run_sub ./8-selinux
run_sub ./9-dbbackups
run_sub ./10-phplimits
run_sub ./11-sourceguardian
run_sub ./12-mrtg
run_sub ./13-cacti
run_sub ./14-timezone
run_sub ./A-subcomponents
run_sub ./B-installxi
run_sub ./C-cronjobs
run_sub ./D-chkconfigalldaemons
run_sub ./E-importnagiosql
run_sub ./F-startdaemons
run_sub ./Z-webroot
Thanks,
Chandra
-
scottwilkerson
- DevOps Engineer
- Posts: 19396
- Joined: Tue Nov 15, 2011 3:11 pm
- Location: Nagios Enterprises
- Contact:
Re: nagios xi install
Honestly, it would likely be better to start with a clean machien and install Nagios XI fresh..
I have no idea if this is complete but you can try running these commands to remove Nagios XI
I have no idea if this is complete but you can try running these commands to remove Nagios XI
Code: Select all
# Remove Nagios Core files
echo "Removing Nagios Core files..."
rm -rf /usr/local/nagios
# Remove Nagios XI files
echo "Removing Nagios XI files..."
rm -rf /usr/local/nagiosxi
# Remove NagiosQL files
echo "Removing NagiosQL files..."
rm -f /etc/nagiosql
# Remove MySQL databases
echo "Removing MySQL databases..."
mysql -u root -pnagiosxi -e "DROP DATABASE nagios"
mysql -u root -pnagiosxi -e "DROP DATABASE nagiosql"
service mysqld restart
# Remove Postgres databases
echo "Removing Postgres databases..."
psql -U nagiosxi nagiosxi -c "DROP DATABASE nagiosxi"
service pgsql restart
# Remove DB backup scripts
echo "Removing database backup scripts..."
rm -f /root/scripts/automysqlbackup
rm -f /root/scripts/autopostgresqlbackup
Re: nagios xi install
fails at another script now.
root@:/tmp/nagiosxi: > ./E-importnagiosql
httpd: no process killed
Starting httpd: [ OK ]
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
Found config files to import - continuing...
URL: http://localhost/nagiosql/index.php
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--2012-10-23 13:59:20-- http://localhost/nagiosql/index.php
Resolving proxy.wellsfargo.com... 151.151.15.250
Connecting to proxy.wellsfargo.com|151.151.15.250|:8080... connected.
Proxy request sent, awaiting response... 404 Not Found
2012-10-23 13:59:21 ERROR 404: Not Found.
NAGIOSQL LOGIN FAILED!
ERROR: NagiosQL import appears to have failed - exiting. (Reason: Import files are still present in /usr/local/nagios/etc/import)
root@:/tmp/nagiosxi: > cd /usr/local/nagios/etc/import
root@:/usr/local/nagios/etc/import: > ls
commands.cfg contacts.cfg localhost.cfg nagiosadmin.cfg templates.cfg timeperiods.cfg xicommands.cfg xiobjects.cfg xitemplates.cfg xiwzardtemplates.cfg
root@:/usr/local/nagios/etc/import: >
root@:/tmp/nagiosxi: > ./E-importnagiosql
httpd: no process killed
Starting httpd: [ OK ]
Sleeping...
NOTE: If prompted, enter the MySQL root password
NagiosQL database appears OK - continuing...
NDOUtils database appears OK - continuing...
Found config files to import - continuing...
URL: http://localhost/nagiosql/index.php
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--2012-10-23 13:59:20-- http://localhost/nagiosql/index.php
Resolving proxy.wellsfargo.com... 151.151.15.250
Connecting to proxy.wellsfargo.com|151.151.15.250|:8080... connected.
Proxy request sent, awaiting response... 404 Not Found
2012-10-23 13:59:21 ERROR 404: Not Found.
NAGIOSQL LOGIN FAILED!
ERROR: NagiosQL import appears to have failed - exiting. (Reason: Import files are still present in /usr/local/nagios/etc/import)
root@:/tmp/nagiosxi: > cd /usr/local/nagios/etc/import
root@:/usr/local/nagios/etc/import: > ls
commands.cfg contacts.cfg localhost.cfg nagiosadmin.cfg templates.cfg timeperiods.cfg xicommands.cfg xiobjects.cfg xitemplates.cfg xiwzardtemplates.cfg
root@:/usr/local/nagios/etc/import: >
-
slansing
- Posts: 7698
- Joined: Mon Apr 23, 2012 4:28 pm
- Location: Travelling through time and space...
Re: nagios xi install
You must still be installing on the system where the previous Nagios XI instance resided. There are many pieces to the "Nagios Machine" thus why we support installations on a completely fresh Centos/Rhel installation. You can run into a lot of snags trying to re install over an old install.
Re: nagios xi install
It seems like you have a proxy issue. Please, read our wiki post on this topic:
http://support.nagios.com/wiki/index.ph ... th_Proxies
I would recommend following the instructions above for setting up your proxy, then repeating the steps, outlined by scottwilkerson, and running the following commands:
Note: Do not run the install scripts individually! Please, run "fullinstall" instead.
http://support.nagios.com/wiki/index.ph ... th_Proxies
I would recommend following the instructions above for setting up your proxy, then repeating the steps, outlined by scottwilkerson, and running the following commands:
Code: Select all
cd /tmp/nagiosxi
./fullinstallBe sure to check out our Knowledgebase for helpful articles and solutions!
Re: nagios xi install
First I tried running fullinstall script and it failed at ./E-importnagiosql, so I am tring to run it manually.
I see it invokes few other scripts
/tmp/nagiosxi/nagiosxi/basedir/scripts/reconfigure_nagios.sh
/tmp/nagiosxi/nagiosxi/basedir/scripts/import_nagiosql.sh
/tmp/nagiosxi/nagiosxi/basedir/scripts/restart_nagios_with_export.sh
/tmp/nagiosxi/nagiosxi/basedir/scripts/export_nagiosql.sh
when i try to find the script its failing it is export_nagiosql.sh
root@:/tmp/nagiosxi/nagiosxi/basedir/scripts: > ./export_nagiosql.sh
SETUID ROOT OK
RESETTING PERMS
URL: http ://localhost/nagiosql/index.php
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--2012-10-24 11:09:46-- 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/admin.php [following]
--2012-10-24 11:09:46-- http://localhost/nagiosql/admin.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2012-10-24 11:09:46-- 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'
100%[===========================================================================================================================================================>] 5,259 --.-K/s in 0s
2012-10-24 11:09:46 (716 MB/s) - `nagiosql.login' saved [5259/5259]
NAGIOSQL LOGIN FAILED!\n
root@:/tmp/nagiosxi/nagiosxi/basedir/scripts: >
root@:/tmp/nagiosxi/nagiosxi/basedir/scripts: > more export_nagiosql.sh
#!/bin/sh
# Copyright (c) 2008-2009 Nagios Enterprises, LLC. All rights reserved.
# $Id: export_nagiosql.sh 787 2011-08-10 17:45:08Z mguthrie $
# Fix permissions on config files to make sure NagiosQL can write data
./reset_config_perms
#error handling
ret=$?
if [ $ret -gt 0 ]; then
echo "RESETTING CONFIG PERMS FAILED!\n"
exit 4
fi
# Login to NagiosQL
/usr/bin/php -q nagiosql_login.php
#error handling
ret=$?
if [ $ret -gt 0 ]; then
echo "NAGIOSQL LOGIN FAILED!\n"
exit $ret
fi
# Export all data
/usr/bin/php -q nagiosql_exportall.php
#error handling
ret=$?
if [ $ret -gt 0 ]; then
echo "NAGIOSQL WRITE CONFIGS FAILED!\n"
exit $ret
fi
==================================
I see it invokes few other scripts
/tmp/nagiosxi/nagiosxi/basedir/scripts/reconfigure_nagios.sh
/tmp/nagiosxi/nagiosxi/basedir/scripts/import_nagiosql.sh
/tmp/nagiosxi/nagiosxi/basedir/scripts/restart_nagios_with_export.sh
/tmp/nagiosxi/nagiosxi/basedir/scripts/export_nagiosql.sh
when i try to find the script its failing it is export_nagiosql.sh
root@:/tmp/nagiosxi/nagiosxi/basedir/scripts: > ./export_nagiosql.sh
SETUID ROOT OK
RESETTING PERMS
URL: http ://localhost/nagiosql/index.php
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--2012-10-24 11:09:46-- 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/admin.php [following]
--2012-10-24 11:09:46-- http://localhost/nagiosql/admin.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: http://localhost/nagiosql/index.php [following]
--2012-10-24 11:09:46-- 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'
100%[===========================================================================================================================================================>] 5,259 --.-K/s in 0s
2012-10-24 11:09:46 (716 MB/s) - `nagiosql.login' saved [5259/5259]
NAGIOSQL LOGIN FAILED!\n
root@:/tmp/nagiosxi/nagiosxi/basedir/scripts: >
root@:/tmp/nagiosxi/nagiosxi/basedir/scripts: > more export_nagiosql.sh
#!/bin/sh
# Copyright (c) 2008-2009 Nagios Enterprises, LLC. All rights reserved.
# $Id: export_nagiosql.sh 787 2011-08-10 17:45:08Z mguthrie $
# Fix permissions on config files to make sure NagiosQL can write data
./reset_config_perms
#error handling
ret=$?
if [ $ret -gt 0 ]; then
echo "RESETTING CONFIG PERMS FAILED!\n"
exit 4
fi
# Login to NagiosQL
/usr/bin/php -q nagiosql_login.php
#error handling
ret=$?
if [ $ret -gt 0 ]; then
echo "NAGIOSQL LOGIN FAILED!\n"
exit $ret
fi
# Export all data
/usr/bin/php -q nagiosql_exportall.php
#error handling
ret=$?
if [ $ret -gt 0 ]; then
echo "NAGIOSQL WRITE CONFIGS FAILED!\n"
exit $ret
fi
==================================