为NAGIOS编译安装PNP插件

PNP4NAGIOS是一款为nagios生成性能数据的图表的插件。

perl -MCPAN -e 'install Time::HiRes'

启用rpmforge,关闭pirority插件,升级并且安装

yum install rrdtool-perl

升级到php 5.2 http://ihipop.info/2010/11/1803.html

访问官方网站获得最新版:http://docs.pnp4nagios.org/pnp-0.4/dwnld

tar zxvf pnp4nagios-0.6.7.tar.gz
cd pnp4nagios-0.6.7
./configure
make all
make install
make install-webconf
make install-config
make install-init

cd /usr/local/pnp4nagios/etc/
cp process_perfdata.cfg-sample process_perfdata.cfg
cp npcd.cfg-sample npcd.cfg
cp rra.cfg-sample rra.cfg

在nagios的objects下修改template,在generic-host和generic-service加入

action_url /pnp4nagios/graph?host=$HOSTNAME$
process_perf_data 1

action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$
process_perf_data 1

其他均会继承到。
编辑nagios下的nagios.cfg
去掉注释:

process_performance_data=1
host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata

打开/usr/local/pnp4nagios/etc/nagios.cfg-sample
我使用了 Synchronous mode
按照里面的设置修改nagios.cfg,保存即可
打开/usr/local/pnp4nagios/etc/misccommands.cfg-sample
拷贝并修改Synchronous mode相应的命令行到nagios的command.cfg 内部,完成配置
然后

rm /usr/local/pnp4nagios/share/install.php
service nagios restart

等待出图。。。。。。。。。。。。。。

Author Info :
  • From:为NAGIOS编译安装PNP插件
  • URL:http://blog.ihipop.info/2010/11/1805.html
  • Please Reserve This Link,Thanks!
  • 发表评论

    电子邮件地址不会被公开。 必填项已用*标注