Nagios plugins location

Support forum for Nagios Core, Nagios Plugins, NCPA, NRPE, NSCA, NDOUtils and more. Engage with the community of users including those using the open source solutions.
Post Reply
TuqueroIMK852
Posts: 9
Joined: Tue Feb 15, 2022 6:44 am

Nagios plugins location

Post by TuqueroIMK852 »

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 echatrandom echatspin any connections.
Last edited by TuqueroIMK852 on Mon Oct 31, 2022 2:33 am, edited 1 time in total.
gormank
Posts: 1114
Joined: Tue Dec 02, 2014 12:00 pm

Re: Nagios plugins location

Post by gormank »

If you've set up nrpe on the server to be monitored and nrpe is listening, you run commands via check_nrpe. Commands are in nrpe.cfg and the nrpe include dir. The commands are translated to plugins to run by nrpe.
SuomyNonaPatri
Posts: 11
Joined: Wed Feb 23, 2022 7:41 am

Re: Nagios plugins location

Post by SuomyNonaPatri »

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
Post Reply