4

I installed nagios nrpe on a remote machine from Ubuntu repository

sudo apt-get install nagios-nrpe-server , and plugins with:

 sudo apt-get install nagios-plugins-basic nagios-plugins nagios-plugins-extra

After the installation, check_nrpe is missing in /usr/lib/nagios/plugins.

How could I resolve this problem ? I'm really new to this nagios.

7

You have installed the nagios-nrpe-server package on the server you want to monitor from Nagios. This is indeed the package providing the NRPE daemon you need on any server to be monitored this way.

On your Nagios server, you need to install the nagios-nrpe-plugin package. This package will install the check_nrpe plugin on your Nagios server :

> sudo apt-get install nagios-nrpe-plugin
> cd /usr/lib/nagios/plugins/
> ls check_nr*
check_nrpe
  • i agree when i am trying to install nagios-nrpe-plugin it will starts install nagios3 and apache2,php and so many other things – sivashanmugam Jul 2 '14 at 15:14
  • @sivashanmugam: Yes of course, you need these packages to create a functional Nagios3 server installation. – Benoit Jul 2 '14 at 18:08
  • i almost installed nagios in my server .. why again i am going to install it on my remote client machine – sivashanmugam Jul 3 '14 at 5:13
  • 1
    @sivashanmugam: It is written in my answer : On your Nagios server, you need (...). Do you know that the check_nrpe plugin is needed on your Nagios server only, to let your Nagios server check remote hosts where the nrpe_server is installed ? check_nrpe is not needed on the machine where you have nrpe_server installed. – Benoit Jul 3 '14 at 7:08
1

Siva, after installation without any errors then you can goahead for configure your nrpe.cfg file with the following values that is required in your environment.

  1. allowed_hosts
  2. dont_blame_nrpe
  3. un comment the commands at the bottom which you wish to monitor.

Example of nrpe.cfg file changes here alllowed_hosts it can have remote server and Nagios server ip with comma separated.

allowed_hosts=198.211.117.129

dont_blame_nrpe=1

Now at bottom of the file

command[check_ram]=/usr/local/nagios/libexec/check_mem.pl -w 10 -c 5 -f
command[check_swap]=/usr/local/nagios/libexec/check_swap -w 20 -c 10
command[check_ping]=/usr/local/nagios/libexec/check_ping -H $ARG1$ -w $ARG2$ -c $ARG3$ -p 5
command[check_disk]=/usr/local/nagios/libexec/check_disk -w 20% -c 10%

After every nrpe.cfg file changes you need to restart the nrpe service. If you wish to write customized SHELL script that could start/stop the nrpe you can place it in the /etc/init.d/nrpe.

other option is using iptable enabled and using service at operating system level.

service nagios-nrpe-server restart

Detailed steps here

  • Hi Pavan i followed ur steps but getting following error CHECK_NRPE: Socket timeout after 10 seconds. – sivashanmugam Jul 2 '14 at 15:12
  • siva, what is the command you have given? is it checking local machine or remote? If it is local check 2 things nrpe service running or not, other is firewall for 5666 is allowed. If it is from Nagios server side check_nrpe executing for remote server then check ping is working or not. then try to with telnet to ip, port so that you can confirm that connectivity is fine. Then you can look for command def in remote box side. see this link: sharadchhetri.com/2013/06/11/… – PavanDevarakonda Jul 3 '14 at 3:47

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.