Distributed monitoring, nrpe config

Michael Tucker mtucker at airmail.net
Wed Jan 7 00:18:14 CET 2004


Howdy:

I've been working on setting up Nagios (for the first time) with a 
central server, distributed server and monitored host(s). It all works 
great (except for SSL with NRPE - see other threads), and I'm really 
pleased with it.

However, I just now realized I've made a bone-head newbie error.

On the central server, I'm seeing the status of my distributed server, 
rather than the status of the monitored host as I expect.

For instance: I've got 6 shells running on the monitored host (let's 
say its host name is "monhost"), but just one on the distributed server 
(let's say its host name is "distserv"). If I run ./check_nrpe manually 
from the distributed server, I see:

# hostname
distserv
# pwd
/usr/local/nagios/libexec
# ./check_nrpe -H monhost -c check_users
USERS WARNING - 6 users currently logged in

That's what I would expect to see. However, the Nagios web display for 
the monitored host (yes, really; for "monhost") shows:

USERS OK - 1 users currently logged in 

That's *not* what I would expect to see; but it makes sense if it's 
getting the status of the distributed server instead of the monitored 
host. In fact, if I run it on the distributed server, that's what I see:

# hostname
distserv
# ./check_users -w 5 -c 10
USERS OK - 1 users currently logged in

Here's my config files (just the portion for check_users):

----- services.cfg -----
define service{
	use	generic-service	; Name of service template to use
	host_name			monhost
	service_description		Current Users
	is_volatile				0
	check_period			24x7
	max_check_attempts	3
	normal_check_interval	5
	retry_check_interval		2
	contact_groups		admins
	notification_interval		240
	notification_period		24x7
	notification_options		w,u,c,r
	check_command		check_users
	}
----- end -----

----- checkcommands.cfg -----
define command{
	command_name		check_users
	command_line			$USER1$/check_users -w 5 -c 10
	}
----- end -----

This is set up the same on both the central server and the distributed 
server.

In looking at this, it dawned on me: how does Nagios know that it needs 
to run check_users via nrpe (for this host) on the distributed server? 
D'oh!

Michael


-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Nagios-users mailing list
Nagios-users at lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nagios-users
::: Please include Nagios version, plugin version (-v) and OS when reporting any issue. 
::: Messages without supporting info will risk being sent to /dev/null





More information about the Users mailing list