新网创想网站建设,新征程启航

为企业提供网站建设、域名注册、服务器等服务

Nagios配置监控windows客户端-创新互联

客户端配置:

创新互联服务项目包括电白网站建设、电白网站制作、电白网页制作以及电白网络营销策划等。多年来,我们专注于互联网行业,利用自身积累的技术优势、行业经验、深度合作伙伴关系等,向广大中小型企业、政府机构等提供互联网行业的解决方案,电白网站推广取得了明显的社会效益与经济效益。目前,我们服务的客户以成都为中心已经辐射到电白省份的部分城市,未来相信会继续扩大服务区域并继续获得客户的支持与信任!

客户端下载安装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后面的ip为nagios服务器的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客户端

另外有需要云服务器可以了解下创新互联scvps.cn,海内外云服务器15元起步,三天无理由+7*72小时售后在线,公司持有idc许可证,提供“云服务器、裸金属服务器、高防服务器、香港服务器、美国服务器、虚拟主机、免备案服务器”等云主机租用服务以及企业上云的综合解决方案,具有“安全稳定、简单易用、服务可用性高、性价比高”等特点与优势,专为企业上云打造定制,能够满足用户丰富、多元化的应用场景需求。


网页标题:Nagios配置监控windows客户端-创新互联
标题路径:http://www.wjwzjz.com/article/ceshep.html
在线咨询
服务热线
服务热线:028-86922220
TOP