pnp4nagios

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

 

  1. ependencies Resolved 
  2.  
  3. ================================================================================ 
  4.  Package                   Arch        Version              Repository     Size 
  5. ================================================================================ 
  6. Installing: 
  7.  rrdtool                   x86_64      1.4.7-1.el5.rf       rpmforge      916 k 
  8. Installing for dependencies: 
  9.  libdbi                    x86_64      0.8.1-2.1            test           37 k 
  10.  lua                       x86_64      5.1.4-2.el5.rf       rpmforge      235 k 
  11.  perl-rrdtool              x86_64      1.4.7-1.el5.rf       rpmforge       55 k 
  12.  ruby                      x86_64      1.8.5-29.el5_9       updates       279 k 
  13.  ruby-libs                 x86_64      1.8.5-29.el5_9       updates       1.6 M 
  14.  xorg-x11-fonts-Type1      noarch      7.1-2.1.el5          test          1.5 M 
  15.  
  16. Transaction Summary 
  17. ================================================================================ 
  18. Install       7 Package(s) 
  19. Upgrade       0 Package(s) 

3.

解壓pnp4nagios-0.6.11

 

  1. ./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.
 

  1.  
  2. make all 
  3.  
    1. *** Compile finished *** 
    2.  
    3.   make install 
    4.      - This installs the main program and HTML files 
    5.  
    6.   make fullinstall 
    7.      - This installs the main program, runlevel scripts, config and HTML files 
    8.  
    9. Enjoy. 
  4.  

 

  1. make install 
  2.  
  3. make install-webconf 
  4.  
  5. make install-config 
  6.  
  7. make install-init 

或者

make fullinstall

  1. make fullinstall 

安裝完畢後

 

  1.  General Options: 
  2.   -------------------------         ------------------- 
  3.   Nagios user/group:                nagios nagios 
  4.   Install directory:                /usr/local/nagios/pnp4nagios 
  5.   HTML Dir:                         /usr/local/nagios/pnp4nagios/share 
  6.   Config Dir:                       /usr/local/nagios/pnp4nagios/etc 
  7.   Location of rrdtool binary:       /usr/bin/rrdtool Version 1.4.7 
  8.   RRDs Perl Modules:                FOUND (Version 1.4007) 
  9.   RRD Files stored in:              /usr/local/nagios/pnp4nagios/var/perfdata 
  10.   process_perfdata.pl Logfile:      /usr/local/nagios/pnp4nagios/var/perfdata.log 
  11.   Perfdata files (NPCD) stored in:  /usr/local/nagios/pnp4nagios/var/spool 
  12.  
  13.   Web Interface Options: 
  14.   -------------------------         ------------------- 
  15.   HTML URL:                         http://localhost/pnp4nagios 
  16.   Apache Config File:               /etc/httpd/conf.d/pnp4nagios.conf 
  17.  
  18.  
  19.  
  20. *** Main program, Scripts and HTML files installed *** 
  21.  
  22. Enjoy. 

 配置請參考以下這個文章後面的配置相關

http://deidara.blog.51cto.com/400447/382129/

 

http://docs.pnp4nagios.org/pnp-0.6/config

 

 

 

  1. Please check the documentation for information about the following error. 
  2.  
  3. XML file "/usr/local/nagios/pnp4nagios/var/perfdata/localhost/_HOST_.xml" not found. Read FAQ online 
  4. file [line]: 
  5.  
  6. application/models/data.php [312]: 
  7.  
  8. back 
 
按照以上文章高的時候點host的圖片會報錯。我把template.cfg修改成了
如下就好了

  1. define host { 
  2. name       host-pnp 
  3. action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$ 
  4. register   0 
 
 

不知道其他人有沒有碰到這個問題??

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章