设为首页收藏本站

LinuxTone | 运维专家网论坛 - 最棒的Linux运维与开源架构技术交流社区!

 找回密码
 注册

用新浪微博连接

一步搞定

QQ登录

只需一步,快速开始

查看: 1589|回复: 6

nagios 安装配置后 -v 检测报错 ??怎么处理??求解?? [复制链接]

Rank: 2

签到
0
注册时间
2010-8-8
最后登录
2011-5-13
在线时间
6 小时
阅读权限
20
积分
61
帖子
7
主题
1
精华
0
UID
10049
发表于 2010-8-8 21:34:58 |显示全部楼层
我的系统是centos5.4 LAMP环境是yum安装,nagios-3.2.1+plugins-1.4.15是tar安装,配置完成后用 ---V测试时,报一下错误!不知道是什么原因了?
[root@localhost ~]# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 3.2.1
Copyright (c) 2009-2010 Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 03-09-2010
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'...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking services...
Error: There are no services defined!
        Checked 0 services.
Checking hosts...
Error: There are no hosts defined!
        Checked 0 hosts.
Checking host groups...
        Checked 0 host groups.
Checking service groups...
        Checked 0 service groups.
Checking contacts...
        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 5 time periods.
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:   2

***> 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@localhost ~]#
请高手解答!!谢谢

Rank: 2

注册时间
2010-8-8
最后登录
2011-5-13
在线时间
6 小时
阅读权限
20
积分
61
帖子
7
主题
1
精华
0
UID
10049
发表于 2010-8-9 08:23:58 |显示全部楼层
哇 没有多人理我吗 自己顶一个 答案征集中。。。。。。

使用道具 举报

Rank: 6Rank: 6

注册时间
2009-6-17
最后登录
2012-2-1
在线时间
64 小时
阅读权限
70
积分
1193
帖子
111
主题
44
精华
0
UID
3656
发表于 2010-8-9 09:22:51 |显示全部楼层
兄弟,你贴的错误,没有具体报错的地方,你这样试一下:你先停掉nagios 服务,然后在执行
     /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg 应该就能看到具体的报错了,你在贴上来

使用道具 举报

LT管理团队

守住每一天

Rank: 9Rank: 9Rank: 9

注册时间
2008-5-30
最后登录
2012-2-3
在线时间
619 小时
阅读权限
200
积分
9973
帖子
1252
主题
174
精华
11
UID
31
发表于 2010-8-9 09:48:07 |显示全部楼层
回复 3# wangchancqdd

  请楼主提供配置文件和日志 。方便查找原因。
   英文的说明要你查配置文件,如果是升级要你查自定的变量

使用道具 举报

Rank: 8Rank: 8

注册时间
2008-12-24
最后登录
2012-2-3
在线时间
122 小时
阅读权限
90
积分
4697
帖子
13
主题
1
精华
0
UID
767
发表于 2010-8-9 10:23:39 |显示全部楼层
Error: There are no services defined!
        Checked 0 services.
Checking hosts...
Error: There are no hosts defined!
        Checked 0 hosts.


查看是不是你的hosts配置文件里面的hostname名字和server 配置文件里面的hostname不匹配吧

使用道具 举报

高级会员

吃饱找事干!

Rank: 4

注册时间
2010-7-13
最后登录
2011-9-29
在线时间
44 小时
阅读权限
50
积分
930
帖子
74
主题
3
精华
0
UID
9790
发表于 2010-8-20 10:01:49 |显示全部楼层
Checking  services...
Error: There are no services defined!
        Checked 0 services.
Checking hosts...
Error: There are no hosts defined!
        Checked 0 hosts.

很明显的错误提示,没有检测到服务,也没用检测到被监控的主机,检查下 /usr/local/nagios/etc/objects 里面的 hosts.cfg 和 services.cfg文件,并把文件内容贴上来。

使用道具 举报

Rank: 8Rank: 8

注册时间
2010-8-26
最后登录
2012-2-3
在线时间
229 小时
阅读权限
90
积分
5179
帖子
71
主题
1
精华
0
UID
10216
发表于 2010-9-3 15:30:07 |显示全部楼层
你的主机和服务都没检测到.先看看nagios.cfg指定的路径.

使用道具 举报

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

IT运维专家网感谢红之盟网络提供带宽支持

合作联系: QQ:67888954/MSN:cnseek@msn.com/mail:netseek@linuxtone.org

Archiver|手机版|感谢所有关心和支持过LinuxTone的朋友们 转载本站内容请注明原作者名及出处 ( 京ICP备08103151 )   |

GMT+8, 2012-2-4 19:08 , Processed in 0.063875 second(s), 12 queries , Memcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

回顶部