最新国产好看的视频,伊人天堂AV在线,国产Aaaaaa视频,蜜臀视频在线观看一区,人妻av色图,密臀久久久精品影片,青青视频免费观看毛片,久草在线观看视,国产三级精品色情在线

Nagios監(jiān)控Windows Server 2008配置方法

 更新時間:2013年12月16日 15:05:36   作者:  
Nagios監(jiān)控windows服務器有三種實現(xiàn)方式:SNMP,NSClient++,NRPE,后面兩種方式都需要在Windows服務器上安裝agent,今天只和大家分享使用NSClient++方式來監(jiān)控Windows Server 2008

1.安裝NSClient++

訪問http://nsclient.org/nscp/下載NSClient++,這里我使用的是NSClient++-0.3.9-x64的msi安裝包。下載之后直接安裝,過程中會提示輸入Nagios監(jiān)控服務器地址和密碼。地址填寫正確,密碼不用設置。Nagios監(jiān)控服務器事先在監(jiān)控Linux服務器時候已經(jīng)搭建好,以后再和大家分享。
安裝如下圖所示:

2.配置NSClient++

編輯安裝目錄下的NES.ini文件,打開NSClient++的端口。方法為找到:
[NSClient]
;port=12489
去掉port前的“;”就可以啟用12489端口。

我的是安裝在服務器的program files下的NSClient++-Win32-0.3.9目錄中。在cmd中執(zhí)行:
cd C:\Program files\NSClient++-Win32-0.3.5
netstat -an | more
查看12489端口是否正常監(jiān)聽在。
因為安裝時候需要的模塊已經(jīng)勾選了,所以配置文件中不用再作設置。否則可以通過去掉每個模塊前的;來啟用該模塊。

到這里即完成了Windows Server 2008上的配置。接下來我們設置Nagios監(jiān)控服務器。

3.Nagios監(jiān)控服務器設置

vi /usr/local/nagios/etc/nagios.cfg
搜索找到:
# Definitions for monitoring a Windows machine
# cfg_file=/usr/local/nagios/etc/objects/windows.cfg
將第二行的#去掉打開Nagios監(jiān)控的Windows模塊,然后保存。

接著編輯
# vi /usr/local/nagios/etc/objects/windows.cfg
找到并設置監(jiān)控的服務器:
define host{
use windows-server ; Inherit default values from a template
host_name winserver ; The name we're giving to this host
alias My Windows Server ; A longer name associated with the host
address 192.168.0.2 ; IP address of the host
}
設置被監(jiān)控主機名和被監(jiān)控的Windows服務器地址。

接下來搜索各種監(jiān)控的服務并設置:
# Create a service for monitoring the version of NSCLient++ that is installed
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name winserver
service_description NSClient++ Version
check_command check_nt!CLIENTVERSION
}
監(jiān)控NSClient版本。

# Create a service for monitoring the uptime of the server
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name winserver
service_description Uptime
check_command check_nt!UPTIME
}

監(jiān)控服務器在線時間。

# Create a service for monitoring CPU load
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name winserver
service_description CPU Load
check_command check_nt!CPULOAD!-l 20,30,50
}

監(jiān)控服務器CPU負載。

# Create a service for monitoring memory usage
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name winserver
service_description Memory Usage
check_command check_nt!MEMUSE!-w 80 -c 90
}
監(jiān)控服務器的內(nèi)存占用。

# Create a service for monitoring C:\ disk usage
# Change the host_name to match the name of the host you defined above

define service{
use generic-service
host_name winserver
service_description C:\ Drive Space
check_command check_nt!USEDDISKSPACE!-l c -w 80 -c 90
}
監(jiān)控系統(tǒng)C盤的磁盤占用。

部署好之后在Nagios中顯示如下:

相關文章

最新評論

洛川县| 平顶山市| 安龙县| 休宁县| 长海县| 宿松县| 东丰县| 剑阁县| 海伦市| 津市市| 达日县| 建湖县| 微山县| 修文县| 靖江市| 吉水县| 大新县| 谷城县| 宾阳县| 靖远县| 丹东市| 容城县| 施甸县| 墨脱县| 大同县| 淳化县| 会理县| 高州市| 大丰市| 皋兰县| 梅州市| 余姚市| 安顺市| 文登市| 永宁县| 衡阳市| 西藏| 西安市| 桃江县| 山东| 武宣县|