NagiosXI install fails at ImportNagiosQL

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
tstahl
Posts: 7
Joined: Mon May 02, 2011 9:05 am

NagiosXI install fails at ImportNagiosQL

Post by tstahl »

I just installed NagioXI on a fresh install of CentOS
It would seem like Nagios Core was not installed correctly as the conf files are not there.
I have my system info, the info i used for my proxy and the error i recieved as well as an ls from my nagios core etc folder
I am going to attempt to scp the conf files from the vmware image of Nagios that I have but I want to get the manual install to work.
1. CentOS 5.6
2. 64bit
3. Manual Install of XI
4. I am using a proxy, but i followed the wiki for wget and yum?

info from the Wiki
"In /etc/yum.conf :
proxy=http://someproxyserver:port/ # Shouldn't need to be quoted, remember the trailing slash
proxy_username=myname # The username you authenticate to your proxy with, if applicable
proxy_password=mypass # The password you provide to your proxy, if applicable
In /etc/wgetrc :
http_proxy=http://myname:mypass@someproxyserver:port/ # All in one string this time
no_proxy=localhost,127.0.0.0/8,10.0.0.0/8,172.16.0.0/12,192.168.0.0/16 # Hosts to exclude from proxying"

*Update to add service restarts per Sticky*

[root@na nagiosxi]# service mysqld restart
Stopping MySQL: [ OK ]
Starting MySQL: [ OK ]
[root@na nagiosxi]# service postgresql restart
Stopping postgresql service: [ OK ]
Starting postgresql service: [ OK ]


Error: Cannot open config file '/usr/local/nagios/etc/contacttemplates.cfg' for reading: No such file or directory
Error processing object config files!
ERROR: NagiosQL import appears to have failed - exiting. (Reason: Nagios Core configuration is invalid)

[root@na nagiosxi]# ls /usr/local/nagios/etc/
cgi.cfg hosts import nagios.cfg ndo2db.cfg ndomod.cfg nrpe.cfg nsca.cfg pnp resource.cfg send_nsca.cfg services static
Last edited by tstahl on Mon May 02, 2011 12:34 pm, edited 1 time in total.
tstahl
Posts: 7
Joined: Mon May 02, 2011 9:05 am

Re: NagiosXI install fails at ImportNagiosQL

Post by tstahl »

*Update*
I moved the conf from the vmware image to the new server. I moved the files to /usr/local/nagios/etc/import/ but they get deleted in the script it would seem.
So I moved them to /usr/local/nagios/etc/ as well then added the 3 default services and hosts to their respective directories.
Now I get the following error:

RESETTING PERMS
/usr/local/nagiosxi/nom/checkpoints/nagioscore /tmp/nagiosxi/nagiosxi/basedir/scripts
tar: Removing leading `/' from member names
/tmp/nagiosxi
/tmp/nagiosxi/nagiosxi/basedir/scripts
ERROR: Unable to login to NagiosQL on 'localhost' - exiting. If you have a proxy configured, this may be the cause of the problem.
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: NagiosXI install fails at ImportNagiosQL

Post by rdedon »

Hello,
During the initial install did you start of with

Code: Select all

cd /tmp
?
The reason for this could be permissions if it was not run from this directory and can cause several issues.

If so, was anything deviated from here:
http://assets.nagios.com/downloads/nagi ... ctions.pdf ?

Thank you.
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
tstahl
Posts: 7
Joined: Mon May 02, 2011 9:05 am

Re: NagiosXI install fails at ImportNagiosQL

Post by tstahl »

Yes I followed the install to the letter.
All of my commands were run from /tmp/nagiosxi
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: NagiosXI install fails at ImportNagiosQL

Post by rdedon »

Okay,
which version of Nagios XI are you using? Also, did you happen to have to run ./0-yum twice? I have recently seen where this was needed but usually would not get past ./1-prereqs if so.
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
tstahl
Posts: 7
Joined: Mon May 02, 2011 9:05 am

Re: NagiosXI install fails at ImportNagiosQL

Post by tstahl »

yes i did need to run ./0-Yum twice.
I ran wget http://assets.nagios.com/downloads/nagi ... est.tar.gz
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: NagiosXI install fails at ImportNagiosQL

Post by rdedon »

Please reference this post:
http://support.nagios.com/forum/viewtop ... osQL#p7099
Hopefully that will be of some assistance.
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
tstahl
Posts: 7
Joined: Mon May 02, 2011 9:05 am

Re: NagiosXI install fails at ImportNagiosQL

Post by tstahl »

If I were to create a NAT to allow the traffic out of the proxy, Which URL's would I need to point to?
rdedon
Posts: 578
Joined: Sat Nov 20, 2010 4:51 pm

Re: NagiosXI install fails at ImportNagiosQL

Post by rdedon »

Could you try running this:
http://support.nagios.com/wiki/index.ph ... figuration
Also, I am not quite sure what you mean with your post:
If I were to create a NAT to allow the traffic out of the proxy, Which URL's would I need to point to?
Could you elaborate more?
Rene deDon
Technical Team
___
Nagios Enterprises, LLC
Web: http://www.nagios.com
tstahl
Posts: 7
Joined: Mon May 02, 2011 9:05 am

Re: NagiosXI install fails at ImportNagiosQL

Post by tstahl »

I am running all default hosts and services.
I want to edit /etc/hosts to allow the hosts to get through our proxy to get to api.nagios.org.
Is there anything else I need to do?
Locked