NRPE in Nagios 2.11 to NRPE in Nagios 4.0.7
Posted: Mon Aug 11, 2014 10:09 pm
Hi
I am new to Linux and Nagios.
We have built a new Ubuntu server version 14.0.4 and have installed Nagios 4.0.7 and version NRPE 2.15 from source. The old version was from apt-get/RPM
Our old version of Nagios was 2.11 and is running NRPE version 2.8.1
I can log in to the Nagios GUI fine,
After I have copied over all the hosts from the old server and have included an example below.
define host {
use generic-host
host_name WFL_IFFP
alias WFL GAL Sync Server
address x.x.x.x (removed ip address)
}
define service {
host_name WFL_IFFP
service_description Standard Win2k3 Services Check
check_command nt_check_win2k3_std
use generic-service
}
When I run
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
I get alot of the following errors
Error: Service check command 'nt_check_win2k3_std' specified in service 'Standard Win2k3 Services Check' for host 'WFL_IFFP' not defined anywhere!
I know this is because I have nothing in my nrpe.cfg file.
Looking at the old nrpe,cfg file the config looks like the following
define command{
command_name nt_check_win2k3_std
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c nt_check_win2k3_std
}
The new nrpe.cfg file looks completely different
# This directive allows you to include definitions from config files (with a
# .cfg extension) in one or more directories (with recursion).
#include_dir=<somedirectory>
#include_dir=<someotherdirectory>
# COMMAND DEFINITIONS
# Command definitions that this daemon will run. Definitions
# are in the following format:
#
# command[<command_name>]=<command_line>
#
# When the daemon receives a request to return the results of <command_name>
# it will execute the command specified by the <command_line> argument.
#
# Unlike Nagios, the command line cannot contain macros - it must be
# typed exactly as it should be executed.
#
# Note: Any plugins that are used in the command lines must reside
# on the machine that this daemon is running on! The examples below
# assume that you have plugins installed in a /usr/local/nagios/libexec
# directory. Also note that you will have to modify the definitions below
# to match the argument format the plugins expect. Remember, these are
# examples only!
# The following examples use hardcoded command arguments...
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
How can I get the config from the old nrpe.cfg to the new servers nrpe.cfg?
Can I just edit them and put the correct path in and copy it into the new file like so?
define command{
command_name nt_check_win2k3_std
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c nt_check_win2k3_std
}
I appreciate any assistance on how I can get the old config into the new server, if I need to change the syntax/ layout of the old nrpe.cfg that is fine. I just need to know what it should look like.
thanks in advance
Bryce
I am new to Linux and Nagios.
We have built a new Ubuntu server version 14.0.4 and have installed Nagios 4.0.7 and version NRPE 2.15 from source. The old version was from apt-get/RPM
Our old version of Nagios was 2.11 and is running NRPE version 2.8.1
I can log in to the Nagios GUI fine,
After I have copied over all the hosts from the old server and have included an example below.
define host {
use generic-host
host_name WFL_IFFP
alias WFL GAL Sync Server
address x.x.x.x (removed ip address)
}
define service {
host_name WFL_IFFP
service_description Standard Win2k3 Services Check
check_command nt_check_win2k3_std
use generic-service
}
When I run
/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
I get alot of the following errors
Error: Service check command 'nt_check_win2k3_std' specified in service 'Standard Win2k3 Services Check' for host 'WFL_IFFP' not defined anywhere!
I know this is because I have nothing in my nrpe.cfg file.
Looking at the old nrpe,cfg file the config looks like the following
define command{
command_name nt_check_win2k3_std
command_line /usr/lib/nagios/plugins/check_nrpe -H $HOSTADDRESS$ -c nt_check_win2k3_std
}
The new nrpe.cfg file looks completely different
# This directive allows you to include definitions from config files (with a
# .cfg extension) in one or more directories (with recursion).
#include_dir=<somedirectory>
#include_dir=<someotherdirectory>
# COMMAND DEFINITIONS
# Command definitions that this daemon will run. Definitions
# are in the following format:
#
# command[<command_name>]=<command_line>
#
# When the daemon receives a request to return the results of <command_name>
# it will execute the command specified by the <command_line> argument.
#
# Unlike Nagios, the command line cannot contain macros - it must be
# typed exactly as it should be executed.
#
# Note: Any plugins that are used in the command lines must reside
# on the machine that this daemon is running on! The examples below
# assume that you have plugins installed in a /usr/local/nagios/libexec
# directory. Also note that you will have to modify the definitions below
# to match the argument format the plugins expect. Remember, these are
# examples only!
# The following examples use hardcoded command arguments...
command[check_users]=/usr/local/nagios/libexec/check_users -w 5 -c 10
command[check_load]=/usr/local/nagios/libexec/check_load -w 15,10,5 -c 30,25,20
command[check_hda1]=/usr/local/nagios/libexec/check_disk -w 20% -c 10% -p /dev/hda1
command[check_zombie_procs]=/usr/local/nagios/libexec/check_procs -w 5 -c 10 -s Z
command[check_total_procs]=/usr/local/nagios/libexec/check_procs -w 150 -c 200
How can I get the config from the old nrpe.cfg to the new servers nrpe.cfg?
Can I just edit them and put the correct path in and copy it into the new file like so?
define command{
command_name nt_check_win2k3_std
command_line /usr/local/nagios/libexec/check_nrpe -H $HOSTADDRESS$ -c nt_check_win2k3_std
}
I appreciate any assistance on how I can get the old config into the new server, if I need to change the syntax/ layout of the old nrpe.cfg that is fine. I just need to know what it should look like.
thanks in advance
Bryce