icinga+idoutils+icinga-report+jasperserver完整步骤

本文涉及的产品
RDS MySQL Serverless 基础系列,0.5-2RCU 50GB
云数据库 RDS MySQL,集群系列 2核4GB
推荐场景:
搭建个人博客
RDS MySQL Serverless 高可用系列,价值2615元额度,1个月
简介:

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而定)——


测试连接(连接成功)——保存

本文转自linux博客51CTO博客,原文链接http://blog.51cto.com/yangzhiming/1685487如需转载请自行联系原作者


yangzhimingg

相关实践学习
如何快速连接云数据库RDS MySQL
本场景介绍如何通过阿里云数据管理服务DMS快速连接云数据库RDS MySQL,然后进行数据表的CRUD操作。
全面了解阿里云能为你做什么
阿里云在全球各地部署高效节能的绿色数据中心,利用清洁计算为万物互联的新世界提供源源不断的能源动力,目前开服的区域包括中国(华北、华东、华南、香港)、新加坡、美国(美东、美西)、欧洲、中东、澳大利亚、日本。目前阿里云的产品涵盖弹性计算、数据库、存储与CDN、分析与搜索、云通信、网络、管理与监控、应用服务、互联网中间件、移动服务、视频服务等。通过本课程,来了解阿里云能够为你的业务带来哪些帮助 &nbsp; &nbsp; 相关的阿里云产品:云服务器ECS 云服务器 ECS(Elastic Compute Service)是一种弹性可伸缩的计算服务,助您降低 IT 成本,提升运维效率,使您更专注于核心业务创新。产品详情: https://www.aliyun.com/product/ecs
相关文章
|
8月前
|
运维 安全 机器人
记一次graylog-plugin-logging-alert插件在GrayLog5.1.2版本下不生效问题的解决过程
记一次graylog-plugin-logging-alert插件在GrayLog5.1.2版本下不生效问题的解决过程
66 0
|
监控
zabbix通过yum安装,启动报错zabbix-agent.service never wrote its PID file. Failing.
zabbix通过yum安装,启动报错zabbix-agent.service never wrote its PID file. Failing.
263 0
|
关系型数据库 Java 应用服务中间件
Database Visualization using Metabase Part 1 - Install Metabase on Ubuntu 16.04
In this tutorial, we will install Metabase on an Alibaba Cloud ECS Ubuntu 16.04 server to achieve data visualization.
1957 0
Database Visualization using Metabase Part 1 - Install Metabase on Ubuntu 16.04
|
Ubuntu 关系型数据库 MySQL
How to Install and Configure Icinga2 Monitoring Tool on Ubuntu 16.04
In this tutorial, we will explore how to install Docker on Alibaba Cloud and learn some important Docker commands to help you deploy and manage your container services.
3069 0
How to Install and Configure Icinga2 Monitoring Tool on Ubuntu 16.04
|
Web App开发 监控 jenkins
|
关系型数据库 MySQL 数据安全/隐私保护
|
关系型数据库 MySQL 数据安全/隐私保护

热门文章

最新文章