Need help upgrading Nagios

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Locked
Carlos
Posts: 6
Joined: Fri Jul 13, 2012 9:32 am

Need help upgrading Nagios

Post by Carlos »

Greetings everyone.

First of all, sorry for my mispelled/bad english, spanish junior IT speaking :)

I'll explain the reason why we are attemping to upgrade nagios first, maybe there is another solution to the problem, and then why I cannot be sure of having upgrade it.

We where using Nagios 3.0.6 with no problem, the last IT configured it from the beggining, and I have no idea how it was made.

Since this monday we are having false alarms in the monitor, well they are not false at all, nagios box really lose 80% of the connectivity (Pings and so) with the monitored machines, when any other machine can perfectly ping nagios box and monitored machines with no problem, so our monitor is full of random spam.
We though about a network problem, checked the DNS for duplicated IP's (since we virtualized nagios box 3 months ago), changed MAC from nagios box and reseted the switches, moved the box between physical machines, switched IP's yet nothing solved it.
Config file seems good as the -v check shows no problems, the service can be restarted, but it won't solve it.
It doesn't seems random at all, seems to have a pattern between some hours.

As we where unable to solve it, the next step is thinking that the box went "nuts" and maybe an upgrade solved it, yet when I follow the manual I can't be 100% sure it was upgraded, our HTTP page still shows version 3.0.6 and not 3.4.1, is there any way to check through the box what version I am using?

Could it be that the upgrade tutorial is just set for "default" folders and as who installed it seems like he did in another folder (I have to check -v against /root/nagios/etc/nagios.cfg) and I need to somehow point it over that folder?

Hope you can help me guys, as you see, I'm not really an Ubuntu nor Nagios expert :D

The nagios Box is virtualized in Ubuntu under Hyper-V.

Ill gladly add any info I lack to trobleshoot either our actual problem with nagios or the upgrade!
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Need help upgrading Nagios

Post by agriffin »

Carlos wrote:Could it be that the upgrade tutorial is just set for "default" folders and as who installed it seems like he did in another folder (I have to check -v against /root/nagios/etc/nagios.cfg) and I need to somehow point it over that folder?
Yes, this is most likely the problem. You should have run the configure script with your custom directory locations. Undo what you did by removing /usr/local/nagios and try again -- './configure --help' should list the options for you.
Carlos
Posts: 6
Joined: Fri Jul 13, 2012 9:32 am

Re: Need help upgrading Nagios

Post by Carlos »

Hi agriffin.

Already tried that too, didn't work or at least webpage still shows 3.0.6 version, I'll post my steps, maybe I'm wrong anywhere:
./configure --prefix=/etc/nagios3 --with-command-group=******
( ls -l of /etc/nagios3 is like this, maybe I'm messing nagios3 folders, there are plenty of them I don't really know at the moment which is nagios using
-rw-r--r-- 1 nagios nagios 1882 jun 30 2009 apache2.conf
-rw-r--r-- 1 nagios nagios 10767 jul 2 2009 cgi.cfg
-rw-r--r-- 1 nagios nagios 4439 jun 20 16:52 commands.cfg
-rw-r--r-- 1 root root 4336 jun 11 19:31 commands.cfg.old
-rw-r--r-- 1 root root 3639 nov 8 2011 commands.save.cfg
drwxr-xr-x 2 nagios nagios 1024 jun 25 17:25 conf.d
-rw-r--r-- 1 nagios nagios 26 jul 21 2009 htpasswd.users
-rw-r--r-- 1 nagios nagios 42865 jul 21 2009 nagios.cfg
drwxr-xr-x 2 nagios nagios 1024 jun 26 13:20 objects
-rw-r----- 1 nagios nagios 1370 nov 8 2011 resource.cfg
drwxr-xr-x 2 nagios nagios 1024 jul 21 2009 stylesheets
-rw-r--r-- 1 root root 41862 jun 12 21:59 windows.cfg.otrs
)
make all
make install
/usr/local/nagios/bin/nagios -v /etc/nagios3/nagios.cfg
/etc/init.d/nagios3 restart (Yeah, I still don't know why our service is called nagios3 and not nagios, could it be a problem too?)

I refresh nagios page, and nothing has seem to change, not even home page.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Need help upgrading Nagios

Post by agriffin »

What kind of system is this? The "nagios3" thing probably means you installed Nagios from a Debian or Ubuntu package originally, but the version is pretty old.
Carlos
Posts: 6
Joined: Fri Jul 13, 2012 9:32 am

Re: Need help upgrading Nagios

Post by Carlos »

Linux version 2.6.26-1-686 (Debian 2.6.26-13lenny2) under Hyper-V
Nagios version 3.0.6, as front-end tolds December 1 2008.
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Need help upgrading Nagios

Post by agriffin »

Okay, you should uninstall the version of Nagios from apt:

Code: Select all

apt-get remove $(dpkg-query --showformat '${binary:Package}\n' -W '*nagios3*')
Now reinstall Nagios from source again using these instruction. They were written for Ubuntu but should also work fine for Debian (by the way, you should probably upgrade your system since Debian Lenny has reached end-of-life). You will need to migrate your config files from /etc/nagios3 to /etc/nagios and this will require that you change some filenames in your configuration. Your nagios.cfg will need to point at your new config file locations and $USER1$ will need to be /usr/local/nagios/libexec.
Carlos
Posts: 6
Joined: Fri Jul 13, 2012 9:32 am

Re: Need help upgrading Nagios

Post by Carlos »

Thanks a lot Agriffin, Nagios updated and without any config loss. I really appreciate the info given :)O
agriffin
Posts: 876
Joined: Mon May 09, 2011 9:36 am

Re: Need help upgrading Nagios

Post by agriffin »

Glad I could help!
Locked