NagiosXI Server Migration Problem

This support forum board is for support questions relating to Nagios XI, our flagship commercial network monitoring solution.
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

NagiosXI Server Migration Problem

Post by srrhd »

Hi,

We need to migrate our NagiosXI 2011R2.1 on a more powerful server.

The originate server is a i386 CentOS 5, and the new one a x_64 CentOS 6.

After the NagiosXI installation on the new server, we have followed the Backing_Up_And_Restoring_XI.pdf to implement the configuration on the new installation.

The problem is that after the backup restoration on the new server, the System show that Performance Garpher and the Database Backend are not running. When trying to start both from the Administration Page:
  • * Performance grapher: it prompt a message saying "An error occured processing your request."
    * Database Backend: nothing is prompted.
We tryied to investigate the logs into "/usr/local/nagios/var", "/usr/local/nagiosxi/var" and "/var/log/messages" but found any informations that give a clue on the problem.

So here i am, asking for any ideas that could help.

Aurelien.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, graph Explorer, Latest Alert
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: NagiosXI Server Migration Problem

Post by scottwilkerson »

My guess is we have a permissions problem, but not 100% sure. Can I have you run the following procedure
http://library.nagios.com/library/produ ... -nagios-xi

Then lets do the following:

Code: Select all

service nagios stop
service ndo2db stop
service npcd stop
service mysqld stop
service postgresql stop
service nagiosxi stop

service npcd start
service ndo2db start
service mysqld start
service postgresql start
service nagios start
service nagiosxi start
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: NagiosXI Server Migration Problem

Post by scottwilkerson »

I see the problem...

When switching version or architectures this can be a problem because the backup is overwriting the compiled binaries.

Here is a solution.

If you still have the /tmp/nagiosxi install directory do the following:

Code: Select all

cd /tmp/nagiosxi
rm -f installed.subcomponents
./A-subcomponents
If you have already deleted the /tmp/nagiosxi install directory do the following:

Code: Select all

cd /tmp
wget http://assets.nagios.com/downloads/nagiosxi/xi-2011-latest.tar.gz
tar xzf xi-2011-latest.tar.gz
cd /tmp/nagiosxi
touch installed.mrtg
./A-subcomponents
Last edited by scottwilkerson on Wed Feb 29, 2012 3:06 pm, edited 1 time in total.
Reason: missed one item if you have already deleted the /tmp/nagiosxi install directory do the following
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: NagiosXI Server Migration Problem

Post by srrhd »

Thanks ! Your second idea was the good one !

In case this thread would interest someone else, after following this solution restart the Performance grapher and the Database Backend works and we nhad to restart the Monitoring Engine to have the whole system working properly.

We will test the server today and will provide feedback if anything got a wrong behaviour.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, graph Explorer, Latest Alert
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: NagiosXI Server Migration Problem

Post by srrhd »

We have no more performance graphs, any.

Following the FAQ and executing

Code: Select all

./check_rrdtraf -f '/var/lib/mrtg/192.168.6.1_1.rrd' -w 1 -c 2
It appears thats the RRD files are also compiled depending on the architecture:

Code: Select all

[root@perfdata]# /usr/local/nagios/libexec/check_rrdtraf -f '/var/lib/mrtg/192.168.1.1_1.rrd' -w 1 -c 2
ERROR: This RRD was created on another architecture
OK - Current BW in: 0bps Out: 0bps|in=0b/s;1;2 out=0b/s;1;2
Google seems to know a method to convert the rrd files. I'll let you know if it works.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, graph Explorer, Latest Alert
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: NagiosXI Server Migration Problem

Post by srrhd »

OK so that was the trick, we had to convert all the RRD files.

To do so:
On the old i386 server:

Code: Select all

cd /usr/local/nagios/share/perfdata/
for i in `find -name "*.rrd"`; do rrdtool dump $i > $i.xml; done
tar -cvzf perfdata.tar.gz */*.rrd.xml
for i in `find -name "*.rrd.xml"`; do rm -f $i; done
Then transfert the archive to the new server in the same directory.
On the new x_64 server:

Code: Select all

service nagiosxi stop
service npcd stop
service ndo2db stop
service nagios stop
cd /usr/local/nagios/share/perfdata/
for i in `find -name "*.rrd"`; do rm -f $i; done
tar -xvzf perfdata.tar.gz
for i in `find -name "*.rrd.xml"`; do rrdtool restore $i `echo $i |sed s/.xml//g`; done
for i in `find -name "*.rrd"`; do chown nagios:nagios $i; done
for i in `find -name "*.rrd.xml"`; do rm -f $i; done
service nagios start
service ndo2db start
service npcd start
service nagiosxi start
Now our graphs are back with just the loose of time for the commands to execute, depending on the number of hosts and services.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, graph Explorer, Latest Alert
scottwilkerson
DevOps Engineer
Posts: 19396
Joined: Tue Nov 15, 2011 3:11 pm
Location: Nagios Enterprises

Re: NagiosXI Server Migration Problem

Post by scottwilkerson »

We really appreciate you documenting this so others can benefit.

Thank you.
Former Nagios employee
Creator:
Human Design Website
Get Your Human Design Chart
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: NagiosXI Server Migration Problem

Post by srrhd »

Hi,

We are trying to get the new x_64 server as the production one. For this we simply swapped the IPs between the i386 and the x_64.

After the swap, we had no more perf data. After following the Repairing_the_Nagios_XI_Database, the graphs went back. Now evrything looks good, except for all our bandwidth services that use the check_xi_service_mrtgtraf ("Network Switch / Router Wizard"). It looks like the results are divided by 100000 and so appears in ub/s instead of Mb/s.

This problem seems to be similar to this thread (http://support.nagios.com/forum/viewtop ... t=mrtgtraf) but yum do not provides any 2.17 mrtg version.
Here are what we got:
  • [root@NagiosXI lib]# rpm -qa | grep mrtg
    nagios-plugins-mrtg-1.4.15-2.el6.x86_64
    mrtg-libs-2.16.2-5.el6.x86_64
    mrtg-2.16.2-5.el6.x86_64
    nagios-plugins-mrtgtraf-1.4.15-2.el6.x86_64
We tryied to delete the bandwith services for one hosts and recreate them through the wizard but the problem persists.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, graph Explorer, Latest Alert
mguthrie
Posts: 4380
Joined: Mon Jun 14, 2010 10:21 am

Re: NagiosXI Server Migration Problem

Post by mguthrie »

I know we've come across this before, I'll have the developer who found the solution chime in once he gets in.

Also, I wanted to thank you for posting your RRD migration commands, I posted them to our wiki:
http://support.nagios.com/wiki/index.ph ... Install.3F
That's something we hadn't tried before, great solution!
User avatar
srrhd
Posts: 131
Joined: Thu May 19, 2011 6:15 am

Re: NagiosXI Server Migration Problem

Post by srrhd »

Your welcome, having a well detailed forum is better for all of us, and with all works you are doing on XI, this is the minimum that we can do.

Concerning the problem of unit using mrtgtraf, i don't know if the developper will have a straight solution or if he will need to do some devel. In the last case, we also use the check_snmp_int.pl, one great thing with this plugins is that it provides the perf data and monitore the status of the interface all in the same service. I guess this may lighten the server as it devide by 2 the number of services. I will ask for this in the Nagios Ideas Forum.

Cheers,
Aurelien.
Configuration:
Nagios XI 2014R2.5
manually upgraded on 64bits CentOS 6
with nothing extra, no gnome, no proxy, no SSL
Add-ons: Hypermap, Minemap, Ping Action, Traceroute Action, Network Replay, graph Explorer, Latest Alert