欧美一区二区三区老妇人-欧美做爰猛烈大尺度电-99久久夜色精品国产亚洲a-亚洲福利视频一区二区

Nagios的NSClient++插件配置

NSClinet++監(jiān)控Windows主機(jī)的nagios插件

創(chuàng)新互聯(lián)建站堅(jiān)持“要么做到,要么別承諾”的工作理念,服務(wù)領(lǐng)域包括:成都網(wǎng)站建設(shè)、網(wǎng)站制作、企業(yè)官網(wǎng)、英文網(wǎng)站、手機(jī)端網(wǎng)站、網(wǎng)站推廣等服務(wù),滿足客戶于互聯(lián)網(wǎng)時(shí)代的延平網(wǎng)站設(shè)計(jì)、移動(dòng)媒體設(shè)計(jì)的需求,幫助企業(yè)找到有效的互聯(lián)網(wǎng)解決方案。努力成為您成熟可靠的網(wǎng)絡(luò)建設(shè)合作伙伴!

下載地址:https://nsclient.org/nscp/downloads

下載NSClient++-xxx-Win32

我們這里下載的是NSClient++-0.3.9-Win32.msi

安裝NSClient++

雙擊程序安裝,前面都點(diǎn)下一步,從下面可以看出來(lái)NSClient集成了很多的插件NRPE、NSCA等都支持

Nagios的NSClient++插件配置

添加允許主機(jī)

Nagios的NSClient++插件配置

下面沒什么需要注意的了,直接下一步,安裝完成就可以了。

Nagios的NSClient++插件配置

服務(wù)開啟以后可以看到服務(wù)端的端口開啟了,NSClient++使用的是12489端口,而且我們也看到nrpe的端口也開啟了

Nagios的NSClient++插件配置

1、基于check_nt

Windows端安裝目錄下NSC.ini配置文件的要啟用的模塊:

[modules]

CheckSystem.dll

CheckDisk.dll

FileLogger.dll

NSClientListener.dll

[settings]

allowed_hosts =#允許的主機(jī)

Password=   #密碼

修改配置后要重啟服務(wù):

nsclient++ /stop

nsclient++ /start

在nagios端使用如下命令測(cè)試:

check_nt -H <client ip> -p <port> -s <PASSWORD> -v <command> ...

# check_nt -H 172.16.100.66 -p 12489 -v CPULOAD -w 80 -c 90 -l5,80,90-s redhat

[root@node4 ~]# cd/usr/local/nagios/libexec/

[root@node4 libexec]#./check_nt -H 192.168.0.5 -p 12489 -v CPULOAD -w 80 -c 90 -l 5,80,90 -s redhat

CPU Load 0% (5 minaverage) |   '5 min avgLoad'=0%;80;90;0;100

nagios端配置:


首先是命令配置:
[root@node4 ~]# cd/usr/local/nagios/etc/objects/
[root@node4 objects]#vim commands.cfg
define command{
        command_name    check_nt
        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489-s redhat -v $ARG1$ $ARG2$
        }
然后是主機(jī)配置:
# vim/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.5     ; IP address of the host
        }
###############################################################################
###############################################################################
#
# HOST GROUPDEFINITIONS
#
###############################################################################
###############################################################################
# Define a hostgroupfor Windows machines
# All hosts that usethe windows-server template will automatically be a member of this group
define hostgroup{
        hostgroup_name  windows-servers ; The name of the hostgroup
        alias           Windows Servers ; Long name of thegroup
        }
###############################################################################
###############################################################################
#
# SERVICE DEFINITIONS
#
###############################################################################
###############################################################################
# Create a servicefor monitoring the version of NSCLient++ that is installed
# Change thehost_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
        }
# Create a servicefor monitoring the uptime of the server
# Change thehost_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 servicefor monitoring CPU load
# Change thehost_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 5,80,90
        }
# Create a servicefor monitoring memory usage
# Change thehost_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
        }
# Create a servicefor monitoring C:\ disk usage
# Change thehost_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 -c90
        }
# Create a servicefor monitoring the W3SVC service
# Change thehost_name to match the name of the host you defined above
define service{
        use                     generic-service
        host_name               winserver
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -lW3SVC
        }
# Create a servicefor monitoring the Explorer.exe process
# Change thehost_name to match the name of the host you defined above
define service{
        use                     generic-service
        host_name               winserver
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -lExplorer.exe
        }
在nagios配置文件內(nèi)添加一條cfg
[root@node4 objects]# vim/usr/local/nagios/etc/nagios.cfg
cfg_file=/usr/local/nagios/etc/objects/windows.cfg
做完上述的操作以后重啟nagios服務(wù)端的nagios服務(wù)
[root@node4 objects]#service nagios restart
Running configurationcheck...done.
Stopping nagios: done.
Starting nagios: done.

然后在nagios的web管理界面上你就會(huì)發(fā)現(xiàn)一個(gè)新的主機(jī)

Nagios的NSClient++插件配置

而且服務(wù)里面也多出很多我們定義的服務(wù)

Nagios的NSClient++插件配置

密碼保護(hù):

如果你在windows的機(jī)器上設(shè)置了密碼,你需要在commands.cfg配置文檔內(nèi)加上-s PASSWORD如下:

vi/usr/local/nagios/etc/objects/commands.cfg

define command{

command_name        check_nt

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

}

Save the file.

2、基于NRPE

Windows上NSClient++要啟用如下模塊:

[modules]

CheckSystem.dll

CheckDisk.dll

CheckExternalScripts.dll

FileLogger.dll

NRPEListener.dll

NRPE specific settingin NSClient++

use_ssl  #使用ssl

allow_arguments  #是否允許nagios服務(wù)端傳遞參數(shù)過(guò)來(lái)

allow_nasty_meta_chars #傳遞參數(shù)的時(shí)候是否可以包含一些&<>等字符

bind_to_address=  #綁定在那個(gè)地址上,默認(rèn)監(jiān)聽在0.0.0.0

           allowed_hosts= #允許主機(jī)

check_nrpe語(yǔ)法:

check_nrpe ... -c<command> [-a <argument> <argument> <argument>]

check_nrpe的內(nèi)置命令:

·CheckAlwaysCRITICAL (check)

·CheckAlwaysOK (check)

·CheckAlwaysWARNING (check)

· CheckCPU(check)

·CheckCRITICAL (check)

·CheckCounter (check)

·CheckEventLog/CheckEventLog (check)

·CheckFile (check)

·CheckFileSize (check)

· CheckMem(check)

·CheckMultiple (check)

· CheckOK(check)

·CheckProcState (check)

·CheckServiceState (check)

·CheckTaskSched/CheckTaskSched (check)

·CheckUpTime (check)

·CheckVersion (check)

·CheckWARNING (check)

·CheckWMI/CheckWMI (check)

·CheckWMIValue (check)

用法如:

# check_nrpe ... -cCheckCPU -a warn=80 crit=90 time=20m time=10s time=4

Nagios端的配置:

1) Template

define host{

nametpl-windows-servers

usegeneric-host

check_period24x7

check_interval5

retry_interval1

max_check_attempts10

check_commandcheck-host-alive

notification_period24x7

notification_interval30

notification_optionsd,r

contact_groupsadmins

register0

}

2) 定義主機(jī):

define host{

usetpl-windows-servers

host_namewindowshost

aliasMy First Windows Server

address172.16.100.66

}

3) 定義服務(wù):

define service{

usegeneric-service

host_namewindowshost

service_descriptionCPU Load

check_commandcheck_nrpe!alias_cpu

}

define service{

usegeneric-service

host_namewindowshost

service_descriptionFree Space

check_commandcheck_nrpe!alias_disk

}

3、基于NSCA

[modules]

CheckSystem.dll

CheckDisk.dll

CheckExternalScripts.dll

CheckHelpers.dll

FileLogger.dll

NSCAAgent.dll

NSClient++配置

interval

encryption_method

password

nsca_host

修改配置后要重啟服務(wù)

1) 模板

define host{

nametpl-windows-servers ; Name of this template

usegeneric-host ; Inherit default values

check_period24x7

check_interval5

retry_interval1

max_check_attempts10

check_commandcheck-host-alive

notification_period24x7

notification_interval30

notification_optionsd,r

contact_groupsadmins

register0 ; DONT REGISTER THIS - ITS A TEMPLATE

}

2)主機(jī)配置

define host{

usetpl-windows-servers

host_namewindowshost

aliasMy First Windows Server

address172.16.100.66

active_checks_enabled0

passive_checks_enabled1

}

3)服務(wù)配置

define service{

usegeneric-service

host_namewindowshost

service_descriptionCPU Load

check_commandcheck_nrpe!alias_cpu

active_checks_enabled0

passive_checks_enabled1

}

define service{

usegeneric-service

host_namewindowshost

service_descriptionFree Space

check_commandcheck_nrpe!alias_disk

active_checks_enabled0

passive_checks_enabled1

}

文章名稱:Nagios的NSClient++插件配置
路徑分享:http://chinadenli.net/article6/ihpcog.html

成都網(wǎng)站建設(shè)公司_創(chuàng)新互聯(lián),為您提供靜態(tài)網(wǎng)站ChatGPT、動(dòng)態(tài)網(wǎng)站Google、品牌網(wǎng)站制作、面包屑導(dǎo)航

廣告

聲明:本網(wǎng)站發(fā)布的內(nèi)容(圖片、視頻和文字)以用戶投稿、用戶轉(zhuǎn)載內(nèi)容為主,如果涉及侵權(quán)請(qǐng)盡快告知,我們將會(huì)在第一時(shí)間刪除。文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如需處理請(qǐng)聯(lián)系客服。電話:028-86922220;郵箱:631063699@qq.com。內(nèi)容未經(jīng)允許不得轉(zhuǎn)載,或轉(zhuǎn)載時(shí)需注明來(lái)源: 創(chuàng)新互聯(lián)

外貿(mào)網(wǎng)站建設(shè)
免费亚洲黄色在线观看| 国产麻豆成人精品区在线观看| 五月婷婷欧美中文字幕| 五月综合激情婷婷丁香| 免费亚洲黄色在线观看| 日韩午夜老司机免费视频| 久热在线视频这里只有精品| 日韩三极片在线免费播放| 国产精品亚洲综合色区韩国| 色婷婷视频国产一区视频| 亚洲深夜精品福利一区| 国产一级性生活录像片| 国产日韩精品激情在线观看| 国产精品香蕉在线的人| 国产不卡视频一区在线| 黄片免费在线观看日韩| 亚洲综合天堂一二三区| 欧美激情床戏一区二区三| 久热在线视频这里只有精品| 国产精品一级香蕉一区| 国产精品乱子伦一区二区三区| 免费在线观看激情小视频| 亚洲精品一二三区不卡| 国产熟女一区二区三区四区| 亚洲国产黄色精品在线观看| 亚洲欧美国产精品一区二区| 日木乱偷人妻中文字幕在线| 欧美日韩有码一二三区| 久久精品国产亚洲av久按摩| 欧美一区二区三区高潮菊竹| 国产成人精品在线一区二区三区 | 中文字幕亚洲精品乱码加勒比 | 国产精品一区欧美二区| 国产内射一级二级三级| 高中女厕偷拍一区二区三区| 激情图日韩精品中文字幕| 精品少妇一区二区视频| 亚洲一区二区亚洲日本| 中文字幕乱码亚洲三区| 极品少妇嫩草视频在线观看| 国产精品免费自拍视频|