国产探花免费观看_亚洲丰满少妇自慰呻吟_97日韩有码在线_资源在线日韩欧美_一区二区精品毛片,辰东完美世界有声小说,欢乐颂第一季,yy玄幻小说排行榜完本

首頁 > 網站 > 幫助中心 > 正文

Nagios遠程監(jiān)控安裝與配置詳解圖文第3/3頁

2024-07-09 22:40:50
字體:
來源:轉載
供稿:網友

2、增加新的配置文件
先創(chuàng)建簡單的配置文件timeperiods.cfg,其內容如下:
define timeperiod{    timeperiod_name 24x7    alias      24 Hours A Day, 7 Days A Week    sunday     00:00-24:00    monday     00:00-24:00    tuesday     00:00-24:00    wednesday    00:00-24:00    thursday    00:00-24:00    friday     00:00-24:00    saturday    00:00-24:00    }
這個文件的定義明晰易懂,不多做說明。另建議7X24小時監(jiān)控。
第二個手動創(chuàng)建的配置文件是 contacts.cfg,其格式如下:
define contact {    contact_name     sa  //不要有空格    alias        system administrator    service_notification_period  24x7    host_notification_period    24x7    service_notification_options  w,u,c,r    host_notification_options    d,u,r    service_notification_commands service-notify-by-sms,service-notify-by-email //這個命令讀配置文件miscommands.cfg    host_notification_commands   host-notify-by-email,host-notify-by-sms   //這個命令讀配置文件miscommands.cfg    email             sery@163.com    pager             13333333333 //手機號,收報警短信    }   //不要把這個符號寫掉了define contact {    contact_name     sery    alias        system administrator    service_notification_period  24x7    host_notification_period    24x7    service_notification_options  w,u,c,r    host_notification_options    d,u,r    service_notification_commands service-notify-by-sms,service-notify-by-email    host_notification_commands   host-notify-by-email,host-notify-by-sms    email             sery@sohu.com    pager             13312345678    }
上面的文件定義了2個聯(lián)系人,如果有更多聯(lián)系人的話,照這個格式在后面追加即可。服務通知選項(service_notification_options)與主機通知選項(host_notification_options)的幾個選項在這里說明一下:w-warning , u-unknown,c-critical,r-recovery;d-down,u-unreachable,注意一下,主機報警和服務報警有些差異。
緊接著的第三個手動創(chuàng)建的配置文件是contactgroups.cfg文件,這個文件是依照上一個文件contacts.cfg來的,contactgroups文件相對簡單一些,其格式如下:
define contactgroup {    contactgroup_name  sagroup //不要用空格    alias        system administrator group    members       sa,sery //本例有2個成員}
多個成員之間用逗號做分界符,如果有更多的聯(lián)系組,就依相同的格式在文件中追加余下的組。
關鍵的角色終于登場,這就是配置文件hosts.cfg。下面是我定義的兩個主機的基本樣式:
  • <noscript id="9gocr"></noscript>

        <noscript id="9gocr"></noscript>
        <style id="9gocr"></style>
        <small id="9gocr"></small>
              #define monitor host################################################################## Wangjing IDC servers                     ##################################################################define host {    host_name         nagios-server    alias           nagios server    address          61.x..x.49    contact_groups       sagroup //多個聯(lián)系組用逗號分隔,
              數據來源于contactgroups.cfg check_command check-host-alive max_check_attempts 5 notification_interval 10 //值可調,大小什么值合適需自己測定 notification_period 24x7 notification_options d,u,r }define host { host_name 24-25 alias server 24-25 address 202.X.24.25 contact_groups sagroup check_command check-host-alive //down機就發(fā)報警通知 max_check_attempts 5 notification_interval 10 notification_period 24x7 notification_options d,u,r }
              發(fā)表評論 共有條評論
              用戶名: 密碼:
              驗證碼: 匿名發(fā)表
              主站蜘蛛池模板: 嘉荫县| 伊金霍洛旗| 石家庄市| 淳安县| 金塔县| 东丽区| 资中县| 广州市| 玛沁县| 绵竹市| 汝州市| 白山市| 临西县| 杭州市| 普兰县| 石家庄市| 荆州市| 松滋市| 安阳县| 辽阳县| 吉林省| 鸡泽县| 板桥市| 北票市| 女性| 临安市| 绿春县| 岳阳市| 绥滨县| 承德市| 怀集县| 沙田区| 宜都市| 沁阳市| 大名县| 山东| 平邑县| 建湖县| 正定县| 宾阳县| 建水县|
              <td id="9gocr"></td>