I have added the following to the commands.cfg on the nagios-core:
Code: Select all
# 'check_nrpe' command definition
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -t 30 -c $ARG1$ $ARG2$
}
# 'check_opensim' command definition
define command{
command_name check_opensim
command_line $USER1$/check_opensim -C $ARG1$
}
Code: Select all
define service {
host_name tampaserver
service_description OpenSim tampashop
check_command check_nrpe!check_opensim!"mono OpenSim.exe -inidirectory=/home/simulators/tampashop/"
max_check_attempts 2
check_interval 2
retry_interval 2
check_period 24x7
check_freshness 1
contact_groups admins
notification_interval 2
notification_period 24x7
notifications_enabled 1
register 1
}
Code: Select all
command[check_opensim]=/usr/lib/nagios/plugins/check_procs -C $ARG1$
I have installed nrpe-plugins on both host and monitor and nrpe-server on the monitor using apt.
My goal is to be able to define further services in the hosts monitor configuration for different processes.
The process on the monitor using ps -aux:
Code: Select all
simulat+ 25703 1.2 0.2 4468204 146928 pts/5 Ssl+ Feb26 3:15 mono OpenSim.exe -inidirectory=/home/simulators/tampashop/
After changing the path for check_nrpe to where nagios tries to find it I am now getting: (Return code of 255 is out of bounds : (No output on stdout) stderr: connect to address xx.xx.xx.xx port 5666: Connection refused))
There are no firewalls on either machine, but nmap still claims the port to be closed. I added the port to iptables, but that had no effect.