First, you need to install the nagios-nrpe-server. There is a nagios-nrpe-plugin but that’s not what you need because that is just the plugin and you need this daemon (Linux equivalent of a Windows Service for all you Windows guys).
sudo apt-get install nagios-nrpe-server
next, we should check and make sure that the service is actually running. We can do this two ways
sudo ps -Al | grep nrpe
This will show a line where the process is started. If it just comes back without stating anything something is wrong. Another check is to make sure you machine is listening on the nrpe port
netstat -an | grep 5666
Next, we need to set up the Nagios server to be able to check our machine.
sudo nano /etc/nagios/nrpe.cfg
and change
allowed_hosts=127.0.0.1
to
allowed_hosts=127.0.0.1,x.x.x.x
where “x.x.x.x” is the ip address of your nagios server. Now restart the nrep daemon so it reloads the settings
sudo /etc/init.d/nagios-nrpe-server restart
Now go on the Nagios server and run the following command
/usr/local/nagios/libexec/check_nrpe -H y.y.y.y
where “y.y.y.y” is the ip address of the machine you just installed nrpe on. If it works it will respond with the version of NRPE you just installed on the machine.
Thanks : www.omegaprojex.com
ไม่มีความคิดเห็น:
แสดงความคิดเห็น