`
wbj0110
  • 浏览: 1604804 次
  • 性别: Icon_minigender_1
  • 来自: 上海
文章分类
社区版块
存档分类
最新评论

Icinga-cn安装

阅读更多

1、概述
ICINGA项目是 由Michael Luebben、Hendrik Backer和JoergLinge等人发起的,他们都是现有的Nagios项目社区委员会的成员,他们承诺,新的开源项 目将完全兼容以前的Nagios应用程序及扩展功能。在新项目的网站上,他们是如此定义ICINGA的,这将是一个介于Nagios社区版和企业版间的产 品。特别将致力于解决Nagios项目现在的问题,比如不能及时处理Nagios项目的bug、新功能不能及时添加等。还有在新的ICINGA项目中,将 更好的实现数据库集成方面的功能,标准化第三发应用程序的接口等。
中文项目地址:http://icinga-cn.sourceforge.net/

2、安装基础环境apache+php+mysql,请注意php版本需求,要求5.2以上
系统环境,建议Centos6,因为Centos5的php版本低,会导致icinga-web界面无法显示。

显示代码
1
2
[root@monitor ~]#yum install zlib libpng libjpeg fontconfig gd libxml2 libgd-devel libpng-devel libjpeg-devel zlib-devel gd-devel
[root@monitor ~]#yum install php-mysql php-gd php-bcmath php-mbstring mysql-server httpd php mysql-dev gcc net-snmp-devel curl-devel perl-DBI mysql-dev gcc net-snmp net-snmp-devel curl-devel perl-DBI  php-xml

3、安装icinga

显示代码
01
02
03
04
05
06
07
08
09
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
[root@monitor ~]#tar xjvf  icinga-cn-1.6.1.tar.bz2
[root@monitor ~]#cd icinga-cn-1.6.1
[root@monitor ~]#useradd -M icinga -s /sbin/nologin
[root@monitor ~]#groupadd icingaadmin
[root@monitor ~]#usermod -G icingaadmin icinga
[root@monitor ~]#usermod -G icingaadmin apache
[root@monitor ~]#yum install libdbi libdbi-devel libdbi-dbd-mysql libdbi-drivers
[root@monitor ~]#./configure --prefix=/usr/local/icinga   --with-command-group=icinga   --enable-idoutils --with-web-apache-path=/etc/httpd/conf.d/ --enable-embedded-perl
[root@monitor ~]#make all
[root@monitor ~]#make install
[root@monitor ~]#make install-init
[root@monitor ~]#make install-commandmode
[root@monitor ~]#make install-idoutils
[root@monitor ~]#make install-api
[root@monitor ~]#make install-config
[root@monitor ~]#make install-webconf
[root@monitor ~]#ldd /usr/local/icinga/bin/ido2db
[root@monitor ~]#htpasswd -c /usr/local/icinga/etc/htpasswd.users icinga
 
[root@monitor ~]#vi /usr/local/icinga/etc/cgi.cfg
在所有含有icingaadmin的行后面添加icinga
 
[root@monitor ~]#mysql -u root -p
[root@monitor ~]#mysql> CREATE DATABASE icinga;
[root@monitor ~]#mysql> GRANT USAGE ON *.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
[root@monitor ~]#mysql> GRANT SELECT , INSERT , UPDATE , DELETE ON icinga.* TO 'icinga'@'localhost';
[root@monitor ~]#mysql> FLUSH PRIVILEGES;
[root@monitor ~]#mysql> quit
  
IDOUtils配置文件
[root@monitor ~]#vi /usr/local/icinga/etc/ido2db.cfg
db_servertype=mysql
db_port=3306
db_user=icinga
db_pass=icinga
 
[root@monitor ~]#mysql -uroot -p icinga < /opt/icinga/icinga-cn-1.6.1/module/idoutils/db/mysql/mysql.sql
配置数据库支持
[root@monitor ~]#vi /usr/local/icinga/etc/icinga.cfg
broker_module=/usr/local/icinga/bin/idomod.o config_file=/usr/local/icinga/etc/idomod.cfg
[root@monitor ~]#/usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
[root@monitor ~]#/etc/init.d/ido2db start
[root@monitor ~]#/etc/init.d/icinga start
 
 
[root@monitor ~]#tar xjvf icinga-cn-web-1.5.2.tar.bz2
[root@monitor ~]#cd icinga-cn-web-1.5.2
[root@monitor ~]#./configure --prefix=/usr/local/icinga-web --with-web-user=apache --with-web-group=apache --with-db-type=mysql --with-db-host=localhost --with-db-port=3306 --with-db-name=icinga_web --with-db-user=icinga --with-db-pass=icinga --with-icinga-api=/usr/local/icinga/share/icinga-api --with-web-apache-path=/etc/httpd/conf.d
[root@monitor ~]#make
[root@monitor ~]#make install
[root@monitor ~]#make install-apache-config
[root@monitor ~]#mysql -u root -p
[root@monitor ~]#mysql> CREATE DATABASE icinga_web;
[root@monitor ~]#mysql> GRANT USAGE ON *.* TO 'icinga'@'localhost' IDENTIFIED BY 'icinga' WITH MAX_QUERIES_PER_HOUR 0 MAX_CONNECTIONS_PER_HOUR 0 MAX_UPDATES_PER_HOUR 0;
[root@monitor ~]#mysql> GRANT SELECT, INSERT, UPDATE, DELETE, CREATE, DROP, ALTER, INDEX ON icinga_web.* TO 'icinga'@'localhost';
[root@monitor ~]#mysql> quit
[root@monitor ~]#make db-initialize
    
 
[root@monitor ~]#tar xjvf icinga\(nagios\)-cn-plugins-1.4.15.tar.bz2
[root@monitor ~]#cd icinga-cn-plugins-1.4.15/
[root@monitor ~]#./configure 
[root@monitor ~]#make
[root@monitor ~]#make install
[root@monitor ~]#/etc/init.d/icinga restart
[root@monitor ~]#/etc/init.d/httpd restart
分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics