Nagios配置监控windows客户端

发布时间:2020-09-25 22:17:12 作者:zrer90
来源:网络 阅读:537



客户端配置:

客户端下载安装NSclient

下载地址:http://nsclient.org/nscp/downloads

安装NSCP-0.4.1.090-Win32 .msi (本人windows系统为32,如果是64位系统下载64位安装即可)

Nagios配置监控windows客户端

安装完成后运行nscp.exe会自动打开12489端口,用于nagios采集数据

使用netstat -an |more 查看端口是否开启

Nagios配置监控windows客户端

安装完成后如果要修改Nagios服务器地址, 编辑nsclient安装目录下的nsclient.ini,找到allowed hosts = 192.168.0.54 ,更改hosts后面的ipnagios服务器的ip就可以了


服务器端配置:

1. 修改nagios.cfg,加载windows.cfg文件

[root@localhost /]# vi /usr/local/nagios/etc/nagios.cfg

cfg_file=/usr/local/nagios/etc/objects/windows.cfg // 取消这一行的注释

2. 修改windows.cfg文件中host主机的address为被监控主机,其他保持默认(使用默认模版)

 ★如果更改host_name注意要将下面service里面引用的host_name都统一更改

 ★如果要增加一台windows监控,在新建一个define host{}进行添加

 ★如果要添加windows监控的服务,新建一个define serice 进行添加

define host{

        use             windows-server  ; Inherit default values from a template

        host_name       zrer-win       ; The name we're giving to this host

        alias           zrer-windows       ; A longer name associated with the host

        address         192.168.0.9     ; IP address of the host  被监控主机ip

        }

define hostgroup{

        hostgroup_name  windows-servers ; The name of the hostgroup

        alias           Windows Servers ; Long name of the group

        }

define service{

        use                     generic-service

        host_name               zrer-win

        service_description     NSClient++ Version

        check_command           check_nt!CLIENTVERSION

        }

define service{

        use                     generic-service

        host_name               zrer-win

        service_description     Uptime

        check_command           check_nt!UPTIME

        }

define service{

        use                     generic-service

        host_name               zrer-win

        service_description     CPU Load

        check_command           check_nt!CPULOAD!-l 5,80,90

        }

define service{

        use                     generic-service

        host_name               zrer-win

        service_description     Memory Usage

        check_command           check_nt!MEMUSE!-w 80 -c 90

        }

define service{

        use                     generic-service

        host_name               zrer-win

        service_description     C:\ Drive Space

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

 }

define service{

        use                     generic-service

        host_name               zrer-win

        service_description     Explorer

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

        }

3. 重启nagios服务

[root@localhost /]# service nagios restart



打开Nagios web界面查看监控信息

Nagios配置监控windows客户端





推荐阅读:
  1. nagios监控windows物理内存配置
  2. 2.2 nagios 监控客户端

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

nagios 修改ip dow

上一篇:react实现pure render时bind(this)隐患需注意!

下一篇:java Date类详解及使用总结

相关阅读

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

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