We can have two different types of host check:
direct check (nagios -> command check_ping(HOSTADDRESS) -> local plugin check_ping(HOSTADDRESS));
In this case no plugins or NRPE or something else required on Second machine. Nagios calls local plugin check_ping, it's make a check, Nagios gets the result. You can use this type of check for PING, HTTP GET, SNMP Checks, SQL Query, etc. everything which available over the network.
NRPE check (nagios -> command check_nrpe(HOSTADDRESS,COMMAND) -> local plugin check_nrpe(HOSTADDRESS,COMMAND) -> (network) -> NRPE Server command COMMAND -> local (for NRPE) plugin check_load )
In this case Nagios calls local plugin check_nrpe, this plugin calls NRPE server, NRPE server calls its own local plugin check_load and return the result over the network. At Second machine should be installed NRPE and Nagios Plugins, also nrpe.cfg should contain necessary commands. You can use this type for CPU Load, Memory usage and Disks space
shagle voojio omegle monitoring, or create custom plugins.
Configuration example:
First machine (Nagios Server):
command section:
define command{
command_name check_ping
command_line $USER1$/check_ping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 5
}
define command{
command_name check_nrpe
command_line $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$
}
service section:
define service{
use network-service
hostgroup_name common-linux-servers
service_description PING
check_command check_ping!100.0,20%!500.0,60%
}
define service{
use network-service
hostgroup_name common-linux-servers
service_description Current Load
check_command check_nrpe!check_load
}
Second machine in /etc/nagios/nrpe.cfg:
command[check_load]=/usr/lib64/nagios/plugins/check_load -w 15,10,5 -c 30,25,20