nagios工作正常但maps不显示

时间:2014-05-21 01:05:34   收藏:0   阅读:393

     nagios工作正常,各个监控页面也可以正常显示,唯独maps无法显示,提示The requested URL /nagios/cgi-bin/statusmap.cgi was not found on this server。进到/nagios/cgi-bin/文件夹中发现果然没有statusmap.cgi。

   上网查了一下,说是可能缺下面的安装包,

      #./configure --with-command-group=nagcmd

      #make all; make install; makeinstall-init; make install-config; make install-commandmode; makeinstall-webconf

     完事之后重启nagios服务,ok,maps可以正常显示了!

     不过突然发现监控主机少了一台,只剩下localhost了,另外一台远程主机看不到了!

     是不是重新编译nagios把旧的配置文件覆盖了呢?查看nagios.cfg配置文件,

     #vi /usr/local/nagios/etc/nagios.cfg  

     果然远程监控主机的信息没有了,添加

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

     重启nagios服务之后居然报错了,类似于这种错误

     Error: Service check command ‘check_nrpe!check_load‘ specified in service ‘CPU Load‘ for host ‘lucas_nj‘ not defined anywhere!

     Error: Service check command ‘check_nrpe!check_users‘ specified in service ‘Current Users‘ for host ‘lucas_nj‘ not defined anywhere!

     Error: Service check command ‘check_nrpe!check_total_procs‘ specified in service ‘Total Processes‘ for host ‘lucas_nj‘ not defined anywhere!

     Error: Service check command ‘check_nrpe!check_zombie_procs‘ specified in service ‘Zombie Processes‘ for host ‘lucas_nj‘ not defined anywhere!

      意思说服务没定义, 难不成commands.cfg也被覆盖了?查看commands.cfg文件

     #vi /usr/local/nagios/etc/objects/commands.cfg

      乖乖,果然也覆盖掉了,在commands.cfg文件重新添加

     define command {

    command_name  check_nrpe

    command_line    $USER1$/check_nrpe-H $HOSTADDRESS$ -c $ARG1$

}

    重启nagios服务,工作正常。

  bubuko.com,布布扣








本文出自 “lucas” 博客,请务必保留此出处http://4292565.blog.51cto.com/4282565/1413694

nagios工作正常但maps不显示,布布扣,bubuko.com

评论(0
© 2014 mamicode.com 版权所有 京ICP备13008772号-2  联系我们:gaon5@hotmail.com
迷上了代码!