Centreon 监控报警
1.系统更新:yum update
2.安装组件:yum install -y httpd php-pear php php-mysql php-gd php-ldap php-xml php-mbstring rrdtool perl-rrdtool openssl-devel perl-DBD-MySQL mysql-server mysql-devel gd fontconfig-devel libjpeg-devel libpng-devel gd-devel perl-GD
3.安装更新源: rpm -Uvh http://dl.fedoraproject.org/pub/epel/6/x86_64/epel-release-6-8.noarch.rpm
yum install -y perl-Config-IniFiles perl-DB
4.更新Pear组件:pear channel-update pear.php.net && pear upgrade-all
5. 配置软件源和安装Centreon
wget http://yum.centreon.com/standard/2.2/ces-standard.repo -O /etc/yum.repos.d/ces-standard.repo
wget http://yum.centreon.com/standard/2.2/RPM-GPG-KEY-CES -O /etc/pki/rpm-gpg/RPM-GPG-KEY-CES
#wget http://yum.centreon.com/standard/4.0/ces-standard.repo -O /etc/yum.repos.d/ces-standard.repo
#change ces-standard.repo > 4.0 to 3.0
yum install centreon-base-config-centreon-engine-2.6.6 centreon-2.6.6
6.配置php.ini 的timezone,重启service httpd restart
7.配置my.conf ,添加 innodb_file_per_table=1
8.安装sendmail 和 perl-Mail-Sendmail 再启动 service sendmail start
yum -y install perl-Mail-Sendmail perl-Digest* perl-MIME* netpbm sendmail
9.配置数据库
grant all PRIVILEGES on discuz.* to ted@'123.123.123.123' identified by '123456';
flush privileges;
10.启用自定义宏
修改数据里的值:表cfg_nagios 的 enable_environment_macros=1
11.配置HTML报警邮件
nagios_send_host_mail.pl
nagios_send_service_mail.pl
chown nagios:nagios
chmod 777
修改配置
$nagios_cgiurl = "http://10.9.50.146/centreon";
......
12.进入Centos里配置notification
$USER1$/nagios_send_host_mail.pl -r $CONTACTEMAIL$ -f html -u -l en
$USER1$/nagios_send_service_mail.pl -r $CONTACTEMAIL$ -f html -u -l en
13.解决报错:Centreon 2.7.x: dashboard shows 100% undetermined
UPDATE centreon.options SET value='broker' WHERE value='ndo'; #进入数据库
/usr/share/centreon/cron/eventReportBuilder -r --config=/etc/centreon/conf.pm #重建数据
/usr/share/centreon/cron/dashboardBuilder -r --config=/etc/centreon/conf.pm #重建数据