中文字幕第五页-中文字幕第页-中文字幕韩国-中文字幕最新-国产尤物二区三区在线观看-国产尤物福利视频一区二区

nagios監控windows-創新互聯

監控windows主機

創新互聯-專業網站定制、快速模板網站建設、高性價比徐水網站開發、企業建站全套包干低至880元,成熟完善的模板庫,直接使用。一站式徐水網站制作公司更省心,省錢,快速模板網站建設找我們,業務覆蓋徐水地區。費用合理售后完善,10余年實體公司更值得信賴。

監控windows主機通過snmp或者nsclient++來監控

nagios監控windows

Nsclient++可以監控windows主機的cpu、內存、磁盤空間、進程、服務

Nsclient++也支持nrpe所以也可以通過nrpe來監控

NSCA主動與nagios發送檢測,nagios端也需要NSCA daemon

通常使用check_nt,也是最簡單,功能最少的。

nagios監控windows

安裝NSClient

nagios監控windows

nagios監控windows

Allowed hosts:

Nagios所在的主機地址,我這里是192.168.102.128

Password:密碼

是否允許常見插件

是否允許check_nt

是否允許check_nrpe

關閉防火墻之后

上圖為安裝之后查看端口,12489監控0.0.0.0,即check_nt與nsclient++通信的端口

5666為nrpe所使用的端口

想要nagios監控windows

要安裝check_nt

[[email protected]]# cd /usr/local/nagios/libexec/

[root@localhostlibexec]#ls

[root@localhost libexec]# ./check_nt –h       查看幫助。

[root@localhost libexec]# ./check_nt -H 192.168.102.132(被監控主機ip) -p 12489 -v UPTIME

System Uptime - 0 day(s) 1 hour(s) 35 minute(s)         查看當前windows主機的啟動時間

[root@localhostlibexec]# ./check_nt -H 192.168.102.132 -p 12489 -v CPULOAD -w 80 -c 90 -l5,80,90

CPU Load2% (5 min average) |  '5 min avgLoad'=2%;80;90;0;100

查看當前windows主機的cpu使用情況。

[root@localhostlibexec]# ./check_nt -H 192.168.102.132 -p 12489 -v USEDDISKSPACE -w 80 -c 90-l C

C:\ -total: 14.65 Gb - used: 9.72 Gb (66%) - free 4.93 Gb (34%) | 'C:\ UsedSpace'=9.72Gb;11.72;13.18;0.00;14.65

檢測C盤的利用率

計劃進行監控

[root@localhostobjects]# cd /etc/nagios/objects/

[root@localhostobjects]# ls

commands.cfg  localhost.cfg  switch.cfg    timeperiods.cfg

contacts.cfg  printer.cfg   templates.cfg  windows.cfg

[root@localhost objects]# vim commands.cfg       在個加入新的命令。

definecommand{

    command_name check_nt

    command_line $USER1$/check_nt -H$HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$

}【源文件已經有了】

[root@localhost objects]# vim windows.cfg         定義主機

修改:

可以用vim命令:

.,$s@winserver@winhost@g

.     ,    $s   @winserver   @winhost     @g

當前行最后一行搜索 winserver   用其替換前面   go

【修改主機名,可以不進行修改】

[root@localhost objects]# vim windows.cfg

# Createa service for monitoring the W3SVC service

# Changethe host_name to match the name of the host you defined above

defineservice{

    use           generic-service

    host_name        winhost

    service_description   W3SVC

    check_command      check_nt!SERVICESTATE!-d SHOWALL -lW3SVC

    }

# Createa service for monitoring the Explorer.exe process

# Changethe host_name to match the name of the host you defined above

defineservice{

    use           generic-service

    host_name        winhost

    service_description   Explorer

    check_command      check_nt!PROCSTATE!-d SHOWALL -lExplorer.exe

    }

"windows.cfg" 145L, 4005C                          134,0-1    底端

最后啟用此配置文件:

[root@localhostobjects]# cd ..

[root@localhostnagios]# vim nagios.cfg

# You canspecify individual object config files as shown below:

cfg_file=/etc/nagios/objects/commands.cfg

cfg_file=/etc/nagios/objects/contacts.cfg

cfg_file=/etc/nagios/objects/timeperiods.cfg

cfg_file=/etc/nagios/objects/templates.cfg

cfg_file=/etc/nagios/objects/windows.cfg         添加

重啟之前,檢查語法錯誤。

[root@localhost nagios]# /usr/local/nagios/bin/nagios -v/etc/nagios/nagios.cfg

Nagios Core 3.2.0

Copyright (c) 2009 Nagios Core Development Team and CommunityContributors

Copyright (c) 1999-2009 Ethan Galstad

Last Modified: 08-12-2009

License: GPL

Website: http://www.nagios.org

Reading configuration data...

 Read main config fileokay...

Processing object config file '/etc/nagios/objects/commands.cfg'...

Warning: Duplicate definition found for command 'check_nt' (configfile '/etc/nagios/objects/   ommands.cfg', starting on line 241)

Error: Could not add object property in file'/etc/nagios/objects/commands.cfg' on line 242.【有問題了】

 Error processing objectconfig files!

***> One or more problems was encountered while processing theconfig files...

  Check your configurationfile(s) to ensure that they contain valid

  directives and datadefintions.  If you are upgrading from aprevious

  version of Nagios, youshould be aware that some variables/definitions

  may have been removed ormodified in this version.  Make sure toread

  the HTML documentationregarding the config files, as well as the

  'Whats New' section tofind out what has changed.

檢查原因是那里重復了。

再進行檢測

[root@localhost nagios]# /usr/local/nagios/bin/nagios -v/etc/nagios/nagios.cfg

Nagios Core 3.2.0

Copyright (c) 2009 Nagios Core Development Team and CommunityContributors

Copyright (c) 1999-2009 Ethan Galstad

Last Modified: 08-12-2009

License: GPL

Website: http://www.nagios.org

Reading configuration data...

 Read main config fileokay...

Processing object config file '/etc/nagios/objects/commands.cfg'...

Processing object config file '/etc/nagios/objects/contacts.cfg'...

Processing object config file'/etc/nagios/objects/timeperiods.cfg'...

Processing object config file '/etc/nagios/objects/templates.cfg'...

Processing object config file '/etc/nagios/objects/windows.cfg'...

Processing object config file '/etc/nagios/objects/localhost.cfg'...

 Read object config filesokay...

Running pre-flight check on configuration data...

Checking services...

    Checked 26 services.

Checking hosts...

    Checked 12 hosts.

Checking host groups...

    Checked 3 host groups.

Checking service groups...

    Checked 2 servicegroups.

Checking contacts...

    Checked 1 contacts.

Checking contact groups...

    Checked 1 contactgroups.

Checking service escalations...

    Checked 0 serviceescalations.

Checking service dependencies...

    Checked 0 servicedependencies.

Checking host escalations...

    Checked 0 hostescalations.

Checking host dependencies...

    Checked 0 hostdependencies.

Checking commands...

    Checked 24 commands.

Checking time periods...

    Checked 5 timeperiods.

Checking for circular paths between hosts...

Checking for circular host and service dependencies...

Checking global event handlers...

Checking obsessive compulsive processor commands...

Checking misc settings...

Total Warnings: 0

Total Errors:  0

Things look okay - No serious problems were detected during thepre-flight check

沒有錯誤。

[root@localhost nagios]# service nagios restart

Running configuration check...done.

Stopping nagios: done.

Starting nagios: done.

重啟服務,加載新的配置文件。

nagios監控windows

最后:

對多臺windows主機進行監控:

#cp windows.cfg winserver.cfg

然后修改ip

再把definegroup的注釋掉

添加到監控計劃中。

重啟服務。

nagios監控windows

另外有需要云服務器可以了解下創新互聯scvps.cn,海內外云服務器15元起步,三天無理由+7*72小時售后在線,公司持有idc許可證,提供“云服務器、裸金屬服務器、高防服務器、香港服務器、美國服務器、虛擬主機、免備案服務器”等云主機租用服務以及企業上云的綜合解決方案,具有“安全穩定、簡單易用、服務可用性高、性價比高”等特點與優勢,專為企業上云打造定制,能夠滿足用戶豐富、多元化的應用場景需求。

分享題目:nagios監控windows-創新互聯
網站網址:http://www.2m8n56k.cn/article34/peppe.html

成都網站建設公司_創新互聯,為您提供App設計商城網站Google網站內鏈建站公司網站營銷

廣告

聲明:本網站發布的內容(圖片、視頻和文字)以用戶投稿、用戶轉載內容為主,如果涉及侵權請盡快告知,我們將會在第一時間刪除。文章觀點不代表本網站立場,如需處理請聯系客服。電話:028-86922220;郵箱:[email protected]。內容未經允許不得轉載,或轉載時需注明來源: 創新互聯

成都做網站
主站蜘蛛池模板: 97超视频在线观看 | 亚洲精品一级一区二区三区 | 9cao在线精品免费 | 亚洲九九色 | 在线播放精品 | 日日摸日日碰夜夜97 | 成人精品视频在线观看播放 | 久草97| 在线观看视频亚洲 | a级片免费观看 | 国产成人精品日本亚洲语音1 | 欧美影院网站视频观看 | 亚洲产国偷v产偷v自拍涩爱 | 在线精品国产成人综合第一页 | 日韩在线视频观看 | 男人好大好硬好爽免费视频 | 亚洲一区在线观看视频 | 国产97在线视频 | 大伊香蕉精品视频在线天堂 | 亚洲人视频在线观看 | 国产成人十八黄网片 | 国产高清视频免费在线观看 | 美国毛片网 | 韩国一级毛片大全女教师 | 九九视频在线观看视频6 | 国模肉肉人体大尺度啪啪 | 亚洲精品综合一区二区三区 | 久久成年片色大黄全免费网站 | 日韩欧美亚洲 | 国产一区二区三区亚洲欧美 | 国产成人精品曰本亚洲77美色 | 2级毛片| 久久久久毛片成人精品 | 黄在线观看在线播放720p | 三级视频在线播放线观看 | 9久9久女女热精品视频免费观看 | www.黄色免费网站 | 国产一区免费在线观看 | 久草福利在线观看 | 亚洲一区二区三区四区在线 | 国产高清区 |