icinga-cn中文项目

Icinga其实就是nagios的二次开发,他包括了nagios的所有功能,甚至可以直接把nagios的配置文件拿来用。icinga-cn是专门的中文项目,更适合国人使用。
1 准备
#yum install freetype libjpeg libpng fontconfig libdbi libdbi-drivers libdbi-devel libdbi-dbd-mysql gcc glibc glibc-common gd gd-devel libjpeg libjpeg-devel libpng libpng-devel net-snmp net-snmp-devel
2 下载安装icinga
#wget http://cdnetworks-kr-1.dl.sourceforge.net/project/icinga-cn/icinga-cn/icinga-cn-1.5.1/icinga-cn-1.5.1.tar.bz2

# tar jxvf icinga-cn-1.5.1.tar.bz2
#cd icinga-1.5.1/
#./configure –prefix=/usr/local/icinga –enable-idoutils –enable-embedded-perl –enable-ssl –with-icinga-user=icinga –with-icinga-group=icinga –with-command-user=icinga –with-command-grou=icinga
#make all
#make install
#make install-init //# 安装主程序,CGI和HTML
#make install-commandmode //在/etc/rc.d/init.d安装启动脚本
#make install-api //安装api接口文件
#make install-config // 安装配置实例配置文件
#make install-webconf //安装apache相关的配置文件
#chkconfig –add icinga
#chkconfig icinga on
# /etc/init.d/icinga start
3 设置web页面登陆用户及密码(必须)
默认用户名 icingaadmin 默认密码admin
用户可自行修改,如htpasswd -c /usr/local/icinga/etc/htpasswd.users icinga
4 安装nagios-plugins
# wget http://sourceforge.net/projects/nagiosplug/files/nagiosplug/1.4.15/nagios-plugins-1.4.15.tar.gz/download
# tar zxvf nagios-plugins-1.4.15.tar.gz
# cd nagios-plugins-1.4.15/
#./configure –prefix=/var/www/icinga/ –with-cgiurl=/icinga/cgi-bin –with-htmurl=/icinga –with-nagios-user=icinga –with-nagios-group=icinga
# make && make install
5 安装nrpe
#wget http://cdnetworks-kr-1.dl.sourceforge.net/project/icinga-cn/nrpe-icinga/nrpe-icinga-2.12.tar.bz2
#tar jxvf nrpe-icinga-2.12.tar.bz2
# ./configure –with-nrpe-user=icinga –with-nrpe-group=icinga –with-icinga-user=icinga –with-icinga-group=icinga
#make && make install

拷贝nrpe文件:
#cp src/nrpe /usr/local/icinga/bin
#cp sample-config/nrpe.cfg /usr/local/icinga/etc

启动nrpe病检查:
# /usr/local/icinga/bin/nrpe -n -c /usr/local/icinga/etc/nrpe.cfg -d
# /usr/local/icinga/libexec/check_nrpe -H 127.0.0.1 –n
NRPE v2.12
stop nrpe:
#kill `ps -ef | grep “sample-config/nrpe.cfg” | grep -v grep | awk ‘{print $2}’`

登陆
在浏览器输入http://IP/icinga/
输入你的用户名和密码就登陆进去了。截图留念

你可能感兴趣的:(apache,浏览器,脚本,gcc,cgi,nagios)