I am trying to configure Nagios to checks of internal hosts of a network in different locations. According I was investigating, this can be accomplished through a remote NRPE daemon at each location. This has the advantage that only is necessary to to open a single port 5666:
http://nagios.sourceforge.net/docs/3_0/ ... hecks.html
Unfortunately I did not find configuration examples about this scenary. The only source from which I could get something to test was the following:
http://books.google.com.ar/books?id=Iuj ... ks&f=false
I was doing some testing on my local network that were not satisfactory. Following the example of the book for ping checks, I did the following:
Configuration of Nagios Core installation:
===================================
I use "check-host-alive-external" on the template:
Code: Select all
define host{
name linux-server ; 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-external ; Default command to check Linux hosts
notification_period workhours ; 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
hostgroups linux-servers ; DGB - 20090719
register 0 ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL HOST, JUST A TEMPLATE!
}
Code: Select all
define command {
command_name check-host-alive-external
command_line check_nrpe_external!check_ping
}
define command {
command_name check_nrpe_external
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS:192.168.2.245$ -c $ARG1$ -a $HOSTADDRESS$
}
Configuration on intermediary NRPE daemon:
======================================
Code: Select all
allowed_hosts=192.168.2.210
[...]
dont_blame_nrpe=1
[...]
command[check_ping]=/usr/local/nagios/libexec/check_ping -H $ARG1$ -w 3000.0,80% -c 5000.0,100% -p 5
Code: Select all
[1408304938] Warning: Return code of 127 for check of host 'ws1' was out of bounds. Make sure the plugin you're trying to run actually exists.
I would appreciate if you could tell me what might be misconfigured. If you also have an example for this scenario, I would appreciate if you can share it.
Thank you in advance for your replies.
Best regards,
Daniel