91超碰碰碰碰久久久久久综合_超碰av人澡人澡人澡人澡人掠_国产黄大片在线观看画质优化_txt小说免费全本

溫馨提示×

溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊×
其他方式登錄
點擊 登錄注冊 即表示同意《億速云用戶服務條款》

Nagios結合pnp4nagios圖形監控

發布時間:2020-06-23 22:25:26 來源:網絡 閱讀:3602 作者:bbotte 欄目:移動開發

nagios的安裝及配置在以下文章里面

http://bbotte.blog.51cto.com/6205307/1403997

http://bbotte.blog.51cto.com/6205307/1543832 


版本說明:系統CentOS6.5 64位  nagios-4.0.5 nagios-plugins-2.0 nrpe-2.15 pnp4nagios-0.6.24 rrdtool-1.4.9


nagios服務已經安裝完成,下面先安裝rrdtoolhttp://oss.oetiker.ch/rrdtool/ 

yum install  libjpeg-devel libpng-devel pango* libart_lgpl-devel pango-devel* cairo-devel* libxml2-devel libjpeg-devel libpng-devel php-gd gd-devel perl-GD libtoul-ltdl-devel rrdtool-perl perl-devel perl-ExtUtils-Embed perl-Time-HiRes

tar -xzf rrdtool-1.4.9.tar.gz 

cd rrdtool-1.4.9

./configure --prefix=/usr/local/rrdtool

make

make install

cd ..

安裝pnp4nagios http://www.pnp4nagios.org/

tar -xzf pnp4nagios-0.6.24.tar.gz 
cd pnp4nagios-0.6.24
ls /usr/local/pnp
./configure --with-nagios-user=nagios --with-nagios-group=nagios --with-rrdtool=/usr/local/rrdtool/bin/rrdtool
make all
make install 
make install-webconf  
make install-config  
make install-init
 
cd /usr/local/pnp4nagios/etc/ 
cp rra.cfg-sample rra.cfg

#PNP的五種模式 Synchronous Mode、Bulk Mode、Bulk Mode with NPCD、Bulk Mode with npcdmod、Gearman Mode http://docs.pnp4nagios.org/pnp-0.6/modes   

Nagios結合pnp4nagios圖形監控


#下面是Bulk Mode with NPCD模式配置

cd /usr/local/nagios/etc/objects/

vim commands.cfg
# 'process-host-perfdata' command definition
#注釋默認的process-host-perfdata和process-service-perfdata,添加以下
define command{
 command_name process-service-perfdata-file
 command_line /bin/mv /usr/local/pnp4nagios/var/service-perfdata /usr/local/pnp4nagios/var/spool/service-perfdata.$TIMET$
 }

define command{
 command_name process-host-perfdata-file
 command_line /bin/mv /usr/local/pnp4nagios/var/host-perfdata /usr/local/pnp4nagios/var/spool/host-perfdata.$TIMET$
 }

#啟動npcd服務

/usr/local/pnp4nagios/bin/npcd -d -f /usr/local/pnp4nagios/etc/npcd.cfg

  

vim /usr/local/nagios/etc/nagios.cfg
process_performance_data=1  
service_perfdata_file=/usr/local/pnp4nagios/var/service-perfdata  
service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$  
service_perfdata_file_mode=a  
service_perfdata_file_processing_interval=15  
service_perfdata_file_processing_command=process-service-perfdata-file 
host_perfdata_file=/usr/local/pnp4nagios/var/host-perfdata  
host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$  
host_perfdata_file_mode=a  
host_perfdata_file_processing_interval=15  
host_perfdata_file_processing_command=process-host-perfdata-file

  

vim localhost.cfg 
 define host{
        use                     linux-server,host-pnp #修改這里
        host_name               localhost
        alias                   localhost
        address                 127.0.0.1
        }
define service{
        use                             local-service,service-pnp #需要畫圖的都加上service-pnp      
        host_name                       localhost
        service_description             PING
        check_command                   check_ping!100.0,20%!500.0,60%
        }
vim templates.cfg
define host{
        name       host-pnp
        register   0
        action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=_HOST_
        process_perf_data 1
        }
define service{
        name       service-pnp
        register   0
        action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$ 
        process_perf_data 1
        }

配置完成,檢查nagios配置后將nagios和apache重啟

/usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

service nagios restart

service httpd restart


Nagios結合pnp4nagios圖形監控

出現這個頁面說明安裝完成,那么將install.php刪除后刷新即可看到出圖的頁面

mv /usr/local/pnp4nagios/share/install.php /usr/local/pnp4nagios/share/install.php.bak

如下:

Nagios結合pnp4nagios圖形監控


如果需要在nagios頁面即可查看到動態曲線那么需要做如下改動:

Nagios結合pnp4nagios圖形監控


到pnp4nagios-0.6.24解壓目錄下

cp pnp4nagios-0.6.24/contrib/ssi/status-header.ssi /usr/local/nagios/share/ssi/

vim /usr/local/nagios/etc/objects/templates.cfg 
define host{
        name       host-pnp
        register   0
        action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=_HOST_
        process_perf_data 1
        }
define service{
        name       service-pnp
        register   0
        action_url /pnp4nagios/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/popup?host=$HOSTNAME$&srv=$SERVICEDESC$  
        process_perf_data 1
        }

備注:

生成的rrd文件在此目錄/usr/local/pnp4nagios/var/perfdata/localhost

Nagios結合pnp4nagios圖形監控

如果因為網絡不穩定導致出圖問題,可以修改一下超時時間

vim /usr/local/pnp4nagios/etc/process_perfdata.cfg

TIMEOUT = 30  #默認是15秒

參考:http://www.ttlsa.com/nagios/7-nagios-install-pnp4nagios/

向AI問一下細節

免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。

AI

泗洪县| 佛冈县| 苍梧县| 洱源县| 青铜峡市| 德安县| 通榆县| 克什克腾旗| 岳阳市| 忻城县| 台安县| 长海县| 河源市| 特克斯县| 旌德县| 长宁县| 迁西县| 崇阳县| 大关县| 汉沽区| 天镇县| 桦甸市| 肥东县| 南城县| 长沙市| 阿坝县| 本溪| 乡城县| 开封县| 林口县| 台安县| 顺义区| 佛坪县| 防城港市| 寿宁县| 保德县| 华池县| 景德镇市| 武隆县| 广灵县| 武定县|