Nagios XI Installation for RHEL Server

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Nagios XI Installation for RHEL Server

Post by pmfunder »

Hello,

This is my first post here on the forum. I have been having issues with Nagios XI Install on our RHEL server. Finally got our server registered to rhn and install running.
During the NagioSQL login portion, I disabled the proxy and the login files were saved. After enabling proxy and/or keeping it disabled, the NagioSQL login fails. I did install Nagios Core to test before XI and have not uninstalled. Server does not have apt-get package so I am unsure how to do so.

/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-07-30 14:47:25-- localhost/nagiosql/index
Resolving localhost... 127.0.0.1, ::1
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: h.ttp://localhost/nagiosql/admin.php [following]
--2012-07-30 14:47:25-- http://localhost/nagiosql/admin.php
Connecting to localhost|127.0.0.1|:80... connected.
HTTP request sent, awaiting response... 302 Found
Location: h.ttp://localhost/nagiosql/index.php [following]
--2012-07-30 14:47:25-- 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% 1.57G=0s

2012-07-30 14:47:25 (1.57 GB/s) - ânagiosql.loginâ saved [5259/5259]

NAGIOSQL LOGIN FAILED!

Best Regards,
Phil
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Installation for RHEL Server

Post by lmiltchev »

Please, read our policy on proxies here.

What do you mean by: "I did install Nagios Core to test before XI and have not uninstalled"?
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.
Be sure to check out our Knowledgebase for helpful articles and solutions!
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Re: Nagios XI Installation for RHEL Server

Post by pmfunder »

I still have Nagios Core on the server. Should I start from scratch again? (ie clean the server and start over)
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios XI Installation for RHEL Server

Post by slansing »

If you can remove core successfully, or restart on a fresh VM/Box this would be advisable, there are numerous issues that can be caused by having both Core and XI on the same system as Core is the back end of XI.
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Re: Nagios XI Installation for RHEL Server

Post by pmfunder »

I was able to remove Nagios Core, I also uninstalled what was existing of NagiosXI and still receive the same error message during the ./fullinstall.
I also followed the proxy commands listed in the guide you attached. It appears that nagiosql.login is obtained but does not give any of the common error messages in E-importnagiosql


log results (cut due to # of links):
HTTP request sent, awaiting response... 200 OK
Length: 5259 (5.1K) [text/html]
Saving to: ânagiosql.loginâ

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

2012-07-30 15:35:54 (371 MB/s) - ânagiosql.loginâ saved [5259/5259]

NAGIOSQL LOGIN FAILED!
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Installation for RHEL Server

Post by lmiltchev »

You will have to completely remove mysql and postgres from you system and run ./fullinstall again.
Be sure to check out our Knowledgebase for helpful articles and solutions!
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Re: Nagios XI Installation for RHEL Server

Post by pmfunder »

I removed all instances of mysql and postgresQL. Now I get the following error. Should I just clean the system and start over?

ERROR: role "nagiosxi" already exists
ERROR: database "nagiosxi" already exists
ERROR: Nagios XI database was not setup properly - exiting.
RESULT=1
slansing
Posts: 7698
Joined: Mon Apr 23, 2012 4:28 pm
Location: Travelling through time and space...

Re: Nagios XI Installation for RHEL Server

Post by slansing »

It may be faster to start over rather than track down, if there is not too much tied up in it "VM."
pmfunder
Posts: 19
Joined: Wed Jul 25, 2012 9:31 am

Re: Nagios XI Installation for RHEL Server

Post by pmfunder »

A system restore will take a lot of our resources. In the meantime, I've narrowed down the issue to the following in the return value of /usr/bin/php -q nagiosql_login.php
I was able to bypass the role/sql database existing errors. Maybe this has something to do with the login error, but it was happening at a previous install before the role/db already existing error came up. Any ideas?

-------------------------------------------
/usr/bin/php -q nagiosql_login.php

#error handling
ret=$?
if [ $ret -gt 0 ]; then
echo "NAGIOSQL LOGIN FAILED!"
exit $ret
fi
User avatar
lmiltchev
Former Nagios Staff
Posts: 13589
Joined: Mon May 23, 2011 12:15 pm

Re: Nagios XI Installation for RHEL Server

Post by lmiltchev »

Run all of the following commands in terminal (you can copy/paste):

Code: Select all

service nagios stop
service npcd stop
service ndo2db stop

userdel -r nagios
groupdel nagcmd

rm -f /etc/sudoers.d/nagiosxi
rm -f /etc/cron.d/nagiosxi

rm -rf /usr/local/nagios
rm -rf /usr/local/nagiosxi
rm -rf /etc/nagiosql
rm -rf /var/www/html/nagiosql
rm -rf /var/lib/mysql
rm -rf /var/lib/pgsql
rm -rf /store/backups

rm -f /etc/httpd/conf.d/nagios.conf
rm -f /etc/httpd/conf.d/nagiosxi.conf
rm -f /etc/httpd/conf.d/nagiosql.conf
rm -f /etc/httpd/conf.d/nrdp.conf
rm -f /usr/local/nrdp/nrdp.conf
service httpd restart

rm -f /etc/xinetd.d/nrpe
rm -f /etc/xinetd.d/nsca
rm -f /etc/xinetd.d/nrdp
service xinetd restart

yum remove mysql postgresql -y

rm -f /root/scripts/automysqlbackup
rm -f /root/scripts/autopostgresqlbackup

cd /tmp/nagiosxi
rm -rf installed.*
./fullinstall
Hopefully, this will get you going. Again - our official guidelines are to install Nagios XI on a clean system.
Be sure to check out our Knowledgebase for helpful articles and solutions!
Locked