Check nagios配置文件报错例如以下:

[nagios@2 etc]$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-29-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
Error: Template 'timman' specified in contact definition could not be not found (config file '/usr/local/nagios/etc/objects/contacts.cfg', starting on line 65)
   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.

2 查看报错内容

[nagios@2 etc]$ more /usr/local/nagios/etc/objects/contacts.cfg

......

define contact{
        contact_name                    timman          
        use                             timman       这里报错,说无效的。
        alias                           tim man         
        service_notification_period     24x7
        host_notification_period        24x7
        service_notification_options    w,u,c,r
        host_notification_options       d,u,r
        service_notification_commands   notify-host-by-email
        host_notification_commands      notify-host-by-email
        email                           mchdba@sohu.com
        pager                           14782121512
        }

define contactgroup{
        contactgroup_name       ops
        alias                   pl ops team
        members                 timman,nagiosadmin
        }

3 将timman换成generic-contact

vi /usr/local/nagios/etc/objects/contacts.cfg

use                             timman

替换成

use                             generic-contact

4 又一次检測,Check下

[nagios@2 etc]$ /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios Core 4.0.6
Copyright (c) 2009-present Nagios Core Development Team and Community Contributors
Copyright (c) 1999-2009 Ethan Galstad
Last Modified: 04-29-2014
License: GPL

Website: http://www.nagios.org
Reading configuration data...
   Read main config file okay...
   Read object config files okay...

Running pre-flight check on configuration data...

Checking objects...
Checked 8 services.
Checked 1 hosts.
Checked 1 host groups.
Checked 0 service groups.
Checked 2 contacts.
Checked 2 contact groups.
Checked 24 commands.
Checked 5 time periods.
Checked 0 host escalations.
Checked 0 service escalations.
Checking for circular paths...
Checked 1 hosts
Checked 0 service dependencies
Checked 0 host dependencies
Checked 5 timeperiods
Checking global event handlers...
Checking obsessive compulsive processor commands...
Checking misc settings...

Total Warnings: 0
Total Errors:   0

Things look okay - No serious problems were detected during the pre-flight check
[nagios@cache-2 etc]$

最新文章

  1. 关于MySql 关键字与字段名冲突 的问题
  2. 2015年最热门前端框架React 入门实例教程
  3. sql server T-SQL 基础
  4. Python Generators(生成器)--yield
  5. Python的面向对象3
  6. Scala Hello 示例
  7. mysql之 MySQL 主从基于 GTID 复制原理概述
  8. Carbondata源码系列(二)文件格式详解
  9. Coins HDU - 2844
  10. python 一致性哈希 分布式
  11. 基于web的jfreechart的使用
  12. ajax登录验证-js
  13. loj#6031. 「雅礼集训 2017 Day1」字符串(SAM 广义SAM 数据分治)
  14. <a>标签里面直接嵌套图片,<img>下面出现一小段空白的原因
  15. 【Hi3516】 uboot下烧写BSP
  16. python之函数篇3
  17. 服务端API安全解决方案
  18. 由表生成代码:mybatis-generator入门
  19. 激活JetBrains的IDE(PhpStorm、WebStorm、IntelliJ IDEA)
  20. oracle的between用来判断时间区间

热门文章

  1. LNMP下安装memcache
  2. Google zxing实现二维码扫描完美解决方案
  3. Spring Boot -01- 快速入门篇(图文教程)
  4. Android 原生 MediaPlayer 和 MediaCodec 的区别和联系(二)
  5. this and super
  6. 类和类的关系——java
  7. Django 简单用户注册
  8. Enum,Int,String的互相转换
  9. Visual Studio 下nuget命令的使用
  10. codeforces 432E Square Tiling