歡迎您光臨本站 註冊首頁

nagios Unexpected start of object definition

←手機掃碼閱讀     火星人 @ 2014-03-03 , reply:0

nagios Unexpected start of object definition

# /usr/local/nagios/bin/nagios -v /usr/local/nagios/etc/nagios.cfg

Nagios 3.0.3
Copyright (c) 1999-2008 Ethan Galstad (http://www.nagios.org)
Last Modified: 06-25-2008
License: GPL

Reading configuration data...

Error: Unexpected start of object definition in file '/usr/local/nagios/etc/objects/mylinux.cfg' on line 24.  Make sure you close preceding objects before starting a new one.

***> 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.

# vi /usr/local/nagios/etc/objects/mylinux.cfg
define host{
           use             linux-server
          host_name     mylinux
          alias            mylinux
          address        192.168.0.21(客戶端IP既被監控的IP)
        }
define service{
        use                      generic-service
        host_name             mylinux
        service_description     check-swap
        check_command        check_nrpe!check_swap
               }
define service{
        use                      generic-service
        host_name             mylinux
        service_description     check-load
       check_command         check_nrpe!check_load
               }
define service{
        use                      generic-service
        host_name             mylinux
       service_description     check-disk
       check_command        check_nrpe!check_had1
define service{
        use                      generic-service
        host_name             mylinux
       service_description     check-users
       check_command        check_nrpe!check_users
               }
define service{
        use                    generic-service
        host_name           mylinux
        service_description  total_procs
        check_command     check_nrpe!check_total_procs
}


請問下怎麼解決。

[ 本帖最後由 zhengsenlin888 於 2009-12-21 20:06 編輯 ]
《解決方案》

check_command        check_nrpe!check_had1

這一行下面少了半邊括弧。。。

[火星人 ] nagios Unexpected start of object definition已經有794次圍觀

http://coctec.com/docs/service/show-post-2936.html