成人免费xxxxx在线视频软件_久久精品久久久_亚洲国产精品久久久_天天色天天色_亚洲人成一区_欧美一级欧美三级在线观看

Nagios 配置文件解析

運維 系統運維
在為自己的操作系統配置Nagios-監控系統時,我們有必要學習下Nagios的配置文件,讓我們來看看他的具體內容!

Nagios配置文件在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.  

#p#
 

 

  # 定義監測打印機

 

  1.   #cfg_file=/usr/local/nagios/etc/objects/printer.cfg  
  2.  
  3.   # You can also tell Nagios to process all config files (with a .cfg  
  4.  
  5.   # extension) in a particular directory by using the cfg_dir  
  6.  
  7.   # directive as shown below:  
  8.  

 

  # 您也可以告訴Nagios處理所有配置文件(帶有.cfg擴展名)在特定的目錄使用cfg_dir指令如下所示:

 

  1.   #cfg_dir=/usr/local/nagios/etc/servers  
  2.  
  3.   #cfg_dir=/usr/local/nagios/etc/printers  
  4.  
  5.   #cfg_dir=/usr/local/nagios/etc/switches  
  6.  
  7.   #cfg_dir=/usr/local/nagios/etc/routers  
  8.  

 

  配置文件里的變量:

  日志文件

  格式: log_file=

  樣例: log_file=/usr/local/nagios/var/nagios.log

  說明:

  這個變量用于設定Nagios在何處創建其日志文件。它應該是你主配置文件里面的***個變量,當Nagios找到你配置文件并發現配置里有錯誤時會向該文件中寫入錯誤信息。如果你使能了日志回滾,Nagios將在每小時、每天、每周或每月對日志進行回滾。

  對象配置文件

  格式: cfg_file=

  樣例:

 

  1.   cfg_file=/usr/local/nagios/etc/hosts.cfg  
  2.  
  3.   cfg_file=/usr/local/nagios/etc/services.cfg  
  4.  
  5.   cfg_file=/usr/local/nagios/etc/commands.cfg  
  6.  

 

  說明:

  該變量用于指定一個包含有將用于Nagios監控對象的對象配置文件。對象配置文件中包括有主機、主機組、聯系人、聯系人組、服務、命令等等對象的定義。配置信息可以切分為多個文件并且用cfg_file=語句來指向每個待處理的配置文件.

  對象配置目錄:

  格式: cfg_dir=

  樣例:

 

  1.   cfg_dir=/usr/local/nagios/etc/commands  
  2.  
  3.   cfg_dir=/usr/local/nagios/etc/services  
  4.  
  5.   cfg_dir=/usr/local/nagios/etc/hosts  
  6.  

 

  說明:

  該變量用于指定一個目錄,目錄里包含有將用于Nagios監控對象的對象配置文件。所有的在這個目錄下的且以.cfg為擴展名的文件將被作為配置文件來處理。另外,Nagios將會遞歸該目錄下的子目錄并處理其子目錄下的全部配置文件。你可以把配置放入不同的目錄并且用cfg_dir=語句來指向每個待處理的目錄。

總結:在我們學習了Nagios 配置文件的具體內容后,別忘了應用到自己的Nagios,使他更好的為你服務!

【編輯推薦】

 

 

責任編輯:趙鵬 來源: 網絡轉載
相關推薦

2011-03-25 17:13:37

Nagios配置文件

2011-03-28 15:52:16

Nagios配置文件

2011-04-01 16:30:49

Nagios

2010-05-31 11:10:37

Nagios pnp

2011-03-23 15:13:08

Nagios配置文件

2011-03-22 13:37:29

Nagios安裝

2011-03-23 13:29:46

配置Nagios系統

2010-02-22 10:18:18

WCF配置文件

2021-07-05 12:09:58

Python編程語言

2022-11-10 09:05:18

Lua配置文件

2021-07-13 05:47:40

GroovyJSON軟件開發

2009-12-21 11:19:50

WCF配置文件

2010-02-03 09:19:31

Python模塊

2010-03-18 18:17:01

Python 配置文件

2011-09-08 16:07:13

Widget配置文件

2021-07-08 21:19:04

BashLinux

2020-10-20 10:12:00

Windows

2010-05-28 18:31:25

Nagios配置

2011-01-19 14:00:21

2011-01-13 16:27:26

Linux配置文件
點贊
收藏

51CTO技術棧公眾號

主站蜘蛛池模板: 亚洲91精品 | 男女视频在线观看免费 | 国产日屁 | 国产精品观看 | a在线观看 | 亚洲免费人成在线视频观看 | 久久在线| 99pao成人国产永久免费视频 | 精品国产精品三级精品av网址 | 欧美高清视频 | 国产精品a久久久久 | 久久69精品久久久久久久电影好 | 久久97精品 | 成人av网站在线观看 | 日日日色| 人人鲁人人莫人人爱精品 | 中文字幕1区 | 91porn在线 | 中文字幕一区二区三区乱码在线 | 888久久久| 精品久久久久久中文字幕 | 欧美电影在线观看网站 | 日韩在线观看中文字幕 | 99视频在线免费观看 | 欧美精品福利 | 久久亚洲一区二区三区四区 | 狠狠干美女 | 午夜视频在线观看一区二区 | 欧美在线观看一区二区 | 97国产一区二区 | 久久不卡 | 日韩一区欧美一区 | 精品日韩一区 | 日本粉嫩一区二区三区视频 | 国产精品夜夜春夜夜爽久久电影 | 91精品久久久久久久久中文字幕 | 亚洲成人一级 | 国产精品69久久久久水密桃 | 亚洲一区二区三区高清 | 成人精品国产 | 精品国产一区探花在线观看 |