[Nagios] Error: Template 'timman' specified in contact definition could not be not found (c

來源:互聯網
上載者:User

標籤:style   tar   color   int   strong   http   

Check nagios設定檔報錯如下:


[[email protected] 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 查看報錯內容

[[email protected] 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                           [email protected]
        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下

[[email protected] 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
[[email protected] etc]$ 

相關文章

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.