I have ubuntu ec2 instance I want to monitor.I havent installed plugins on NRPE server which is using xinetd but instead I have configured and installed plugins on Nagios server.However except check_ssh nothing gets executed when I test from libexec directory from Nagios server.I have elasticsearch ,cassandra and tomcat plugins and my Boss doesnt want anything on ec2 instance except nrpe.I have already configured all these processes to accept any connections.
-
Do you check NRPE service status on localhost? What results of `/usr/lib/nagios/plugins/check_nrpe -H localhost` ? – Stanislav Ivanov Sep 16 '16 at 15:13
-
NRPE is ok,just wondering can i install plugins only on nagios machine @StanislavIvanov – khakishoiab Sep 28 '16 at 15:29
-
1Plugins should be installed with same machine with NRPE agent. Agent calls plugins by NAGIOS server request and send results. At server you can install plugins only for monitoring of external available services (ping, http, remote sql, ...) – Stanislav Ivanov Sep 29 '16 at 12:05
-
@StanislavIvanov,To run external plugins for tomcat,elasticsearch,cassandra should I install plugins on nagios server.Currently my remote machine accepts nothing but 5666, although 7199,1099,8080 is open on that machine.Please explain as an answer. – khakishoiab Sep 29 '16 at 12:20
1 Answers
We can have two different types of host check:
- direct check (nagios -> command
check_ping(HOSTADDRESS)
-> local plugincheck_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 plugincheck_nrpe(HOSTADDRESS,COMMAND)
-> (network) -> NRPE Server commandCOMMAND
-> local (for NRPE) plugincheck_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 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

- 1,854
- 1
- 16
- 22