温馨提示×

温馨提示×

您好,登录后才能下订单哦!

密码登录×
登录注册×
其他方式登录
点击 登录注册 即表示同意《亿速云用户服务条款》

nagios怎么监控windows USBKEY

发布时间:2021-07-26 15:27:30 来源:亿速云 阅读:136 作者:chen 栏目:移动开发

本篇内容主要讲解“nagios怎么监控windows USBKEY”,感兴趣的朋友不妨来看看。本文介绍的方法操作简单快捷,实用性强。下面就让小编来带大家学习“nagios怎么监控windows USBKEY”吧!

1、安装NSClient++

安装输入Nagios服务IP地址

密码可为空

勾选Enable common check plugins

   Enable nsclient server (check_nt)

Enable NRPE server (check_nrpe)

默认配置实现监控硬盘空间、CPU负载、内存等信息:

被监控端(Windows服务器)配置自带防火墙例外或者关闭自带防火墙,开放TCP 5666和TCP 12489端口。

Nagios服务器端:

2、配置/usr/local/nagios/etc/nagios.cfg,将如下一行前面的注释取消:

cfg_file=/usr/local/nagios/etc/objects/windows.cfg 添加如下

define service{

       use                     generic-service

       host_name               winserver

       service_description     check_key

       check_command           check_nrpe!check_key    ####check_key这个参数是在windows客户端定义

       }

cfg_file=/usr/local/nagios/etc/objects/commands.cfg   添加如下

# 'check_nt' command definition

define command{

       command_name    check_nt

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

       }

# 'check_nrpe' command definition

define command{

       command_name    check_nrpe

       command_line    $USER1$/check_nrpe -H $HOSTADDRESS$ -c $ARG1$

       }

3、NSClient++参数设置

[modules]     ##开启模块,

FileLogger.dll

CheckSystem.dll

CheckDisk.dll

NSClientListener.dll

NRPEListener.dll

SysTray.dll

CheckEventLog.dll

CheckHelpers.dll

CheckWMI.dll

script_dir="C:\Program Files\NSClient++\scripts\"

[Settings]

use_file=1

allowed_hosts=192.168.20.137

[NSClient]

port=12489

allowed_hosts=192.168.20.137

[NRPE]

port=5666

allowed_hosts=192.168.20.137

[Script Wrappings]

vbs=cscript.exe T:30 NoLogo scripts\lib\wrapper.vbs %SCRIPT% %ARGS%

ps1=cmd /c echo scripts\%SCRIPT% %ARGS%; exit($lastexitcode) | powershell.exe -command -

bat=scripts\%SCRIPT% %ARGS%

[External Scripts]

check_es_long=scripts\long.bat

check_es_ok=scripts\ok.bat

check_es_nok=scripts\nok.bat

check_vbs_sample=cscript.exe //T:30 //NoLogo scripts\check_vb.vbs

check_powershell_warn=cmd /c echo scripts\powershell.ps1 | powershell.exe -command -

[NRPE Handlers]

check_key=scripts\check_key.bat $ARG1$

nrpe_ok=scripts\ok.bat

4、把目录filechack的所有文件放到c:\windows\system32\

filechac是查找文件的程序

附件:http://down.51cto.com/data/2363882

到此,相信大家对“nagios怎么监控windows USBKEY”有了更深的了解,不妨来实际操作一番吧!这里是亿速云网站,更多相关内容可以进入相关频道进行查询,关注我们,继续学习!

向AI问一下细节

免责声明:本站发布的内容(图片、视频和文字)以原创、转载和分享为主,文章观点不代表本网站立场,如果涉及侵权请联系站长邮箱:is@yisu.com进行举报,并提供相关证据,一经查实,将立刻删除涉嫌侵权内容。

AI