Nagios 設定檔解析(1)

來源:互聯網
上載者:User

Nagios設定檔在Nagios安裝和配置時顯得尤為重要,讓我們來具體的看看他的內容!

 

圖-Nagios

主設定檔[--prefix/nagios/etc/nagios.cfg]:

 
  1. # NAGIOS.CFG - Sample Main Config File for Nagios 3.0.6  
  2.  
  3. # Read the documentation for more information on this configuration  
  4.  
  5. # file. I've provided some comments here, but things may not be so  
  6.  
  7. # clear without further explanation.  
  8.  
  9. # Last Modified: 10-15-2008  
  10.  

# LOG FILE

 
  1. # This is the main log file where service and host events are logged  
  2.  
  3. # for historical purposes. This should be the first option specified  
  4.  
  5. # in the config file!!!  
  6.  

# 這個變數用於設定Nagios在何處建立其記錄檔。

# 它應該是你主設定檔裡面的第一個變數,當Nagios找到你設定檔並發現配置裡有錯誤時會向該檔案中寫入錯誤資訊。

# 如果你使能了日誌復原,Nagios將在每小時、每天、每周或每月對日誌進行復原。

log_file=/usr/local/nagios/var/nagios.log

# OBJECT CONFIGURATION FILE(S)

# 對象的設定檔

 
  1. # These are the object configuration files in which you define hosts,  
  2.  
  3. # host groups, contacts, contact groups, services, etc.  
  4.  
  5. # You can split your object definitions across several config files  
  6.  
  7. # if you wish (as shown below), or keep them all in a single config file.  
  8.  

# 該變數用於指定一個包含有將用於Nagios監控對象的對象設定檔。

# 對象設定檔中包括有主機、主機群組、連絡人、連絡人群組、服務、命令等等對象的定義。

# 配置資訊可以切分為多個檔案並且用cfg_file=語句來指向每個待處理的設定檔

# You can specify individual object config files as shown below:

# 您可以指定單個對象的設定檔, 如下所示:

 
  1. cfg_file=/usr/local/nagios/etc/objects/commands.cfg  
  2.  
  3. cfg_file=/usr/local/nagios/etc/objects/contacts.cfg  
  4.  
  5. cfg_file=/usr/local/nagios/etc/objects/timeperiods.cfg  
  6.  
  7. cfg_file=/usr/local/nagios/etc/objects/templates.cfg  
  8.  
  9. # Definitions for monitoring the local (Linux) host  
  10.  

# 定義監測本地( Linux )主機

 
  1. cfg_file=/usr/local/nagios/etc/objects/localhost.cfg  
  2.  
  3. # Definitions for monitoring a Windows machine  
  4.  

# 定義監測( windows )主機

 
  1. #cfg_file=/usr/local/nagios/etc/objects/windows.cfg  
  2.  
  3. # Definitions for monitoring a router/switch 
  4.  

# 定義監測路由器或交換器

 
  1. #cfg_file=/usr/local/nagios/etc/objects/switch.cfg  
  2.  
  3. # Definitions for monitoring a network printer  
  4.  


聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.