⑴安裝完nagios,繼續(xù)安裝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模式
③
創(chuàng)新互聯(lián)建站主營潤州網(wǎng)站建設(shè)的網(wǎng)絡(luò)公司,主營網(wǎng)站建設(shè)方案,手機(jī)APP定制開發(fā),潤州h5小程序定制開發(fā)搭建,潤州網(wǎng)站營銷推廣歡迎潤州等地區(qū)企業(yè)咨詢
④
修改etc/nagios.cfg
找到如下幾項,去掉注釋
process_performance_data=1
host_perfdata_command=process-host-perfdata
service_perfdata_command=process-service-perfdata
⑤
⑥nginx下的安全問題,需作如下配置
修改pnp的web服務(wù)器配置文件nginx.conf,請注意安全問題,我這里未做安全驗證。
㈢測試:
為localhost這臺主機(jī)在主機(jī)圖標(biāo)旁邊添加個小太陽標(biāo)記
vi /usr/local/nagios/etc/nagios.cfg
#為這個主機(jī)增加小太陽標(biāo)記
define host{
use linux-server,host-pnp
host_name localhost
alias localhost
address 127.0.0.1
}
#重新加載配置文件
service nagios reload
如果正確此時就會生成pnp文件
[root@localhost ~]# ls /usr/local/nagios/share/perfdata/localhost/
Current_Load.rrd Current_Users.xml PING.rrd Root_Partition.xml
Current_Load.xml HTTP.rrd PING.xml Swap_Usage.rrd
Current_Users.rrd HTTP.xml Root_Partition.rrd Swap_Usage.xml
打開網(wǎng)頁http://localhost/nagios
點擊小太陽就可以看到圖表,同訪問http://localhost/nagios/pnp
FAQ: 注意可能提示這個模塊沒有安裝:
Time/HiRes.pm模塊的安裝:
①執(zhí)行以下命令安裝該模塊。
#perl -MCPAN -e 'install Time::HiRes'
或安裝Time-HiRes-1.9707.tar.gz
②如果打開pnp頁面提示Hostname is not set,則檢查etc/pnp/里的sample文件都更改正確,檢查templates.cfg文件中url的正確性,還不行就等等,別太心急了,裝完沒那么快出圖。
文章題目:Nagios圖形化Pnp安裝和配置
文章URL:http://aaarwkj.com/article6/gjgeog.html
成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供標(biāo)簽優(yōu)化、網(wǎng)站設(shè)計、企業(yè)網(wǎng)站制作、網(wǎng)站策劃、域名注冊、外貿(mào)建站
聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網(wǎng)站立場,如需處理請聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時需注明來源: 創(chuàng)新互聯(lián)