博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[Nagios] Error: Template 'timman' specified in contact definition could not be not found (c
阅读量:6151 次
发布时间:2019-06-21

本文共 2746 字,大约阅读时间需要 9 分钟。

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

转载地址:http://qvffa.baihongyu.com/

你可能感兴趣的文章
java相关
查看>>
由一个异常开始思考springmvc参数解析
查看>>
向上扩展型SSD 将可满足向外扩展需求
查看>>
虚机不能启动的特例思考
查看>>
SQL Server编程系列(1):SMO介绍
查看>>
在VMware网络测试“专用VLAN”功能
查看>>
使用Formik轻松开发更高质量的React表单(三)<Formik />解析
查看>>
也问腾讯:你把用户放在什么位置?
查看>>
CSS Sprites 样式生成工具(bg2css)
查看>>
[转]如何重构代码--重构计划
查看>>
类中如何对list泛型做访问器??
查看>>
C++解析XML--使用CMarkup类解析XML
查看>>
P2P应用层组播
查看>>
Sharepoint学习笔记—修改SharePoint的Timeouts (Execution Timeout)
查看>>
CSS引入的方式有哪些? link和@import的区别?
查看>>
Redis 介绍2——常见基本类型
查看>>
asp.net开发mysql注意事项
查看>>
(转)Cortex-M3 (NXP LPC1788)之EEPROM存储器
查看>>
ubuntu set defult jdk
查看>>
[译]ECMAScript.next:TC39 2012年9月会议总结
查看>>