Remote host not display



I am a newbie in Nagios. I installed Nagios 3 with NRPE for remote Linux server monitor.
I created a remotehost.cfg file (Actually copied from localhost.cfg file) under /usr/local/nagios/etc/objects for my remote host. It looks like this

Define a host for the local machine

define host{
name linux-box ; Name of this template
use generic-host ; Inherit default values
check_period 24x7
check_interval 5
retry_interval 1
max_check_attempts 10
check_command check-host-alive
notification_period 24x7
notification_interval 30
notification_options d,r
contact_groups admins

define host{
use linux-server ; This host definition will inherit all variables that are defined; in (or inherited by) the linux-server host template definition.

    host_name               remote1
    alias                         remote1

I restart nagios and went to the web interface, the remote host is not showing up. Only the loalhost there. I waited for hours and it still not showing up.

Can anyone help me?

Thank you so very much in advance.



I suspect it could be because you’ve called your template ‘linux-box’ and you are inheriting a template called ‘linux-server’


Thank you. This has been fixed.

Now, there is another problem I had. In the server I see check_mysql under /usr/local/src/nagios-plugins-1.4.11/plugins/, but I moved the same install package over to the client and install it, the check_mysql is not there. Not sure why.

can anyone help?


Perhaps it cannot find your mysql install. Try adding –with-mysql=DIR to your configure statement and re-install - the directory ‘DIR’ that you supply to the argument should be the one that contains bin/mysql_config as per the configure help statement:

  --with-mysql=DIR        Locates mysql libraries. Expects
                          DIR/bin/mysql_config. Default to search for
                          mysql_config in PATH




I did include this line
./configure --prefix=/usr/local/nagios --with-cgiurl=nagios/cgi-bin --with-mysql=/usr/local/mysql/bin/mysql_config

I can see mysql_config in the right place, but the check_mysql just not in the /usr/local/nagios/libexec/




It should be just --with-mysql=/usr/local/mysql as it will look within that directory for bin/mysql_config




You’re da man.
get that fixed.
However, when I try to use check_mysql on it gave me this error
check_mysql: error while loading shared libraries: : cannot open shared object file: No such file or directory

Do you know what happen?




Do you have that library on your system somewhere?


yes, I have the lib on /usr/local/mysql and I just linked it there, now it worked. Thanks a bunch.

Do you know where can I find some service configuration format template? for example, when I configure check_ping I will have to put:
check_command check_nrpe!check_ping!100.0,20%!500.0,60%
on the monitoring server’s .cfg file.

on the other hand, I also need to put something like the following on the client’s nrpe.cfg file
command[check_ping]=/usr/local/nagios/libexec/check_ping -w 100.0,20% -c 500.0,60%

How do I know how to define the format for those threshold on other check_xxxxx