Remote Host Does Not Appear in Web Interface


I am new to Nagios and am having difficulty getting a remote host to display in the web interface. The local host and preconfigured services display just fine. My monitoring server is running Open SUSE 11.3 with Nagios installed from the distribution media and the machine is patched current. The remote host is also an Open SUSE 11.3 machine with NRPE and NRPE Plug-ins installed.

I follwoed the manuals for installing NAgios and NRPE and the manual checks run fine. The check of configuration for Nagios yields this output:

nagios -v …/nagios.cfg

Nagios Core 3.2.1
Copyright © 2009-2010 Nagios Core Development Team and Community Contributors
Copyright © 1999-2009 Ethan Galstad
Last Modified: 03-09-2010
License: GPL

Reading configuration data…
Read main config file okay…
Processing object config file ‘/etc/nagios/objects/commands.cfg’…
Processing object config file ‘/etc/nagios/objects/contacts.cfg’…
Processing object config file ‘/etc/nagios/objects/timeperiods.cfg’…
Processing object config file ‘/etc/nagios/objects/templates.cfg’…
Processing object config file ‘/etc/nagios/objects/localhost.cfg’…
Read object config files okay…

Running pre-flight check on configuration data…

Checking services…
Checked 8 services.
Checking hosts…
Checked 1 hosts.
Checking host groups…
Checked 1 host groups.
Checking service groups…
Checked 0 service groups.
Checking contacts…
Checked 1 contacts.
Checking contact groups…
Checked 1 contact groups.
Checking service escalations…
Checked 0 service escalations.
Checking service dependencies…
Checked 0 service dependencies.
Checking host escalations…
Checked 0 host escalations.
Checking host dependencies…
Checked 0 host dependencies.
Checking commands…
Checked 25 commands.
Checking time periods…
Checked 5 time periods.
Checking for circular paths between hosts…
Checking for circular host and service dependencies…
Checking global event handlers…
Checking obsessive compulsive processor commands…
Checking misc settings…

Total Warnings: 0
Total Errors: 0

Things look okay - No serious problems were detected during the pre-flight check

A manual check of the remote host yields this output:

/usr/lib/nagios/plugins/check_nrpe -H target -c check_users

USERS OK - 3 users currently logged in |users=3;5;10;0

Commands.cfg was modified thusly:

‘check_nrpe’ command definition

define command {
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$

I created a template file for monitoring Linux hosts using the pattern in templates.cfg Its contents are:
define host{
name linux-template ; The name of this host template
use generic-host ; This template inherits other values from the generic-host template
check_period 24x7 ; By default, Linux hosts are checked round the clock
check_interval 5 ; Actively check the host every 5 minutes
retry_interval 1 ; Schedule host check retries at 1 minute intervals
max_check_attempts 10 ; Check each Linux host 10 times (max)
check_command check-host-alive ; Default command to check Linux hosts
notification_period 24x7 ; Linux admins hate to be woken up, so we only notify during the day
; Note that the notification_period variable is being overridden from
; the value that is inherited from the generic-host template!
notification_interval 120 ; Resend notifications every 2 hours
notification_options d,u,r ; Only send notifications for specific host states
contact_groups admins ; Notifications get sent to the admins by default

I also created a cfg file for the remote host named target. (Not original but functional anyway.)

Define monitored host

define host{
use linux-template ;Inherit default valuses from Linux template
host_name target ;Server to be monitored
alias target
register 1

Define services to be monitored

CPU Load service definition

define service{
use generic-service ;Service provided as part of nrpe.cfg
host_name target
service_description CPU Load
check_command check_nrpe!check_load

Current Users service definitions

define service{
use generic-service
host_name target
service_descriptiom Current Users
check_command check_nrpe!check_users

Total Processes service definitions

define service{
use generic-service
host_name target
service_descriptiom Total Processes
check_command check_nrpe!check_total_procs

The nagios.log file doesn’t show any errors:
[1295561056] Caught SIGTERM, shutting down…
[1295561056] Successfully shutdown… (PID=23865)
[1295561057] Nagios 3.2.1 starting… (PID=24458)
[1295561057] Local time is Thu Jan 20 16:04:17 CST 2011
[1295561057] LOG VERSION: 2.0
[1295561057] Finished daemonizing… (New PID=24459)

Any help would be appreciated.


and did you tell nagios it has to read a new cfg file? :slight_smile:

go to nagios.cfg and check the cfg file defintiions… (i’d recommend creating a hosts.cfg file instead oif one file per host… but it’s your choice ) then check the config again and reload (remember do NOT use restart) :slight_smile:


Thank you! That worked! :lol: