免费注册 查看新帖 |

Chinaunix

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

[系统管理] 大哥们帮小弟看一下,nagios起不来 [复制链接]

论坛徽章:
3
2015元宵节徽章
日期:2015-03-06 15:53:222015小元宵徽章
日期:2015-03-06 15:58:182015年亚洲杯之澳大利亚
日期:2015-03-18 18:01:18
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2015-06-04 09:41 |只看该作者 |倒序浏览
define host{
        use                     linux-server            ; Name of host template to use
                                                        ; This host definition will inherit all variables that are defined
                                                        ; in (or inherited by) the linux-server host template definition.
        host_name               36.111
        alias                   localhost
        address                 192.168.36.111
        check_command           check-host-alive
        notification_options    d,u,r
        check_interval          1
        max_check_attempts      3

        }
###############################################################################
###############################################################################
###############################################################################
#
# HOST GROUP DEFINITION
#
###############################################################################
###############################################################################

# Define an optional hostgroup for Linux machines

define hostgroup{
        hostgroup_name  linux-servers ; The name of the hostgroup
        alias           Linux Servers ; Long name of the group
        members         localhost     ; Comma separated list of hosts that belong to this group
        }

论坛徽章:
39
辰龙
日期:2013-08-21 15:45:192015亚冠之广州富力
日期:2015-05-12 16:34:52亥猪
日期:2015-03-03 17:22:00申猴
日期:2015-03-03 17:21:37未羊
日期:2014-10-10 13:45:41戌狗
日期:2014-06-17 09:53:29巨蟹座
日期:2014-06-12 23:17:17双鱼座
日期:2014-06-10 12:42:44寅虎
日期:2014-06-09 12:52:172015亚冠之卡尔希纳萨夫
日期:2015-05-24 15:24:35黄金圣斗士
日期:2015-12-02 17:25:0815-16赛季CBA联赛之吉林
日期:2017-06-24 16:43:52
2 [报告]
发表于 2015-06-04 10:54 |只看该作者
检查配置文件看看:
  1. /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg
复制代码

论坛徽章:
9
射手座
日期:2014-07-29 13:05:07双子座
日期:2015-01-11 17:01:522015年亚洲杯之朝鲜
日期:2015-02-01 16:14:282015亚冠之阿尔艾因
日期:2015-06-04 17:54:40数据库技术版块每日发帖之星
日期:2015-08-02 06:20:00数据库技术版块每日发帖之星
日期:2015-10-28 06:20:00数据库技术版块每日发帖之星
日期:2015-11-26 06:20:0015-16赛季CBA联赛之天津
日期:2016-06-20 17:09:2015-16赛季CBA联赛之青岛
日期:2017-02-26 15:54:19
3 [报告]
发表于 2015-06-04 11:35 |只看该作者
我记得nagios起不来是会报错说配置文件问题还是什么的吧

论坛徽章:
3
2015元宵节徽章
日期:2015-03-06 15:53:222015小元宵徽章
日期:2015-03-06 15:58:182015年亚洲杯之澳大利亚
日期:2015-03-18 18:01:18
4 [报告]
发表于 2015-06-05 09:45 |只看该作者
[root@Monitor188 objects]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg  

Nagios Core 3.3.1
Copyright (c) 2009-2011 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 07-25-2011
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Processing object config file '/usr/local/nagios/etc/objects/commands.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/contacts.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/timeperiods.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/templates.cfg'...
Processing object config file '/usr/local/nagios/etc/objects/localhost.cfg'...
Error: Could not find any host matching 'localhost' (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 60)
Error: Could not expand members specified in hostgroup (config file '/usr/local/nagios/etc/objects/localhost.cfg', starting on line 60)
   Error processing object config files!


***> One or more problems was encountered while processing the config files...

     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.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP