Loading...
пʼятниця, 16 серпня 2013 р.

Nagios+NRPE install short guide


1.    Install those dependencies if needed:
yum install httpd php gcc glibc glibc-common gd gd-devel
2.    Add RPM Forge repo:
3.    Install Nagios:
yum install nagios nagios-plugins nagios-plugins-setuid
4.    Create user for access to Nagios web-interface (for server machine only):
htpasswd -c /etc/nagios/htpasswd.users nagiosadmin

5.    Check if installed correctly:
nagios -v /etc/nagios/nagios.cfg (remember this path!)
6.    Start service:
/etc/init.d/nagios start
7.    Install xinetd if needed:
yum install xinetd
8.    Download Nagios NRPE:
9.    Unpack NRPE:
mkdir download
cp nrpe-2.13.tar.gz download/
cd download/
tar zxvf nrpe-2.13.tar.gz
cd nrpe-2.13
10. Build and install NRPE:
./configure
make all
make install-plugin
make install-daemon
make install-daemon-config
make install-xinetd
11. Become owner:
chown nagios.nagios /usr/local/nagios
chown -R nagios.nagios /usr/local/nagios/libexec
12. Edit configuration files:
/etc/xinetd.d/nrpe  => add    only_from  = 127.0.0.1 YOUR_IP_THERE(client)
/etc/services => add following line:           nrpe 5666/tcp # NRPE
13. Restart xinetd:
/sbin/service xinetd restart
14. Check 5666 port:
netstat -atn | grep 5666  or  netstat -at | grep nrpe
15. Check if all works fine from local machine:
/usr/local/nagios/libexec/check_nrpe -H localhost
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_load
16. If the last line doesn’t work (i.e. check_load), then install plug-ins:
wget http://downloads.sourceforge.net/project/nagiosplug/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz?r=http%3A%2F%2Fsourceforge.net%2Fprojects%2Fnagiosplug%2Ffiles%2Fnagiosplug%2F1.4.15%2F&ts=1376558376&use_mirror=kent
tar zxvf nagios-plugins-1.4.15.tar.gz
cd nagios-plugins-1.4.15
./configure
make
make install
17. Check again:
/usr/local/nagios/libexec/check_nrpe -H localhost -c check_load
18. Repeat those steps for all machines where Nagios needed and configure Nagios+NRPE as described in paragraph 4.1 (add new service to Nagios server machine).
19. Add Nagios to autorun, for instance, via crontab:
crontab -e
#start Nagios
@reboot /sbin/service nagios start

0 коментарі:

 
TOP