icinga+idoutils+icinga-report+jasperserver完整步骤:
1、icinga:
http://sourceforge.net/projects/icinga-cn/files/icinga-cn/icinga-cn-1.11/icinga-cn-
1.11.5.tar.gz/download
http://nagios-plugins.org/download/nagios-plugins-2.0.3.tar.gz
$ sudo useradd icinga
$ sudo apt-get install libdbi-dev
$ sudo apt-get install apache2
$ tar zxfv icinga-cn-1.11.5.tar.gz
$ cd icinga-cn-1.11.5
$ ./configure --prefix=/usr/local/icinga
$ make all
$ sudo make install
$ sudo make install-init
$ sudo make install-commandmode
$ sudo make install-idoutils
$ sudo make install-config
$ sudo make install-webconf
$ sudo make install-webconf-auth
$ cd
$ tar zxfv nagios-plugins-2.0.3.tar.gz
$ cd nagios-plugins-2.0.3
$ ./configure --prefix=/usr/local/icinga
$ make
$ sudo make install
检查配置是否有误
$ sudo /usr/local/icinga/bin/icinga -v /usr/local/icinga/etc/icinga.cfg
启动icinga:
$ sudo service icinga start
开机启动icinga:
$ sudo vi /etc/rc.local (在exit 0前一行)
sudo service icinga start
:wq
icinga主要文件:/usr/local/icinga/etc/icinga.cfg及/objects下文件
修改httpd的配置文件/etc/apache2/site-available/default (在中间添加)
ScriptAlias /icinga/cgi-bin "/usr/local/icinga/sbin"
<Directory "/usr/local/icinga/sbin">
AuthType Basic
Options ExecCGI
AllowOverride None
Order allow,deny
Allow from all
AuthName "Icinga Access"
AuthUserFile /usr/local/icinga/etc/htpasswd.users
Require valid-user
</Directory>
:wq
$ sudo ln -s /usr/local/icinga/share /var/www/icinga
$ sudo htpasswd -c /usr/local/icinga/etc/htpasswd.users icingaadmin
输入密码(如:123456)
后面修改密码命令:
$ sudo htpasswd /usr/local/icinga/etc/htpasswd.users icingaadmin
重启apache2:
$ sudo service apache2 restart
访问:http://ip/icinga (输入用户名icinga及密码)
2、idoutils插件:
$ sudo apt-get install mysql-server libdbi-dev libdbd-mysql (root密码设置123456,可改)
cd到icinga的源目录
$ sudo make clean
$ ./configure --prefix=/usr/local/icinga --enable-idoutils
$ sudo make all
$ sudo make install
$ sudo make install-init
$ sudo make install-commandmode
$ sudo make install-idoutils
$ sudo make install-config
$ sudo make install-webconf
$ sudo make install-webconf-auth
$ sudo htpasswd /usr/local/icinga/etc/htpasswd.users icingaadmin (即重新设置下密码)
$ sudo service apache2 restart
$ mysql -u root -p123456
> create database icinga default character set utf8;
> grant all on icinga.* to idouser@localhost identified by '123456';
> quit
$ sudo mysql -u idouser -p icinga < module/idoutils/db/mysql/mysql.sql
$ sudo vi /usr/local/icinga/etc/ido2db.cfg
db_user=idouser
db_pass=123456
:wq
$ sudo service ido2db start
$ sudo service icinga restart
$ sudo cat /usr/local/icinga/var/icinga.log (显示idomod:Successfully connected to data sink即
说明没问题)
3、jasperserver:
# wget http://downloads.sourceforge.net/project/jasperserver/JasperServer/JasperReports
%20Server%20Community%20Edition%205.6.0/jasperreports-server-cp-5.6.0-linux-x64-installer.run
# chmod +x jasperreports-server-cp-5.6.0-linux-x64-installer.run
# ./jasperreports-server-cp-5.6.0-linux-x64-installer.run
一路默认回车即可
# /opt/jasperreports-server-cp-5.6.0/ctlscript.sh start
访问:http://ip:8080/jasperserver 管理员用户名密码均为jasperadmin,普通账号用户名密码均为:
joeuser
4、icinga-report:
# wget http://sourceforge.net/projects/icinga/files/icinga-reporting/1.9.0/icinga-reports-
1.9.0.tar.gz
# tar zxfv icinga-reports-1.9.0.tar.gz
# cd icinga-reports-1.9.0
# ./configure --with-jasper-server=/opt/jasperreports-server-cp-5.6.0
# make
# make install
(如果出现build.xml does not exist可执行下面两步,如果没出现可跳过下面两步)
# cd /opt/jasperreports-server-cp-5.6.0/buildomatic/
# ./js-import.sh --input-zip /root/icinga-reports-1.9.0/reports/icinga/package/js-icinga-
reports.zip
# /opt/jasperreports-server-cp-5.6.0/ctlscript.sh stop
# /opt/jasperreports-server-cp-5.6.0/ctlscript.sh start
http://ip:8080/jasperserver ――root――Icinga――Data Sources――IDO――编辑――
jdbc:mysql://localhost:3306/icinga 用户名:idouser 密码:123456(视前面安装icinga而定)――
测试连接(连接成功)――保存