麻豆小视频在线观看_中文黄色一级片_久久久成人精品_成片免费观看视频大全_午夜精品久久久久久久99热浪潮_成人一区二区三区四区

首頁 > OS > Win2008 > 正文

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

2024-09-10 12:00:54
字體:
供稿:網(wǎng)友
Nagios監(jiān)控windows服務(wù)器有三種實(shí)現(xiàn)方式:SNMP,NSClient++,NRPE,后面兩種方式都需要在Windows服務(wù)器上安裝agent,今天只和大家分享使用NSClient++方式來監(jiān)控Windows Server 2008

1.安裝NSClient++

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

2.配置NSClient++

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

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

到這里即完成了Windows Server 2008上的配置。接下來我們?cè)O(shè)置Nagios監(jiān)控服務(wù)器。

3.Nagios監(jiān)控服務(wù)器設(shè)置

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
找到并設(shè)置監(jiān)控的服務(wù)器:
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
}
設(shè)置被監(jiān)控主機(jī)名和被監(jiān)控的Windows服務(wù)器地址。

接下來搜索各種監(jiān)控的服務(wù)并設(shè)置:
# 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)控服務(wù)器在線時(shí)間。

# 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)控服務(wù)器CPU負(fù)載。

# 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

發(fā)表評(píng)論 共有條評(píng)論
用戶名: 密碼:
驗(yàn)證碼: 匿名發(fā)表
主站蜘蛛池模板: 美女擦逼| 性欧美xxxx极品摘花 | 亚洲国产精品久久久久久久久久 | 狠狠久久伊人中文字幕 | 国产三级在线观看a | 91美女视频在线观看 | 午夜视频导航 | 成人在线观看免费观看 | 国产精品jk白丝蜜臀av软件 | 日韩一级片一区二区三区 | 轻点插视频 | 91网视频 | 欧美日本国产精品 | 欧美三日本三级少妇三级99观看视频 | 98国内自拍在线视频 | 国产免费高清在线视频 | 亚洲xxx在线观看 | 黑人一级片 | 91精品最新国内在线播放 | 亚洲国产网址 | 美女亚洲综合 | 在线成人精品视频 | 中文亚洲视频 | 免费观看视频在线 | 日韩视频高清 | av免费av| 日本中文不卡视频 | 国产91对白叫床清晰播放 | 看片一区二区三区 | 天堂成人国产精品一区 | 色99久久 | 欧美激情第一区 | www.mitao| 久精品国产 | 精品国产一区二区三 | 久久色伦理资源站 | 国产精品伦视频看免费三 | 精品一区二区久久久久久久网精 | 中文字幕 欧美 日韩 | 福利一区二区三区视频在线观看 | 久久久久久久久国产精品 |