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]$

[Nagios] Error: Template 'timman' specified in contact definition could not be not found (c的更多相关文章

  1. ..\OBJ\CAN.axf: Error: L6411E: No compatible library exists with a definition of startup symbol __main.

    ..\OBJ\CAN.axf: Error: L6411E: No compatible library exists with a definition of startup symbol __ma ...

  2. Error creating bean with name 'menuController': Injection of autowired dependency……

    出现了一大串错误 Error creating bean with name 'userController': Injection of autowired dependencies failed. ...

  3. Error creating bean with name 'memcachedClient'...java.lang.OutOfMemoryError

    1,Tomcat启动报错例如以下: Caused by: org.springframework.beans.factory.BeanCreationException: Error creating ...

  4. Error occured processing XML 'Cannot find class [springmvc.extention.BeanArgumentResolver]'.

    <Description Resource Path Location Type Error occured processing XML 'Cannot find class [springm ...

  5. 解决ERROR 2002 (HY000): Can&#39;t connect to local MySQL server through socket &#39;/tmp/mysql.sock&#39; (2)

    在Mac和XAMPP环境,假设终端打字mysql,现这样的问题: ERROR 2002 (HY000): Can't connect to local MySQL server through soc ...

  6. iOS开展-clang: error: unknown argument: &#39;-websockets&#39;解决方案

    问题: 昨天莫名其妙Xcode自己主动升级,那么今天之前执行project什么时候,不知怎的,他们都获得了. 错误内容: clang: error: unknown argument: '-webso ...

  7. [生产环境数据恢复]innobackupex: fatal error: OR no &#39;datadir&#39; option in group &#39;mysqld&#39; in MySQL options

    1 运行恢复命令  [xxx@xxx-c001db1 tmp]$ time /usr/bin/innobackupex --rsync --user="user" --passwo ...

  8. 追索权 Eclipse + NDK error: stray &#39;\24&#39; in program

    [size=16px][b][color=#FF0000]追索权 Eclipse + NDK  error: stray '\24' in program[/color][b][/b][/b][/si ...

  9. error C2871: &#39;std&#39; : does not exist or is not a namespace

    #include <iostream.h> using namespace std; 然后编译时出现 error C2871: 'std' : does not exist or is n ...

随机推荐

  1. 了解RabbitMQ

    消息队列可以实现流量削峰.降低系统耦合度.提高系统性能等. RabbitMQ是一个实现了AMQP协议(Advanced Message Queue Protocol)的消息队列. RabbitMQ中的 ...

  2. 宝塔面板nginx配置安装Discuz

    Discuz!在Nginx下的Rewrite 需要说明的是,下网上以前一直流传的Rewrite都是有误的. 下面的Rewrite中百分号前面多了个转移字符"",这在Apache中是 ...

  3. Laravel 支付宝支付异步通知

    支付宝支付通知有前端通知(GET)和服务器异步通知(POST) 在配置支付宝支付时,需要注意的问题就是支付宝的回调操作: 1.在laravel中应该将支付宝通知路径组织csrf验证,否则会导致419错 ...

  4. CentOS 6.x 安装vnc

    https://www.cnblogs.com/pipci/p/7833581.html   1.安装vnc server [root@pxe ~]# yum install tigervnc-ser ...

  5. css动画和jq动画的简单区分

    有很多不怎么用css3写动画的同学经常会对其中css3的transform,transition,translate,animation,@keyframes等等动画属性混淆错乱,经常使用了发现没有效 ...

  6. Spring Boot—12URL映射

    package com.sample.smartmap.controller; import java.util.List; import org.springframework.beans.fact ...

  7. ComboBox Style

    <SolidColorBrush x:Key="ComboBoxNormalBorderBrush" Color="#e3e9ef" /> < ...

  8. Retrofit+RxJava(2)-基本使用

    首先是抽象的基类 public abstract class BaseApi { public static final String API_SERVER = "服务器地址" p ...

  9. Eclipse 配置 maven 的两个 settings 文件

    eclipse配置的settings文件名完全可以自定义,而本机maven只认识settings.xml文件. eclipse里配置maven有一个叫全局的,有一个叫用户的.这两个文件可以和本机mav ...

  10. Pig autocomplete 自动补全

    在pig的grunt环境下,按TAB键可以自动补全命令,用户可以添加自己的补全信息. 在conf目录下创建autocomplete文件,添加如下内容: hdfs://vm1:8020/   在grun ...