Monitor Tool(1)Nagios
1. Nagios Introduction
Nagios, Nagios-plugins
NRPE - watch the resources used on nodes machines.
NSCA - node machines send the info to nagios
NSClient++ - for windows
NDOUtils - Nagios info and event info into databases.
Support shell scripts, perl, ruby, Python
Graph Plugins (Nagiosgraph, Nagiosgrapher, PNP4Nagios
2. Install on Ubuntu
switch to root user first
>sudo -i
Install some tool
>sudo apt-get install build-essential
>sudo apt-get install apache2
>sudo apt-get install php5-gd
>sudo apt-get install libgd2-xpm-dev
>sudo apt-get install libapache2-mod-php5
>wget http://hivelocity.dl.sourceforge.net/project/nagios/nagios-4.x/nagios-4.0.8/nagios-4.0.8.tar.gz
>wget http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
>useradd nagios
>groupadd nagcmd
>usermod -a -G nagcmd nagios
>tar zxvf nagios-4.0.8.tar.gz
>cd nagios-4.0.8/
>./configure --with-nagios-group=nagios --with-command-group=nagcmd --with-mail=/usr/bin/sendmail
./configure --with-command-group=nagcmd --with-httpd-conf=/etc/apache2/conf.d
>make all
>make install
>make install-init
>make install-commandmode
>mkdir /etc/httpd
>mkdir /etc/httpd/conf.d/
>make install-webconf
>cp -R contrib/eventhandlers/ /usr/local/nagios/libexec/
>chown -R nagios:nagios /usr/local/nagios/libexec/eventhandlers
>/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
>/etc/init.d/nagios start
>sudo apt-get install apache2-utils
>htpasswd -c /usr/local/nagios/etc/htpasswd.users nagiosadmin
>tar zxvf nagios-plugins-2.0.3.tar.gz
>cd nagios-plugins-2.0.3/
>/configure --with-nagios-user=nagios --with-nagios-group=nagios
>make
>make install
Add to the startup
>ln -s /etc/init.d/nagios /etc/rcS.d/S99nagios
It will not work, link the conf
>sudo ln -s /etc/httpd/conf.d/nagios.conf /etc/apache2/conf-enabled/nagios.conf
Cool, visit this Server with this URL
http://ubuntu-master2/nagios/
username=nagiosadmin, password=password
>sudo a2enmod cgi
>apt-get install libcgi-pm-perl librrds-perl libgd-gd2-perl
>apt-get install libnet-snmp-perl libperl5.18 libpq5 libradius1 libsensors4 libsnmp-base libsnmp30 libtalloc2 libtdb1 libwbclient0 samba-common samba-common-bin smbclient snmp whois libmysqlclient-dev libssl-dev
>wget http://softlayer-dal.dl.sourceforge.net/project/nagiosgraph/nagiosgraph/1.5.1/nagiosgraph-1.5.1.tar.gz
>wget http://hivelocity.dl.sourceforge.net/project/nagios/nrpe-2.x/nrpe-2.15/nrpe-2.15.tar.gz
>./configure --with-ssl=/usr/bin/openssl --with-ssl-lib=/usr/lib/x86_64-linux-gnu
Follow the document in http://wellsie.net/p/512/. I install nagios and some other parts. But I do not think it is easy to configure.
References:
http://www.chenshake.com/nagios-study-notes/
http://www.ibm.com/developerworks/cn/linux/1309_luojun_nagios/
http://www.programmer.com.cn/11477/
http://logstash.net/
http://www.chenshake.com/introduction-to-cacti-nagios-monitoring-system/
old blogs
http://sillycat.iteye.com/blog/563940
http://sillycat.iteye.com/blog/562719
http://sillycat.iteye.com/blog/562660
http://sillycat.iteye.com/blog/562659
http://blog.51yip.com/server/1394.html
http://blog.51yip.com/server/1389.html
http://www.nagios.org/download/core/thanks/?t=1409086924
http://wellsie.net/p/512/
Monitor Tool(1)Nagios
猜你喜欢
转载自sillycat.iteye.com/blog/2110270
今日推荐
周排行