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

溫馨提示×

溫馨提示×

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

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

開源監控解決方案Nagios+Cacti+PNP4Nagios+NConf+NDOUtils+Nagvis(三)pnp4nagios安裝

發布時間:2020-06-22 20:51:04 來源:網絡 閱讀:1003 作者:369177825 欄目:移動開發

官網地址:https://docs.pnp4nagios.org/


前面的文章已經說過,pnp4nagios的Broker模式不支持nagios4x,這里采用Bulk Mode模式

開源監控解決方案Nagios+Cacti+PNP4Nagios+NConf+NDOUtils+Nagvis(三)pnp4nagios安裝

1.RRDtool的安裝,這里使用的是yum安裝
#yum install -y rrdtool*

2.pnp4nagios安裝
#tar -zxvf pnp4nagios-0.6.25.tar.gz
#cd pnp4nagios-0.6.25
#./configure --with-rrdtool=/usr/bin/rrdtool  --with-perfdata-dir=/usr/local/nagios/share/perfdata --with-perfdata-spool-dir=/usr/local/nagios/share/spool --with-nagios-user=nagios --with-nagios-group=nagios
#make all
#make install
#make install-config
#make install-init

3.pnp4nagios配置

cd  /usr/local/pnp4nagios/etc  
mv misccommands.cfg-sample  misccommands.cfg  
mv nagios.cfg-sample nagios.cfg  
mv rra.cfg-sample rra.cfg  
cd /usr/local/pnp4nagios/etc/pages/  
mv web_traffic.cfg-sample web_traffic.cfg  
cd ../check_commands  
mv check_all_local_disks.cfg-sample  check_all_local_disks.cfg  
mv check_nrpe.cfg-sample  check_nrpe.cfg  
mv check_nwstat.cfg-sample  check_nwstat.cfg

#重啟服務
#service npcd restart

4.修改相關配置文件
(1)修改templates.cfg,增加一個定義PNP的host和service
define host {  
      name       host-pnp  
      register   0  
      action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=_HOST_' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=_HOST_
      process_perf_data              1  
}  
define service {  
      name       srv-pnp  
      register   0  
      action_url /pnp4nagios/index.php/graph?host=$HOSTNAME$&srv=$SERVICEDESC$' class='tips' rel='/pnp4nagios/index.php/popup?host=$HOSTNAME$&srv=$SERVICEDESC$
      process_perf_data              1  
}

(2)修改nagios.cfg

process_performance_data=1

enable_environment_macros=1

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

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

host_perfdata_file_template=DATATYPE::HOSTPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tHOSTPERFDATA::$HOSTPERFDATA$\tHOSTCHECKCOMMAND::$HOSTCHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$

service_perfdata_file_template=DATATYPE::SERVICEPERFDATA\tTIMET::$TIMET$\tHOSTNAME::$HOSTNAME$\tSERVICEDESC::$SERVICEDESC$\tSERVICEPERFDATA::$SERVICEPERFDATA$\tSERVICECHECKCOMMAND::$SERVICECHECKCOMMAND$\tHOSTSTATE::$HOSTSTATE$\tHOSTSTATETYPE::$HOSTSTATETYPE$\tSERVICESTATE::$SERVICESTATE$\tSERVICESTATETYPE::$SERVICESTATETYPE$\tSERVICEOUTPUT::$SERVICEOUTPUT$

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

(3)修改commands.cfg
增加如下配置
define command{
command_name process-service-perfdata-file
command_line /usr/local/pnp4nagios/libexec/process_perfdata.pl --bulk=/usr/local/pnp4nagios/var/service-perfdata
}
define command{
command_name process-host-perfdata-file
command_line /usr/local/pnp4nagios/libexec/process_perfdata.pl --bulk=/usr/local/pnp4nagios/var/host-perfdata
}

     
(4)修改host和service的模版
define host{
       name                   gchost
       use                    host-pnp
       max_check_attempts       1
       normal_check_interval    2
       retry_check_interval     1
       check_period          24x7
       contact_groups        myself_group
       notification_interval  2
       notification_period   24x7
       notification_options   d,u,r
       check_command          check-host-alive
       }
               
define service{
       name                    myself_temp
       use                     srv-pnp
       max_check_attempts      2
       normal_check_interval   2
       retry_check_interval    1
       check_period            24x7
       notification_interval   2
       notification_period     24x7
       notification_options    w,u,c,r
       contact_groups          myself_group
       check_command           check-host-alive
       register                0        
}

(5)apache配置
#vim /etc/httpd/conf/httpd.conf

Alias /pnp4nagios "/usr/local/pnp4nagios/share"  
 
<Directory "/usr/local/pnp4nagios/share">  
    AllowOverride None  
    Order allow,deny  
    Allow from all  
    #  
    # Use the same value as defined in nagios.conf  
    #  
    AuthName "Nagios Access"  
    AuthType Basic  
    AuthUserFile /usr/local/nagios/etc/htpasswd.users
    Require valid-user  
        <IfModule mod_rewrite.c>  
                  #Turn on URL rewriting  
                  RewriteEngine On  
                  Options symLinksIfOwnerMatch  
                  #Installation directory  
                  RewriteBase /pnp4nagios/  
                  #Protect application and system files from being viewed  
                  RewriteRule "^(?:application|modules|system)/" - [F]  
                  #Allow any files or directories that exist to be displayed directly  
                  RewriteCond "%{REQUEST_FILENAME}" !-f  
                  RewriteCond "%{REQUEST_FILENAME}" !-d  
                  #Rewrite all other URLs to index.php/URL  
                  RewriteRule "^.*$" "index.php/$0" [PT]  
        </IfModule>  
</Directory>

(6)復制鼠標懸停圖標顯示
cp /usr/local/src/pnp4nagios-0.6.25/contrib/ssi/* /usr/local/nagios/share/ssi/


到這里就可以檢測nagios配置文件無誤后重啟nagios觀看效果

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

#/etc/init.d/nagios restart

#/etc/init.d/httpd restart


附上nagios啟動之后可能會遇到的問題以及解決辦法以供參考

1.點擊圖標按鈕如果出現如下提示,執行

#rm -rf  /usr/local/pnp4nagios/share/install.php

開源監控解決方案Nagios+Cacti+PNP4Nagios+NConf+NDOUtils+Nagvis(三)pnp4nagios安裝


2.點擊圖標按鈕如果出現如下提示,執行

#chown -R tong:tong  /var/lib/php

開源監控解決方案Nagios+Cacti+PNP4Nagios+NConf+NDOUtils+Nagvis(三)pnp4nagios安裝


向AI問一下細節

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

AI

滁州市| 乐亭县| 石柱| 垦利县| 垫江县| 原阳县| 牡丹江市| 湖北省| 龙游县| 开原市| 察雅县| 民权县| 潼关县| 大安市| 曲松县| 玉田县| 利津县| 石首市| 八宿县| 焉耆| 磐石市| 潜江市| 广汉市| 商洛市| 布尔津县| 婺源县| 卫辉市| 河津市| 台湾省| 舟曲县| 东方市| 万载县| 乐清市| 巴马| 秭归县| 明水县| 水富县| 都昌县| 浮山县| 获嘉县| 浦县|