免费注册 查看新帖 |

Chinaunix

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

nagios实战 [复制链接]

论坛徽章:
0
1 [报告]
发表于 2009-12-21 09:18 |只看该作者
1、 my $url = "http://http.asp.sh.cn/MT.do?Username=sery&Password=([-BVG'0&Mobile=$mobile&Content=$content&Keyword=$result_conent";
my $key=
这两个参数如果是用我的手机我该怎么改。

#/usr/local/bin/sms.pl   我的手机号  "It is a test"
没有发送到我手机,也没报错。


2、   

   检查插件功能
       (1)检查nrpe服务
  [root@MONITOR nrpe]# libexec/check_nrpe -H 59.26.240.63
  NRPE v2.8.1
       (2)通过nrpe检查主机资源
  [root@MONITOR nrpe]# libexec/check_nrpe -H 59.26.240.63 -c check_df
  DISK OK - free space: / 8241 MB (77% inode=98%); /var 5239 MB (95% inode=99%); /usr 11971 MB (86% inode=97%); /dev/shm 1013 MB (100% inode=99%);| /=2417MB;11218;11228;0;11238 /var=273MB;5792;5802;0;5812 /usr=1807MB;14508;14518;0;14528 /dev/shm=0MB;993;1003;0;1013
  [root@MONITOR nrpe]#libexec/check_nrpe -H 59.26.240.63 -c check_ips
  OK -connect counts is 13956

上面是正确的。可是我已经将192.168.1.200(本机ip)和192.168.1.8加到nrpe.cfg的allowed_hosts=127.0.0.1,192.168.1.200,192.168.1.8
[root@MONITOR nrpe]# libexec/check_nrpe -H 127.0.0.1
  NRPE v2.8.1

[root@MONITOR nrpe]# libexec/check_nrpe -H 192.168.1.200
  connect confused 连接拒绝 为什么不行啊,是本机呢。

[root@MONITOR nrpe]# libexec/check_nrpe -H 192.168.1.8
  也不行啊,是windows的一台局域网电脑。

通过nrpe检查主机资源也只有127.0.0.1可以,其他的192.168.1.200(本机)和192.168.1.8也都不行。



3、启动nagios:验证nagios工作状态这边错误
[root@nagios-server etc]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios 2.9
Copyright (c) 1999-2007 Ethan Galstad (http://www.nagios.org)
Last Modified: 04-10-2007
License: GPL

Reading configuration data...

Running pre-flight check on configuration data...

Checking services...
Error: Service check command 'check_nrpe' specified in service 'check-disk' for host 'nagios-server' not defined anywhere!
Error: Service check command 'check_nrpe' specified in service 'check-load' for host 'nagios-server' not defined anywhere!
Error: Service check command 'check_nrpe' specified in service 'total_procs' for host 'nagios-server' not defined anywhere!
        Checked 5 services.
Checking hosts...
Error: Contact group 'nagios' specified in host 'nagios-server' is not defined anywhere!
        Checked 1 hosts.
Checking host groups...
        Checked 1 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
Error: Service notification command 'service-notify-by-email' specified for contact 'sery' is not defined anywhere!
        Checked 1 contacts.
Checking contact groups...
        Checked 1 contact groups.
Checking service escalations...
        Checked 0 service escalations.
Checking service dependencies...
        Checked 0 service dependencies.
Checking host escalations...
        Checked 0 host escalations.
Checking host dependencies...
        Checked 0 host dependencies.
Checking commands...
        Checked 24 commands.
Checking time periods...
        Checked 1 time periods.
Checking extended host info definitions...
        Checked 0 extended host info definitions.
Checking extended service info definitions...
        Checked 0 extended service info definitions.
Checking for circular paths between hosts...
Checking for circular host and service dependencies...
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   5

***> One or more problems was encountered while running the pre-flight check...

     Check your configuration file(s) to ensure that they contain valid
     directives and data defintions.  If you are upgrading from a previous
     version of Nagios, you should be aware that some variables/definitions
     may have been removed or modified in this version.  Make sure to read
     the HTML documentation regarding the config files, as well as the
     'Whats New' section to find out what has changed.

[root@nagios-server etc]#



请问下怎么解决。谢谢。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP