2012-08-22 14 views
0

我希望能夠檢查我的站點是否啓動並由本地的nagios監控它。當我添加這個時,Nagios將不會運行

所以我去這個網站http://www.linickx.com/nagios這讓下面,現在雖然我不能看到hosts.cfg所以我創造了它,也services.cfg我不得不創建以及:

hosts.cfg 
    # host definition for bonus 
    define host{ 
    use      generic-host   ; Name of host template to use 
    host_name    bonus 
    alias     bonus 
    address     92.12.35.162 
    check_command   check-host-alive 
    max_check_attempts  10 
    notification_interval 120 
    notification_period  24x7 
    notification_options d,u,r} 
    services config 

The following should appended to the end of hosts.cfg (located in /etc/nagios or /usr/local/nagios/etc) 
# Service definition for bonus 
define service{ 
use    generic-service  ; Name of service template to use 
host_name   bonus 
service_description  HTTP 
is_volatile   0 
check_period   24x7 
max_check_attempts  3 
normal_check_interval  3 
retry_check_interval  1 
contact_groups   technical,support 
notification_interval  120 
notification_period  24x7 
notification_options  w,u,c,r 
check_command   check_http 
} 

我怎樣才能請讓這工作?

回答

0

Nagios不會添加新的配置文件,除非在主要的nagios.cfg中指定了文件或目錄。此外,新的對象配置將不會被添加,直到您重新啓動Nagios進程。你能否提供一些關於你如何安裝Nagios(源代碼或軟件包)以及你正在使用什麼Linux發行版的更多細節?

這裏有一些額外的資源:

Nagios的核心文檔 http://nagios.sourceforge.net/docs/3_0/

Nagios的核心支持論壇 http://support.nagios.com/forum/viewforum.php?f=7

+0

百勝安裝Nagios的安裝它 – RussellHarrower

相關問題