1. 底层支持库(图形显示的依赖) yum install -y cairo pango zlib zlib-devel freetype freetype-devel gd gd-devel
2. RRDTOOLS的支持软件libart_lgpl
yum install libart_lgpl
或者编译安装libart_lgpl-2.3.17
重要步骤:
cp -r libart-2.0 /usr/include/
3. 安装rrd-tools
./configure --prefix=/usr/local/rrdtool --disable-python --disable-tcl
4. 安装PNP
./configure --with-rrdtool=/usr/local/rrdtool/bin/rrdtool ----->真正出图的命令
--with-perfdata=/usr/local/nagios/share/perfdata ----->出图所用的数据路径
WARNING: The RRDs Perl Modules are not found on your System
Using RRDs will speedup things in larger Installtions.
警告不用理会。
详细安装记录:
978 ./configure --with-rrdtool=/usr/local/rrdtool/bin/rrdtool --with-perfdata=/usr/local/nagios/share/perfdata
979 make all
980 make install
981 make install-config
982 make install-init
5. 至此,PNP及相关NAGIOS图形安装完毕
6. 配置command.cfg
# ‘process-host-perfdata‘ command definition
define command{
command_name process-host-perfdata
command_line /usr/local/nagios/libexec/process_perfdata.pl
}
# ‘process-service-perfdata‘ command definition
define command{
command_name process-service-perfdata
command_line /usr/local/nagios/libexec/process_perfdata.pl
}
7. 整合nagios和pnp的web显示页面
编辑host.cfg添加action_url 参数 或者编辑模板文件templates.cfg
action_url /nagios/pnp/index.php?host=$HOSTNAME$
再次整合services
/nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
原文地址:http://xiangpang.blog.51cto.com/10719398/1711642