I beleive I have the remote machine that the plugin is running on configured correctly, since I can run the following commands via comand line from the server, querying the remote machine, and get the right results.
(hostnames and IPs sanitized)
Code: Select all
blackbox (linux) # /usr/local/nagios/libexec/check_nrpe -H (remoteIPADDRESS) -c check_swap
SWAP OK - 100% free (8003 MB out of 8015 MB) |swap=8003MB;1603;801;0;8015
blackbox (linux) # /usr/local/nagios/libexec/check_nrpe -H (remoteIPADDRESS) -c check_load
OK - load average: 0.06, 0.16, 0.17|load1=0.060;15.000;30.000;0; load5=0.160;10.000;25.000;0; load15=0.170;5.000;20.000;0;
blackbox (linux) # /usr/local/nagios/libexec/check_nrpe -H (remoteIPADDRESS) -c check_total_procs
PROCS CRITICAL: 345 processes | procs=345;150;200;0;
blackbox (linux) #
I think I am good to go, I setup the commands.cfg and the other configs:
Here's linux-box.cfg:
Code: Select all
blackbox (linux) # cat linux-box.cfg
## Modified Linux Host Template ##
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
register 0 ; DONT REGISTER THIS - ITS A TEMPLATE
}
## Default
define host{
use linux-box ; Inherit default values from a template
host_name s000000 ; The name we're giving to this server
alias BeanStation ; A longer name for the server
address xxx.xxx.xx.xxx ; IP address of Remote Linux host
}
define service{
use generic-service
host_name s000000
service_description CPU Load
check_command check_nrpe!check_load
}
define service{
use generic-service
host_name s000000
service_description Total Processes
check_command check_nrpe!check_total_procs
}
define service{
use generic-service
host_name s000000
service_description Current Users
check_command check_nrpe!check_users
}
define service{
use generic-service
host_name s000000
service_description disk Monitoring
check_command check_nrpe!check_disk_root
}
define service{
use generic-service
host_name s000000
service_description swap Monitoring
check_command check_nrpe!check_swap
}
Code: Select all
cfg_file=/usr/local/nagios/etc/linux-box.cfg
Code: Select all
blackbox (linux) # cat commands.cfg
###############################################################################
# NRPE CHECK COMMAND
#
# Command to use NRPE to check remote host systems
###############################################################################
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
blackbox (linux) #
Code: Select all
# Sets $USER1$ to be the path to the plugins
$USER1$=/usr/local/nagios/libexec
yet, when I try to run a verify on the config, I get all these errors.
Code: Select all
blackbox (linux) # /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
Nagios Core 4.0.7
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 06-03-2014
License: GPL
Website: http://www.nagios.org
Reading configuration data...
Read main config file okay...
Read object config files okay...
Running pre-flight check on configuration data...
Checking objects...
Error: Service check command 'check_nrpe!check_load' specified in service 'CPU Load' for host 's00000' not defined anywhere!
Error: Service check command 'check_nrpe!check_users' specified in service 'Current Users' for host 's000000' not defined anywhere!
Error: Service check command 'check_nrpe!check_total_procs' specified in service 'Total Processes' for host 's000000' not defined anywhere!
Error: Service check command 'check_nrpe!check_disk_root' specified in service 'disk Monitoring' for host 's000000' not defined anywhere!
Error: Service check command 'check_nrpe!check_swap' specified in service 'swap Monitoring' for host 's0000000' not defined anywhere!
Checked 13 services.
Checked 2 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 1 contacts.
Checked 1 contact groups.
Checked 24 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 2 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...
Total Warnings: 0
Total Errors: 5
***> One or more problems was encountered while running the pre-flight check...
Check your configuration file(s) to ensure that they contain valid
directives and data defintions. If you are upgrading from a previous
version of Nagios, you should be aware that some variables/definitions
may have been removed or modified in this version. Make sure to read
the HTML documentation regarding the config files, as well as the
'Whats New' section to find out what has changed.
I'm drawing a blank, I feel like I may have mis-typed something, or is there some other glaring error I have omitted?
Thanks for reading this wall.