Page 1 of 1

No remote server on Nagios 3.4.0 (work on 3.2.1) [Solved]

Posted: Wed May 09, 2012 5:23 am
by bsfez
Hi,

I successfully set up a Nagios 3.2.1 on squeeze and including remote monitoring of 2 servers.
Using apt-get and basing the install on this tutorial http://www.howtoforge.com/installing-na ... nny-server (outdated but it worked fine :) )
Once this done, i find out that the last version is 3.4.0.
So I installed the 3.4.0 this time downloading from http://www.nagios.org/download
Using the explanation from the official quickstart, http://nagios.sourceforge.net/docs/3_0/ ... buntu.html
Success, working fine my localhost is displayed properly.

So, i installed using the same download method the last version of nrpe (2.13) and "./check_nrpe -H remoteserverip -c check_users" result is ok.

I found out that the config files of the 3.4.0 are in /usr/local/nagios/etc/objects so i create there a config file for my remote host with minimum requirement to see it displayed on Nagios.

Code: Select all

define host{
        use             generic-host
        host_name       remote
        alias           remote
        address         remoteserverip
}
define service{
        use                     generic-service
        host_name               remote
        service_description     HTTP-Server
        check_command           check_http
}
Nada....
I have restarted nagios, apache, check permission, etc... The remote server don't show up on Nagios Dashboard.

I certainly missed something but where ?
It is important to notice that while Nagios 3.4.0 (nagios) don't show me the remote server, Nagios 3.2.1 (nagios3) still running display remote server informations.

Re: No remote server on Nagios 3.4.0 (work fine on 3.2.1)

Posted: Wed May 09, 2012 9:38 am
by mguthrie
Is the new config file that you created (or it's directory) being specified in the main nagios.cfg file?

nagios3 is the Ubuntu team's remix of Nagios. The setup and directory locations do not match a source install of Nagios Core. For a source install, see the docs below:
http://nagios.sourceforge.net/docs/3_0/toc.html

Re: No remote server on Nagios 3.4.0 (work fine on 3.2.1)

Posted: Thu May 10, 2012 12:00 am
by bsfez
Hi mguthrie,

Well, by the time my post was published i believe i found a solution.
I added the remote host(s) definition after line 35 of /usr/local/nagios/etc/nagios.cfg:

Code: Select all

# Definitions for monitoring remote (Linux) hosts
cfg_file=/usr/local/nagios/etc/objects/localhost.cfg
cfg_file=/usr/local/nagios/etc/objects/stable1.cfg
etc...
Not sure it is the right one but... hey it works !

Now i'm fighting with check_nrpe, there too it seams to be some changes.
But it will be another thread if i'm stuck.

Thanks for your help
Bernard

Re: No remote server on Nagios 3.4.0 (work fine on 3.2.1)

Posted: Thu May 10, 2012 9:52 am
by mguthrie
You bet. Just for future reference, if you use the option of:

Code: Select all

cfg_dir=/usr/local/nagios/etc/objects/
Nagios will automatically pick up any config file in the directory so that you don't have to manually at it each time.

Re: No remote server on Nagios 3.4.0 (work fine on 3.2.1)

Posted: Mon May 14, 2012 7:03 am
by bsfez
It wasn't that easy...
I paste you suggestion in nagios.cfg but then have to comment all the other object conf file path to avoid duplicates.

So i, uncomment "cfg_dir=/usr/local/nagios/etc/servers"
Then i create the directory "/usr/local/nagios/etc/servers" and change owner to nagios:nagios.
I placed there all my servers cfg.

Work fine.

Thanks for the suggestion ! ;)