软件依赖性:

perl>=5.x

RRDtool>=1.x

PHP>=5.1.6基于Kohana的WEB前端需要

Nagios>=2.x或Icinga

Kohana需要启用“mod_rewrite”模块

[root@nagios rpm]# cat /etc/httpd/conf/httpd.conf |grep mod_rewrite
LoadModule rewrite_module modules/mod_rewrite.so
[root@nagios rpm]#

基础包:

[root@nagios rpm]# yum -y install cairo pango zlib zlib-devel freetype freetype-devel gd gd-devel-2.0.35-11.el6.x86_64.rpm
[root@nagios rpm]# yum -y install libart_lgpl libart_lgpl-devel

 

遇到下面的问题:

*** Configuration summary for pnp4nagios-0.6.24 30-07-2014 ***

  General Options:

  -------------------------         -------------------

  Nagios user/group:                nagios nagios

  Install directory:                /usr/local/pnp4nagios

  HTML Dir:                         /usr/local/pnp4nagios/share

  Config Dir:                       /usr/local/pnp4nagios/etc

  Location of rrdtool binary:       /usr/local/rrdtool/bin/rrdtool Version 1.2.14

  RRDs Perl Modules:                *** NOT FOUND ***

  RRD Files stored in:              /usr/local/nagios/share/perfdata

  process_perfdata.pl Logfile:      /usr/local/pnp4nagios/var/perfdata.log

  Perfdata files (NPCD) stored in:  /usr/local/pnp4nagios/var/spool

 

  Web Interface Options:

  -------------------------         -------------------

  HTML URL:                         http://localhost/pnp4nagios

  Apache Config File:               /etc/httpd/conf.d/pnp4nagios.conf

 

解决方案:

[root@nagios pnp4nagios-0.6.24]# ./configure --prefix=/usr/local/pnp4nagios --with-rrdtool=/usr/local/rrdtool/bin/rrdtool --with-nagios-user=nagios  --with-nagios-group-nagios --with-perfdata-dir=/usr/local/nagios/share/perfdata --with-perl_lib_path=/usr/local/rrdtool/lib/perl/5.10.1/x86_64-linux-thread-multi/

 

或者尝试:

[root@nagios pnp4nagios-0.6.24]# yum -y install rrdtool-perl-1.3.8-7.el6.x86_64.rpm

 

登录Nagios失败(帐号密码),可查看php4nagios的登录认证文件路径是否指对咯

[root@nagios pnp4nagios]# cat /etc/httpd/conf.d/pnp4nagios.conf |egrep -w AuthUserFile
           AuthUserFile /usr/local/nagios/etc/htpasswd.users
[root@nagios pnp4nagios]#

如果配置正确后,点击wKiom1TWKzHgpzz6AAAGfp451JU763.jpg后出现下面情况:

wKioL1TWLEmzOGDpAAFHul41DnU129.jpg

解决方案:由于配置文件未生效导致,重启电脑即可解决

 

重复上步操作:

一般会出现下面情况:

wKiom1TWK-aiaPCAAAPFBhEFAns009.jpg

解决方案:

[root@nagios pnp4nagios]# yum -y install php-gd

 可解决缺少PHP GD extension的问题

 

解决上述问题后,即可正常使用了,如下图所示:

wKioL1TWLXyANR9fAAQWkWxAox8355.jpg