亚洲激情专区-91九色丨porny丨老师-久久久久久久女国产乱让韩-国产精品午夜小视频观看

溫馨提示×

溫馨提示×

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

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

nagios結合pnp4nagios圖表

發布時間:2020-06-19 22:30:29 來源:網絡 閱讀:294 作者:A飛機 欄目:移動開發

nagios結合pnp4nagios圖表


安裝rrdtool

網址:https://www.oetiker.ch/en/oss/projects/

cd /usr/local/src

wgethttp://oss.oetiker.ch/rrdtool/pub/rrdtool.tar.gz

tar -zxvf rrdtool.tar.gz

cd rrdtool-1.4.9/

yum install -y pango*                #./configure依賴的包

yum install –y perl-ExtUtils-CBuilderperl-ExtUtils-MakeMaker     #make需要的包

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

make

make install

 

 

 

 

 

注意nagios4.xnagios3.xpnp4nagios兼容問題

安裝pnp4nagios

官網:http://www.pnp4nagios.org/

網址:http://jaist.dl.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.25.tar.gz

 

cd /usr/local/src/

wgethttp://jaist.dl.sourceforge.net/project/pnp4nagios/PNP-0.6/pnp4nagios-0.6.25.tar.gz

tar -zxvf pnp4nagios-0.6.25.tar.gz

cd pnp4nagios-0.6.25

yum install perl-Time-HiRes                       #./configure需要的包

./configure –h                                                #查看pnp4nagios默認安裝在哪里

 

 

./configure --with-nagios-user=nagios--with-nagios-group=nagios --with-rrdtool=/usr/local/rrdtool/bin/rrdtool--with-perfdata-dir=/usr/local/nagios/share/perfdata

make all

make install

make install-config

make install-init

cd /usr/local/pnp4nagios/etc/

mv misccommands.cfg-sample misccommands.cfg

mv nagios.cfg-sample nagios.cfg

mv rra.cfg-sample rra.cfg

cd pages/

mv web_traffic.cfg-sample web_traffic.cfg

cd/usr/local/pnp4nagios/etc/check_commands/

mv check_all_local_disks.cfg-samplecheck_all_local_disks.cfg

mv check_nrpe.cfg-sample check_nrpe.cfg

mv check_nwstat.cfg-sample check_nwstat.cfg

本實驗pnp4nagios的模式為bulk with npcd,相關配置如下

vim /usr/local/nagios/etc/nagios.cfg

#修改或打開

process_performance_data=1

 

host_perfdata_file=/usr/local/nagios/var/host-perfdata

service_perfdata_file=/usr/local/nagios/var/service-perfdata

 

host_perfdata_file_template=[HOSTPERFDATA]\t$TIMET$\t$HOSTNAME$\t$HOSTEXECUTIONTIME$\t$HOSTOUTPUT$\t$HOSTPERFDATA$

service_perfdata_file_template=[SERVICEPERFDATA]\t$TIMET$\t$HOSTNAME$\t$SERVICEDESC$\t$SERVICEEXECUTIONTIME$\t$SERVICELATENCY$\t$SERVICEOUTPUT$\t$SERVICEPERFDATA$

 

host_perfdata_file_mode=a

service_perfdata_file_mode=a

 

host_perfdata_file_processing_interval=15

service_perfdata_file_processing_interval=15

 

host_perfdata_file_processing_command=process-host-perfdata-file

service_perfdata_file_processing_command=process-service-perfdata-file

 

# process_performance_data=1     表示啟用nagios性能數據輸出

 

 

 

 

vim/usr/local/nagios/etc/objects/commands.cfg

#把原來的process-host-perfdataprocess-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$

}

 

vim /usr/local/nagios/etc/objects/templates.cfg

#添加

define host {

       name       host-pnp

       register   0

       action_url/pnp4nagios/share/index.php/graph?host=$HOSTNAME$&srv=_HOST_

       process_perf_data               1

}

define service {

       name       srv-pnp

       register   0

       action_url/pnp4nagios/share/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$

       process_perf_data               1

}

 

#這里應該注意apache配置文件,有的要修改vim/usr/local/apache2/conf/httpd.conf

DocumentRoot "/usr/local/apache2/ htdocs"修改為DocumentRoot"/usr/local"

下面是我另一個主機,沒有改apache2配置文件

define host {

       name       hosts-pnp

       register   0

       action_url /nagios/pnp/index.php/graph?host=$HOSTNAME$&srv=_HOST_

       process_perf_data               1

}

define service {

       name       srv-pnp

       register   0

       action_url/nagios/pnp/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$

       process_perf_data               1

}

 

 

vim /usr/local/nagios/include/xiaojun.cfg

define host{

       use                    linux-server,host-pnp

       host_name              115.28.76.154

       alias                   141

       address                115.28.76.154

       }

 

define service{

       use                    generic-service,srv-pnp

       host_name              115.28.76.154

       service_description     check_ping

       check_command          check_ping!100.0,20%!200.0,50%

       max_check_attempts 5

       normal_check_interval 1

}

 

/etc/init.d/nagios start

/usr/local/apache2/bin/apachectl start

/etc/init.d/npcd start

 

#啟動后在/usr/local/nagios/share/perfdata會產生相應主機的pnp文件

#如果有錯就打開日式debug模式

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

#修改

LOG_LEVEL = 2

/etc/init.d/nagios restart

 

出現

nagios結合pnp4nagios圖表

解決方法:

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

 

 


向AI問一下細節

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

AI

汉阴县| 科尔| 木里| 浦江县| 惠来县| 龙泉市| 枣强县| 玛多县| 夏河县| 安徽省| 宜宾市| 阿拉善右旗| 金华市| 璧山县| 台南市| 怀宁县| 大渡口区| 滕州市| 宜州市| 特克斯县| 东乌珠穆沁旗| 普兰县| 连城县| 兴业县| 姚安县| 新河县| 宿迁市| 松江区| 广德县| 茌平县| 九台市| 元朗区| 丹江口市| 金山区| 达日县| 清远市| 石台县| 清水河县| 石嘴山市| 英山县| 天镇县|