一、被监控的windows xp客户端的配置

1、安装NSClient++并安装
下载地址: http://sourceforge.net/projects/nscplus
NSClient++-0.3.8-Win32.msi  
NSClient++-0.3.8-x64.msi

2、安装NSClient++
双击安装 -> next -> 同意 -> next  -> next -> next -> 设置允许IP,设置密码(这里密码一般可以不设置),Modules to load (选前三个模块就可以了,第2个为chect_nt用于监控windows,第3个为checp_nrpe用于监控linux) -> next  -> install  -> finish

3、启动NSClientpp服务,并允许服务交互式

4、如果windows开启了自带的防火墙,那么必须设置让该程序通过

二、监控端主机的设置(Nagios服务器)

1、检查Nagios目录下的libexec子目录,一定要存在check_nt(例如:/usr/local/nagios/libexec/check_nt)

2、配置command.cfg文件(例如:/usr/local/nagios/etc/objects/command.cfg),增加如下几行(默认应该已经有了)

#/usr/local/nagios/etc/objects/command.cfg

# 'check_nt' command definition

define command{
command_name    check_nt
command_line    $USER1$/check_nt -H $HOSTADDRESS$ -p 12489 -v $ARG1$ $ARG2$
}

3、编译nagios.cfg文件

#/usr/local/nagios/etc/nagios.cfg,打开下面这一行

# Definitions for monitoring a Windows machine

cfg_file=/usr/local/nagios/etc/objects/windows.cfg

#vi  /usr/local/nagios/etc/objects/windows.cfg,下面为配置主要的监控项目

#定义要被监控的windows主机名与主机的IP地址

define host{

use             windows-server

host_name       ruanxi

alias           My Windows Server

address         192.168.0.5

}

#定义一个主机名组(可以不用管它)

define hostgroup{

hostgroup_name  windows-servers

alias           Windows Servers

}

#检查windows主机是否已经安装了NSClient++,及它的版本号

define service{

use                     generic-service

host_name               ruanxi

service_description     NSClient++ Version

check_command           check_nt!CLIENTVERSION

}

#监控 windows 主机的开机运作时间

define service{

use                     generic-service

host_name               ruanxi

service_description     Uptime

check_command           check_nt!UPTIME

}

#监控 windows 主机的 CPU 负载

define service{

use                     generic-service

host_name               ruanxi

service_description     CPU Load

check_command           check_nt!CPULOAD!-l 5,80,90    #CPU如果到达80%则报警,到达90%则警笛

}

#监控 windows 主机的内存使用状况

define service{

use                     generic-service

host_name               ruanxi

service_description     Memory Usage

check_command           check_nt!MEMUSE!-w 80 -c 90  #内存使用到达80%则warn,到达90%则Critical

}

#监控 windows 主机的 C:\ 的空间使用量

define service{

use                     generic-service

host_name               ruanxi

service_description     C:\ Drive Space

check_command           check_nt!USEDDISKSPACE!-l c -w 80 -c 90

}

#监控 windows主机的W3SVC设置的动作状况

------>此服务为WEB服务器有关日志的服务程序

define service{

use                     generic-service

host_name               ruanxi

service_description     W3SVC

check_command           check_nt!SERVICESTATE!-d SHOWALL -l W3SVC

}

#监控 windows 主机的 Explorer.exe 执行程序的运作状况,如程序终止了,则会发 CRITICA

define service{

use                     generic-service

host_name               ruanxi

service_description     Explorer

check_command           check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe

}

#监控 windows 主机的 MSSQLSERVER 服务的运作状况,如服务终止了,则会发 CRITICAL

define service{

use                     generic-service

host_name               ruanxi

service_description     MSSQL

check_command           check_nt!SERVICESTATE!-d SHOWALL -l MSSQLSERVER

}

说明:如果有多台的windows xp客户端要监控,那么就以上述这样写多个就可以了

3、检查nagios.cfg文件有没有错误

#nagios -c  nagios.cfg

4、重新启动一下nagios服务

#service nagios restart

5、访问页面进行查看

#elinks http://localhost/nagios/

nagios客户端安装与配置windows篇的更多相关文章

  1. zabbix_agentd客户端安装与配置(windows操作系统)

    zabbix_agentd客户端安装与配置(windows操作系统)   **********  客户端操作   **********  标注:监控zabbix_agentd客户端安装对象是win s ...

  2. influxDB1.6版安装与配置(windows环境)、Jmeter+influxDB+Grafana性能监控

    influxDB1.6版安装与配置(windows环境).Jmeter+influxDB+Grafana性能监控 来源:https://blog.csdn.net/SwTesting/article/ ...

  3. vim插件管理器的安装和配置-windows

    # vim插件管理器的安装和配置-windows ### 前言------------------------------ vim做一框功能强大的编辑器,扩展功能令人称奇,插件机制非常灵活- 本篇推荐 ...

  4. Centos 6.5 SNMP客户端安装及配置版本net-snmp-5.7.3

    Centos 6.5 SNMP客户端安装及配置SNMP版本:net-snmp-5.7.3.tar.gz1.下载软件cd /usr/local/srcyum -y install gccwget htt ...

  5. Oracle客户端安装及配置

    Oracle客户端安装及配置 1.安装orcale客户端(Oracle_client_10 )选择inst...方式安装(不是管理员方式) 2.在安装路径下新建目录network\admin 然后新建 ...

  6. Apache+php安装和配置 windows

    Apache+php安装和配置 windows Apache 安装 1.官网网址:http://httpd.apache.org/ 2.Download 3.点击链接Files for Microso ...

  7. node.js安装和配置(windows系统)

    node.js安装和配置(windows系统) node javasript vscode  node是javascript的管理工具,所以开发javasript项目都要下载安装和配置node. 传送 ...

  8. zabbix-agent客户端安装与配置

    zabbix-agent客户端安装与配置 下载abbix-agent客户端源码软件包 解压agent源码包,并且切换到解压目录. [root@localhost ~]# tar -zxf zabbix ...

  9. Windows Server - SVN 服务器搭建与项目配置、客户端安装与配置

    本教程以Windows Server 2012 R12 为例搭建SVN服务器,安装部署完成后,客户端可通过SVN客户端访问SVN服务器上的项目,也可以访问网上其他SVN服务器上的项目. 一.首先准备三 ...

随机推荐

  1. zabbix-agent active 配置自动探测

    1. zabbix-agent 被动模式配置文件: PidFile=/var/run/zabbix/zabbix_agentd.pid LogFile=/var/log/zabbix/zabbix_a ...

  2. 关于Android6.0 之EasyPermissionUtil

    之前6.0权限用第三方类库比较多,但是都是挺麻烦的,今天给大家推荐一个好用的第三方类库: gitHub地址:https://github.com/yxping/EasyPermissionUtil 使 ...

  3. TP框架---thinkphp查询和添加数据

    查询 <?php namespace Admin\Controller; use Think\Controller; class MainController extends Controlle ...

  4. 单机部署tomcat的shell脚本

    单机部署tomcat的shell脚本,来自网络,自己需要时要根据自己的需求改动. #!/bin/sh # ############################################### ...

  5. Java for LeetCode 096 Unique Binary Search Trees

    Given n, how many structurally unique BST's (binary search trees) that store values 1...n? For examp ...

  6. iOS app submission : missing 64-bit support

  7. Excel图表转成图片

    关于excel 图表转成图片 知识点:excel 生成的图表不是图片 尝试.    通过Java调用POI接口挺难把excel生成的图表转成图片导出来 ps.      其它生成图表的工具,如jfre ...

  8. hihocoder 微软编程之美2015 初赛 第一场 (树算法 + 暴力思想 + 搜索思想)

    题目1 : 彩色的树 时间限制:2000ms 单点时限:1000ms 内存限制:256MB 描述 给定一棵n个节点的树,节点编号为1, 2, …, n.树中有n - 1条边,任意两个节点间恰好有一条路 ...

  9. Linux常用命令全集

    一,安装和登陆命令1,进入图形界面 startx 2,进入图形界面 init 5 3,进入字符界面 init 34,登陆 login 5,关机 poweroff -p 关闭机器的时候关闭电源-n 在关 ...

  10. Spring Boot2.0之整合JSP

    首先不建议整合JSP哈,spring boot 对jsp的支持力度不大.  内置tomcat不支持jsp. 注意:在创建项目时候一定是war类型的,而不是跟之前那个freemarker那种jar类型. ...