1. <ul id="0c1fb"></ul>

      <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
      <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区

      RELATEED CONSULTING
      相關(guān)咨詢
      選擇下列產(chǎn)品馬上在線溝通
      服務(wù)時(shí)間:8:30-17:00
      你可能遇到了下面的問題
      關(guān)閉右側(cè)工具欄

      新聞中心

      這里有您想知道的互聯(lián)網(wǎng)營(yíng)銷解決方案
      nagios郵件報(bào)警配置-創(chuàng)新互聯(lián)

      搭建nagios的目的就是為了他的報(bào)警系統(tǒng),nagios據(jù)我所了解可以有三種報(bào)警:
      一、聲音報(bào)警
      二、電子郵件報(bào)警
      三、手機(jī)短訊報(bào)警
      下面是我的郵件報(bào)警的配置過(guò)程:
      1、開啟系統(tǒng)自帶的sendmail郵件系統(tǒng)
      service sendmail start
      如果沒有安裝,可以yum一下
      yum install -y sendmail*
      service sendmail restart
      測(cè)試發(fā)送郵件:
      echo "test" | mail lihuipeng007@163.com
      我系統(tǒng)在關(guān)掉iptables和selinux前提下是正常的
      2、配置nagios中報(bào)警郵箱
      vi /usr/local/nagios/etc/objects/contacts.cfg
      define contact{
      contact_name                   nagiosadmin            ; Short name of user
      use                            generic-contact        ; Inherit default values from generic-contact template (defined above)
      alias                          Nagios Admin           ; Full name of user
      email                           lihuipeng007@163.com   ; <<***** CHANGE THIS TO YOUR EMAIL ADDRESS ******
      }
      在email那里加上自己的郵箱,如果有多個(gè)可以用逗號(hào)隔開
      3、設(shè)置報(bào)警方式:
      vi /usr/local/nagios/etc/objects/templates.cfg
      define contact{
      name                           generic-contact        ; The name of this contact template
      service_notification_period    24x7                   ; service notifications can be sent anytime
      host_notification_period       24x7                   ; host notifications can be sent anytime
      service_notification_options   w,u,c,r,f,s            ; send notifications for all service states, flapping events, and scheduled downtime events
       host_notification_options      d,u,r,f,s              ; send notifications for all host states, flapping events, and scheduled downtime events
      service_notification_commands  notify-service-by-email ; send service notifications via email
      host_notification_commands     notify-host-by-email   ; send host notifications via email
      register                       0                      ; DONT REGISTER THIS DEFINITION - ITS NOT A REAL CONTACT, JUST A TEMPLATE!
      }
      這兩個(gè)notify-service-by-email 和 notify-host-by-email   是在command.cfg那里定義的,看看是怎么定義的:
      # 'notify-host-by-email' command definition
      define command{
      command_name   notify-host-by-email
       command_line   /usr/bin/printf "%b" "***** Nagios ***** Notification Type: $NOTIFICATIONTYPE$ Host: $HOSTNAME$ State: $HOSTSTATE$ Address: $HOSTADDRESS$ Info: $HOSTOUTPUT$ Date/Time: $LONGDATETIME$ " | /bin/mail -s "** $NOTIFICATIONTYPE$ Host Alert: $HOSTNAME$ is $HOSTSTATE$ **" $CONTACTEMAIL$
      }
      # 'notify-service-by-email' command definition
      define command{
      command_name   notify-service-by-email
       command_line   /usr/bin/printf "%b" "***** Nagios ***** Notification Type: $NOTIFICATIONTYPE$ Service: $SERVICEDESC$ Host: $HOSTALIAS$ Address: $HOSTADDRESS$ State: $SERVICESTATE$ Date/Time: $LONGDATETIME$ Additional Info: $SERVICEOUTPUT$ " | /bin/mail -s "** $NOTIFICATIONTYPE$ Service Alert: $HOSTALIAS$/$SERVICEDESC$ is $SERVICESTATE$ **" $CONTACTEMAIL$
      }
      這里已經(jīng)默認(rèn)配置好,我們不用修改直接調(diào)用就是了
      最后重啟服務(wù):
      service nagios retart
      然后隨便關(guān)掉一些服務(wù)測(cè)試一下效果!

      創(chuàng)新互聯(lián)公司主要從事成都網(wǎng)站設(shè)計(jì)、成都網(wǎng)站建設(shè)、網(wǎng)頁(yè)設(shè)計(jì)、企業(yè)做網(wǎng)站、公司建網(wǎng)站等業(yè)務(wù)。立足成都服務(wù)江西,10多年網(wǎng)站建設(shè)經(jīng)驗(yàn),價(jià)格優(yōu)惠、服務(wù)專業(yè),歡迎來(lái)電咨詢建站服務(wù):18980820575

      另外有需要云服務(wù)器可以了解下創(chuàng)新互聯(lián)scvps.cn,海內(nèi)外云服務(wù)器15元起步,三天無(wú)理由+7*72小時(shí)售后在線,公司持有idc許可證,提供“云服務(wù)器、裸金屬服務(wù)器、高防服務(wù)器、香港服務(wù)器、美國(guó)服務(wù)器、虛擬主機(jī)、免備案服務(wù)器”等云主機(jī)租用服務(wù)以及企業(yè)上云的綜合解決方案,具有“安全穩(wěn)定、簡(jiǎn)單易用、服務(wù)可用性高、性價(jià)比高”等特點(diǎn)與優(yōu)勢(shì),專為企業(yè)上云打造定制,能夠滿足用戶豐富、多元化的應(yīng)用場(chǎng)景需求。


      文章標(biāo)題:nagios郵件報(bào)警配置-創(chuàng)新互聯(lián)
      當(dāng)前URL:http://www.ef60e0e.cn/article/pcchh.html
      99热在线精品一区二区三区_国产伦精品一区二区三区女破破_亚洲一区二区三区无码_精品国产欧美日韩另类一区
      1. <ul id="0c1fb"></ul>

        <noscript id="0c1fb"><video id="0c1fb"></video></noscript>
        <noscript id="0c1fb"><listing id="0c1fb"><thead id="0c1fb"></thead></listing></noscript>

        满洲里市| 临泽县| 永平县| 赤壁市| 荔浦县| 宾川县| 湄潭县| 莱西市| 镇江市| 罗城| 若羌县| 焦作市| 新晃| 宜兴市| 嵊州市| 合山市| 富源县| 长武县| 外汇| 电白县| 武夷山市| 昌宁县| 胶州市| 昂仁县| 甘孜县| 漠河县| 嘉祥县| 密云县| 宜兰市| 通州区| 阳山县| 华池县| 洛隆县| 北碚区| 沾益县| 翁牛特旗| 喀喇沁旗| 新化县| 凤庆县| 达拉特旗| 隆尧县|