免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 4575 | 回复: 0
打印 上一主题 下一主题

nagios与windows客户端连接问题,及检查报警时间 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-09-02 14:26 |只看该作者 |倒序浏览
小弟在使用nagios时碰到两个问题,求助版主,及各位高手,帮忙看看

1:nagios连接不了windows的客户端,telnet客户端的12489端口是通的 windows客户端安装的是:NSClient++-0.3.6-Win32.msi 在监控端运行/usr/lib/nagios/plugins/check_nt -H 192.16
8.1.27 -v CLIENTVERSION
提示:could not fetch information from server

2: 监控端使用的是飞信短信报警,每次我关机测试时需要五分钟左右的时间才能检测到主机已DOWN机,如果只是重启,nagios检测不到。请教各位这是什么问题啊?


windows客户端设置我是按照下面这个教程安装的:
下载NSClient++-0.3.6-Win32.msi并安装。
到安装目录打开NSC.ini文件进行修改:
在[modules]模块,将除CheckWMI.dll和RemoteConfiguration.dll外的所有dll文件明前的注释(去掉。
在[Settings]模块可以设置一个连接密码password=PWD,为了简单,在此不设密码。设置 allowed_hosts=127.0.0.1/32,192.168.1.29,可以连接的监控服务器的地址,如果写成192.168.0.0/24 则表示该子网内的所有机器都可以访问;如果这个地方是空白则表示所有的主机都可以连接上来(注意在[NSClient]有allowed_hosts的同样设置,不要设置错了),最后不要忘记去掉前面的注释符(;)。
运行nsclient++
NSClient++ /install
NSClient++ SysTray install
NSClient++ /start
如果有防火墙,请开放相应端口


附件是我的配置文件,我的主机及windows主机的配置如下:请各位高手帮忙看看啊
define host{
        name                            generic-host   
        notifications_enabled           1      
        event_handler_enabled           1      
        flap_detection_enabled          1      
        failure_prediction_enabled      1      
        process_perf_data               1      
        retain_status_information       1      
        retain_nonstatus_information    1      
                check_command                   check-host-alive
                max_check_attempts              3
                notification_interval           0
                notification_period             24x7
                notification_options            d,u,f,r
                contact_groups                  admins
        register                        0      
        }





define host{
        use                generic-host        ; Inherit default values from a template
        host_name        fileserver2        ; The name we're giving to this host
        alias                windows-server        ; A longer name associated with the host
        address                192.168.1.27        ; IP address of the host
       
define service{
        use                        generic-service
        host_name                fileserver2
        service_description        NSClient++ Version
        check_command                check_nt!CLIENTVERSION
        }

define service{
        use                        generic-service
        host_name                fileserver2
        service_description        Uptime
        check_command                check_nt!UPTIME
        }

define service{
        use                        generic-service
        host_name                fileserver2
        service_description        CPU Load
        check_command                check_nt!CPULOAD!-l 5,80,90
        }


define service{
        use                        generic-service
        host_name                fileserver2
        service_description        Memory Usage
        check_command                check_nt!MEMUSE!-w 80 -c 90
        }

define service{
        use                        generic-service
        host_name                fileserver2
        service_description        C:\ Drive Space
        check_command                check_nt!USEDDISKSPACE!-l c -w 80 -c 90
        }
       
define service{
        use                        generic-service
        host_name                fileserver2
        service_description        W3SVC
        check_command                check_nt!SERVICESTATE!-d SHOWALL -l W3SVC
        }

define service{
        use                        generic-service
        host_name                fileserver2
        service_description        Explorer
        check_command                check_nt!PROCSTATE!-d SHOWALL -l Explorer.exe
        }

contacts_nagios2.zip

346 Bytes, 下载次数: 22

generic-host_nagios2.zip

594 Bytes, 下载次数: 27

generic-service_nagios2.zip

777 Bytes, 下载次数: 34

windows.zip

537 Bytes, 下载次数: 44

您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP