Nagios图形化Pnp安装和配置-创新互联
⑴安装完nagios,继续安装pnp,要注意rrdtool的安装。
tar -xvzf pnp-0.4.13.tar.gz
cd pnp-0.4.13
./configure
make all
make install
make install-config
make install-init
---------------------------------------------------------------------------------
FAQ:
*** Configuration summary for pnp 0.4.13 02-19-2009 ***
General Options:
------------------------- -------------------
Nagios user/group: nagios nagios
Install directory: /usr/local/nagios
HTML Dir: /usr/local/nagios/share/pnp
Config Dir: /usr/local/nagios/etc/pnp
Path to rrdtool: /usr/local/bin/rrdtool (Version 1.2.23)
RRDs Perl Modules: *** NOT FOUND ***
RRD Files stored in: /usr/local/nagios/share/perfdata
process_perfdata.pl Logfile: /usr/local/nagios/var/perfdata.log
Perfdata files (NPCD) stored in: /usr/local/nagios/var/spool/perfdata/
-----------------------------------------
process_perfdata.pl 安装在 /usr/local/nagios/share/
配置示例文件安装在/usr/local/nagios/libexecs
config.php安装于/usr/local/nagios/etc/pnp
⑵修改配置文件
①
cd /usr/local/nagios/etc/pnp/
cp process_perfdata.cfg-sample process_perfdata.cfg
cp npcd.cfg-sample npcd.cfg
cp rra.cfg-sample rra.cfg
chown -R nagios:nagios *
②
vi /usr/local/nagios/etc/pnp/process_perfdata.cfg
....
LOG_FILE = /usr/local/nagios/var/perfdata.log
#
# Loglevel 0=silent 1=normal 2=debug
#
LOG_LEVEL = 2
#先改为2,为debug模式
③
#在use的后面添加"host-pnp"即可让监控图上的主机名称旁边增加一个小太阳的标记,点击此标记即可查看pnp图片。
define host {
name host-pnp
register 0
action_url /nagios/pnp/index.php?host=$HOSTNAME$
process_perf_data 1
}
#还可以在service栏添加srv-pnp,添加后会在相应的栏内增加小太阳。
define service {
name srv-pnp
register 0
action_url /nagios/pnp/index.php?host=$HOSTNAME$&srv=$SERVICEDESC$
process_perf_data 1
}
另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。
本文名称:Nagios图形化Pnp安装和配置-创新互联
文章地址:http://scjbc.cn/article/cspgje.html