Nagios 3: Install nrpe
“NRPE: Nagios Remote Plugin Executor allows you to execute local plugins on remote hosts.”
1, Add user and group named ‘nagios’
/usr/sbin/useradd nagios
passwd nagios
2, compile nagios-plugin
download: http://sourceforge.net/project/showfiles.php?group_id=29880
1 2 3 4 5 6 7 8 |
tar zxvf nagios-pluginxxx.tar.gz cd nagios-plugin ./configure make make install chown nagios:nagios /usr/local/nagios chown -R nagios:nagios /usr/local/nagios/libexec |
3, compile nrpe
download: http://sourceforge.net/project/showfiles.php?group_id=26589
1 2 3 4 5 6 7 |
tar zxvf nrpexxx.tar.gz cd nrpe ./configure make all sudo make install-plugin sudo make install-daemon sudo make install-daemon-config |
4, Start nrpe
vi /usr/local/nagios/etc/nrpe.cfg
allowed_hosts=127.0.0.1,123.12.1.2
123.12.1.2 is your nagios server address
start nagios:
/usr/local/nagios/bin/nrpe -c /usr/local/nagios/etc/nrpe.cfg -d
Check the nrpe on nagios server
/usr/local/nagios/libexec/check_nrpe -H 123.12.1.5
123.12.1.5 is the ip adress of the nrpe deamon(the remote pc)
You should see something like:
NRPE v2.9
Congratulate! your nrpe works now.
