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

首頁 > 服務器 > Win服務器 > 正文

Nagios監控Windows Server 2008配置方法

2024-09-10 00:04:30
字體:
來源:轉載
供稿:網友

1.安裝NSClient++

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

2.配置NSClient++

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

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

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

3.Nagios監控服務器設置

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

接著編輯
# vi /usr/local/nagios/etc/objects/windows.cfg
找到并設置監控的服務器:
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
}
設置被監控主機名和被監控的Windows服務器地址。

接下來搜索各種監控的服務并設置:
# 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
}
監控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
}

監控服務器在線時間。

# 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
}

監控服務器CPU負載。

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

define service{

發表評論 共有條評論
用戶名: 密碼:
驗證碼: 匿名發表
主站蜘蛛池模板: 仲巴县| 静安区| 慈溪市| 天水市| 嵊泗县| 正蓝旗| 贺兰县| 万盛区| 耿马| 嵊州市| 余庆县| 汝南县| 东丽区| 方城县| 靖州| 绥中县| 吴川市| 泸水县| 镇安县| 图木舒克市| 当涂县| 那坡县| 常宁市| 远安县| 梓潼县| 广东省| 额济纳旗| 红河县| 潜山县| 腾冲县| 桐庐县| 图木舒克市| 治县。| 巴马| 绥阳县| 浦城县| 蓬安县| 墨脱县| 普安县| 增城市| 科技|