




已阅读5页,还剩4页未读, 继续免费阅读
版权说明:本文档由用户提供并上传,收益归属内容提供方,若内容存在侵权,请进行举报或认领
文档简介
Nagios监控Windows服务器(NSClient+安装与应用)1、 NSClient+安装1、 下载NSClient+插件点击下面链接下载/x-0.3.x/NSClient%2B%2B-0.3.9-Win32.msi2、 安装插件与配置1) 安装过程十分简单,直接点击下一步,下一步即可。安装过程注意如下图的设置即可2) 配置NSClient编辑NSClient安装目录下的NSC.ini文件,修改后,重启NSClient即可,如下图所示3) 模块作用说明,如下表ModuleDescriptionCommandsCheckSystem.dllHandles many system checksCPU, MEMORY, COUNTER etcCheckDisk.dllHandles Disk related checksUSEDDISKSPACEFileLogger.dllLogs errors to a file so you can see what is going onN/ANSClientListener.dllListens and responds to incoming requests from nagiosN/A2、 NSClient应用监控NSClient+与Nagios服务器通信,主要使用Nagios服务器的check_nt插件。原理图如下1、 check_nt插件的使用说明rootlocalhost libexec# ./check_nt -hcheck_nt v1.4.15 (nagios-plugins 1.4.15)Copyright (c) 2000 Yves Rubin ()Copyright (c) 2000-2007 Nagios Plugin Development Team This plugin collects data from the NSClient service running on aWindows NT/2000/XP/2003 server.Usage:check_nt -H host -v variable -p port -w warning -c critical-l params -d SHOWALL -u -t timeoutOptions: -h, -help Print detailed help screen -V, -version Print version informationOptions: -H, -hostname=HOST Name of the host to check -p, -port=INTEGER Optional port number (default: 1248) -s, -secret= Password needed for the request -w, -warning=INTEGER Threshold which will result in a warning status -c, -critical=INTEGER Threshold which will result in a critical status -t, -timeout=INTEGER Seconds before connection attempt times out (default: -l, -params= Parameters passed to specified check (see below) -d, -display=SHOWALL Display options (currently only SHOWALL works) -u, -unknown-timeout Return UNKNOWN on timeouts10) -h, -help Print this help screen -V, -version Print version information -v, -variable=STRING Variable to checkValid variables are: CLIENTVERSION = Get the NSClient version If -l is specified, will return warning if versions differ. CPULOAD = Average CPU load on last x minutes. Request a -l parameter with the following syntax: -l ,. should be less than 24*60. Thresholds are percentage and up to 10 requests can be done in one shot. ie: -l 60,90,95,120,90,95 UPTIME = Get the uptime of the machine. No specific parameters. No warning or critical threshold USEDDISKSPACE = Size and percentage of disk use. Request a -l parameter containing the drive letter only. Warning and critical thresholds can be specified with -w and -c. MEMUSE = Memory use. Warning and critical thresholds can be specified with -w and -c. SERVICESTATE = Check the state of one or several services. Request a -l parameters with the following syntax: -l ,. You can specify -d SHOWALL in case you want to see working services in the returned string. PROCSTATE = Check if one or several process are running. Same syntax as SERVICESTATE. COUNTER = Check any performance counter of Windows NT/2000. Request a -l parameters with the following syntax: -l counter, The parameter is optional and is given to a printf output command which requires a float parameter. If does not include %, it is used as a label. Some examples: Paging file usage is %.2f % %.f % paging file used. INSTANCES = Check any performance counter object of Windows NT/2000. Syntax: check_nt -H -p -v INSTANCES -l is a Windows Perfmon Counter object (eg. Process), if it is two words, it should be enclosed in quotes The returned results will be a comma-separated list of instances on the selected computer for that object. The purpose of this is to be run from command line to determine what instances are available for monitoring without having to log onto the Windows server to run Perfmon directly. It can also be used in scripts that automatically create Nagios service configuration files. Some examples: check_nt -H -p 1248 -v INSTANCES -l Process2、 检查Nagios目录下的libexec子目录,一定要存在check_nt(例如:/usr/local/nagios/libexec/check_nt)3、 查看Nagios服务器下定义check_nt命令rootlocalhost etc# vim commands.cfgdefine command command_name check_ntcommand_line $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$register 14、 Windows系统监控应用首先定义一个需要监控的主机,本例为监控Winxp226,命令如下:define host host_name winxp226 alias My Windows Server address 26 use windows-server,host-pnp register 11) 监控 windows 主机的 CPU 负载define service host_name acs-1 service_description cpuload use generic-service check_command check_nt!CPULOAD!-l 5,70,80,10,80,90 register 1注:#CPU如果到达80%则报警,到达90%则警笛2) 监控 windows 主机的内存使用状况 define service host_name acs-1 service_description Memory Usage use generic-service check_command check_nt!MEMUSE!-w 80 -c 90 register 1注:内存使用到达80%则warn,到达90%则Critical3) 监控 windows 主机的开机运作时间define service host_name acs-1 service_description Uptime use generic-service check_command check_nt!UPTIME register 14) 检查windows主机是否已经安装了NSClient+,及它的版本号define service host_name acs-1 service_description NSClient+ Version use generic-service check_command check_nt!CLIENTVERSION register 15) 监控 windows 主机的 C: 的空间使用量define service host_name acs-1 service_description C: Drive Space use generic-service check_command check_nt!USEDDISKSPACE!-l c! -w 80 -c 90 register 16) 监控 windows主机的W3SVC设置的动作状况define service host_name acs-1 use generic-service service_description W3SVC check_command check_nt!SERVICESTATE!-d SHOWALL -l W3SVC 7) 监控 windows 主机的 Explorer.exe 进程运作状况,如程序终止,则会发 Criticaldefine service host_name acs-1 service_description Explorer use generic-service check_command check_nt!PROCSTATE! -d SHOWALL -l explorer.exe register 18) 监控 win
温馨提示
- 1. 本站所有资源如无特殊说明,都需要本地电脑安装OFFICE2007和PDF阅读器。图纸软件为CAD,CAXA,PROE,UG,SolidWorks等.压缩文件请下载最新的WinRAR软件解压。
- 2. 本站的文档不包含任何第三方提供的附件图纸等,如果需要附件,请联系上传者。文件的所有权益归上传用户所有。
- 3. 本站RAR压缩包中若带图纸,网页内容里面会有图纸预览,若没有图纸预览就没有图纸。
- 4. 未经权益所有人同意不得将文件中的内容挪作商业或盈利用途。
- 5. 人人文库网仅提供信息存储空间,仅对用户上传内容的表现方式做保护处理,对用户上传分享的文档内容本身不做任何修改或编辑,并不能对任何下载内容负责。
- 6. 下载文件中如有侵权或不适当内容,请与我们联系,我们立即纠正。
- 7. 本站不保证下载资源的准确性、安全性和完整性, 同时也不承担用户因使用这些下载资源对自己和他人造成任何形式的伤害或损失。
最新文档
- 职业高中班主任工作总结
- 养老服务活动策划方案模板
- 嘉善洁净车间施工方案
- 活动策划方案标准化执行清单
- 2025辅警招聘考试全真模拟模拟题及参考答案详解【夺分金卷】
- 自考专业(工商企业管理)题库试题带答案详解(培优B卷)
- 2024年安全员考试高频难、易错点题附完整答案详解(考点梳理)
- 高职单招模拟试题含完整答案详解(夺冠系列)
- 2024-2025学年自考专业(金融)题库检测试题打印含答案详解【达标题】
- 2024-2025学年度自考专业(汉语言文学)高频难、易错点题及答案详解【真题汇编】
- 中国古典乐器-古筝琵琶英文介绍(带翻译)课件
- 戴明环(PDCA循环)管理培训教材课件
- 塑胶场地施工方案
- 中小学高级职称英语全英答辩题
- 苏教版(新教材)三年级上册小学科学第二单元测试卷含答案
- 音乐 认识音乐课件
- 职业健康检查管理办法-解读课件
- 小学地方课程教案(全面完整版)
- 《非常规油气地质实验技术与应用》教学大纲
- 产生你的企业想法课件
- 国家职业技能标准——城市轨道交通列车司机(2020版)
评论
0/150
提交评论