1、下载并安装windows插件 http://sourceforge.net/projects/nscplus/NSCP-0.4.1.73-x64.msi
2、windows端配置 nsclient.ini文件
    [/modules]
    ;CheckWMI = 1   #注释掉该行
    [/settings/default]
    allowed hosts = *
    ;password =
     port = 12489   #该行为手工添加
3、服务器端配置commands.cfg
 define command{
        command_name    check_nt
        command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489  -v $ARG1$ $ARG2$
        }
      命令行参数可参考: /usr/lib/nagios/plugins/check_nt -h
4、配置hosts.cfg
   define host {
      host_name                  aaa
     alias                       aaa
     address                      192.168.1.190
     contact_groups             ITServices
     check_command           check-host-alive
      max_check_attempts    5
       notification_interval      10
      notification_period        24x7
      notification_options       d,u,r
      }
5、配置services.cfg
#host ---aaa
define service{
        host_name               aaa
        service_description     check-host-alive
        check_command           check-host-alive
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups           ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description     CPU Load
        check_command           check_nt!CPULOAD!-l 5,80,90
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups           ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description     Memory Usage
        check_command           check_nt!MEMUSE!-w 80 -c 90
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups           ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description     OnlineTime
        check_command           check_nt!UPTIME
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups          ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description      C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups          ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description      D:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l d -w 80 -c 90
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups          ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups           ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description     Explorer
        retry_check_interval    2
        contact_groups          ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description      C:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups          ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description      D:\ Drive Space
        check_command           check_nt!USEDDISKSPACE!-l d -w 80 -c 90
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups          ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
define service{
        host_name               aaa
        service_description     W3SVC
        check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups           ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
   }
define service{
        host_name               aaa
        service_description     Explorer
        check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        check_period            24x7
        max_check_attempts      5
        normal_check_interval   3
        retry_check_interval    2
        contact_groups           ITServices
        notification_interval   10
        notification_period     24x7
        notification_options    w,u,c,r
        }
5、重启nagios和httpd服务
6、遇见的错误:
  windows下nsclient.log里有“source\nscp\trunk\include\check_nt/server/protocol.hpp:65: Rejected connection from:”,检查nsclient.ini与commands.cfg 接口是否一致

nagios监控windows配置的更多相关文章

  1. Nagios监控Windows的网卡流量

    Nagios监控Windows的网卡流量 使用/usr/local/nagios/libexec/中的check_traffic.sh,不但可以监控Linux的网卡流量,也可以监控Windows服务器 ...

  2. Nagios 监控Windows服务器(详细篇)

    1. 监控内容 windows服务器的内部参数包括以下 a. 内存使用状况 b. CPU负载 c. 磁盘使用状况 d. 服务状态 e. 运行的进程 2. 监控原理 在windows服务器内安装NSCl ...

  3. Nagios 监控windows server Apache 服务

    监控机需要使用check_apachestatus.pl插件插件下载地址:https://exchange.nagios.org/directory/Tutorials/Other-Tutorials ...

  4. 一步步实现Nagios监控linux主机及飞信报警

    一步步实现Nagios监控linux主机及飞信报警 上篇文章介绍了在linux主机上架设nagios监控服务,并对windows主机进行服务状态变化的监控,这次我们继续上次内容.      首先实现n ...

  5. nagios监控实用教程

    nagios监控实用教程 Nagios作为开源网络监视工具,它不但可以有效的监控内存.流量.数据库使用情况.它还可以Windows.Linux主机状态.本专题收录了有关Nagios监控相关文章,供大家 ...

  6. nagios监控系统安装及配置

    Nagios通常由一个主程序(Nagios).一个插件程序(Nagios-plugins)和四个可选的ADDON(NRPE.NSCA.NSClient++和NDOUtils)组成.Ngios的监控工作 ...

  7. Nagios利用NSClient++监控Windows主机

    在Nagios的libexec下有check_nt这个插件,它就是用来检查windows机器的服务的.其功能类似于check_nrpe.不过还需要搭配另外一个软件NSClient++,它则类似于NRP ...

  8. Nagios 利用NSClient++的check_nrpe方式使用自定义脚本监控windows

    分类 NsClient++来监控windows主机有三种方式:check_nt.check_nrpe.nsca.check_nt自带很多功能,但是扩展性差,check_nrpe可以通过执行自己定义的脚 ...

  9. Nagios的安装配置与应用之五监控远程Linux服务器

    本文出自 “曹坏水” 博客,请务必保留此出处http://cao2012.blog.51cto.com/366908/1132113 NRPE是Nagios的一个功能扩展,它可在远程Linux和UNI ...

随机推荐

  1. 让uboot的tftp支持上传功能

    转载:http://blog.chinaunix.net/uid-20737871-id-2124122.html uboot下的tftp下载功能是非常重要和常见的功能.但是偶尔有些特殊需求的人需要使 ...

  2. linux中likely()和unlikely()

    likely()与unlikely()在2.6内核中,随处可见,那为什么要用它们?它们之间有什么区别呢?首先明确: if (likely(value))等价于if (value) if (unlike ...

  3. MySQL的几种登陆方式

    MySQL的几种登陆方式 登录方式一:    [root@001 tmp]# mysql -h 127.0.0.1 -u root -p 这是最标准的登录方式,意指通过tTCP/IP协议进行连接,因为 ...

  4. Android Thread.UncaughtExceptionHandler异常消息捕获

    public void uncaughtException(Thread thread, Throwable ex) { //处理异常 Log.e("崩溃",thread.getN ...

  5. poj 2151Check the difficulty of problems<概率DP>

    链接:http://poj.org/problem?id=2151 题意:一场比赛有 T 支队伍,共 M 道题, 给出每支队伍能解出各题的概率~  求 :冠军至少做出 N 题且每队至少做出一题的概率~ ...

  6. 详解Vue 实例中的生命周期钩子

    Vue 框架的入口就是 Vue 实例,其实就是框架中的 view model ,它包含页面中的业务处理逻辑.数据模型等,它的生命周期中有多个事件钩子,让我们在控制整个Vue实例的过程时更容易形成好的逻 ...

  7. 【题解】[APIO2009]会议中心

    [题解][P3626 APIO2009]会议中心 真的是一道好题!!!刷新了我对倍增浅显的认识. 此题若没有第二份输出一个字典序的方案,就是一道\(sort+\)贪心,但是第二问使得我们要用另外的办法 ...

  8. centos开放80端口

    增加一条规则 #/sbin/iptables -I INPUT -p tcp --dport 80 -j ACCEPT 将更改进行保存 /etc/rc.d/init.d/iptables save 查 ...

  9. maven-appfuse配备步骤

    版权声明:本文为博主原创文章.未经博主同意不得转载. https://blog.csdn.net/qiaqia609/article/details/36231851 maven-appfuse配置步 ...

  10. IOS UIlabel 、UIButton添加下划线

    1.给UILabel 添加下划线 UILabel *label = [[UILabel alloc] initWithFrame:CGRectMake(, , , )]; label.backgrou ...