1.下载pnp4nagios
http://jaist.dl.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.21.tar.gz
2.安装rrdtool
如果想省事,请先配置第三方源,方法如下链接
http://motor.blog.51cto.com/729413/1165481
配置好后
yum install rrdtool
- ependencies Resolved
- ================================================================================
- Package Arch Version Repository Size
- ================================================================================
- Installing:
- rrdtool x86_64 1.4.7-1.el5.rf rpmforge 916 k
- Installing for dependencies:
- libdbi x86_64 0.8.1-2.1 test 37 k
- lua x86_64 5.1.4-2.el5.rf rpmforge 235 k
- perl-rrdtool x86_64 1.4.7-1.el5.rf rpmforge 55 k
- ruby x86_64 1.8.5-29.el5_9 updates 279 k
- ruby-libs x86_64 1.8.5-29.el5_9 updates 1.6 M
- xorg-x11-fonts-Type1 noarch 7.1-2.1.el5 test 1.5 M
- Transaction Summary
- ================================================================================
- Install 7 Package(s)
- Upgrade 0 Package(s)
3.
解压pnp4nagios-0.6.11
- ./configure --with-nagios-user=nagios --with-nagios-group=nagios --prefix=/usr/local/nagios/pnp4nagios
*** Configuration summary for pnp4nagios-0.6.21 03-24-2013 ***
General Options:
------------------------- -------------------
Nagios user/group: nagios nagios
Install directory: /usr/local/nagios/pnp4nagios
HTML Dir: /usr/local/nagios/pnp4nagios/share
Config Dir: /usr/local/nagios/pnp4nagios/etc
Location of rrdtool binary: /usr/bin/rrdtool Version 1.4.7
RRDs Perl Modules: FOUND (Version 1.4007)
RRD Files stored in: /usr/local/nagios/pnp4nagios/var/perfdata
process_perfdata.pl Logfile: /usr/local/nagios/pnp4nagios/var/perfdata.log
Perfdata files (NPCD) stored in: /usr/local/nagios/pnp4nagios/var/spool
Web Interface Options:
------------------------- -------------------
HTML URL: http://localhost/pnp4nagios
Apache Config File: /etc/httpd/conf.d/pnp4nagios.conf
Review the options above for accuracy. If they look okay,
type 'make all' to compile.
- make all
- *** Compile finished ***
- make install
- - This installs the main program and HTML files
- make fullinstall
- - This installs the main program, runlevel scripts, config and HTML files
- Enjoy.
- make install
- make install-webconf
- make install-config
- make install-init
或者
make fullinstall
- make fullinstall
安装完毕后
- General Options:
- ------------------------- -------------------
- Nagios user/group: nagios nagios
- Install directory: /usr/local/nagios/pnp4nagios
- HTML Dir: /usr/local/nagios/pnp4nagios/share
- Config Dir: /usr/local/nagios/pnp4nagios/etc
- Location of rrdtool binary: /usr/bin/rrdtool Version 1.4.7
- RRDs Perl Modules: FOUND (Version 1.4007)
- RRD Files stored in: /usr/local/nagios/pnp4nagios/var/perfdata
- process_perfdata.pl Logfile: /usr/local/nagios/pnp4nagios/var/perfdata.log
- Perfdata files (NPCD) stored in: /usr/local/nagios/pnp4nagios/var/spool
- Web Interface Options:
- ------------------------- -------------------
- HTML URL: http://localhost/pnp4nagios
- Apache Config File: /etc/httpd/conf.d/pnp4nagios.conf
- *** Main program, Scripts and HTML files installed ***
- Enjoy.
配置请参考以下这个文章后面的配置相关
http://deidara.blog.51cto.com/400447/382129/
http://docs.pnp4nagios.org/pnp-0.6/config
- Please check the documentation for information about the following error.
- XML file "/usr/local/nagios/pnp4nagios/var/perfdata/localhost/_HOST_.xml" not found. Read FAQ online
- file [line]:
- application/models/data.php [312]:
- back
按照以上文章高的时候点host的图片会报错。我把template.cfg修改成了 如下就好了
- define host {
- name host-pnp
- action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$
- register 0
- }
不知道其他人有没有碰到这个问题??