Configuration

Nagios 升級調試

  • June 5, 2011

我在正確進行升級時遇到了一些問題,我不確定這是因為我的配置還是因為 nagios 二進製文件是非標準的並且某些東西可能被破壞了。我對 nagios 幾乎沒有經驗,只是想確保正確設置它。

以下配置文件定義是否應允許升級接管並按預期增加通知間隔?配置文件中是否還有其他地方我應該查看以了解發生了什麼?我在配置中啟用了調試 32,它只是吐出“不會升級主機通知”。對於每個通知。

該配置確實通過了飛行前檢查,沒有任何問題,並報告它正在解析配置中的三個主機升級。

# test host definition
define host {
   host_name   test
   alias       test
   address     10.0.0.10
   hostgroups  test
   check_interval  0
   retry_interval  1
   max_check_attempts 2
   flap_detection_enabled  0
   icon_image  windows.png
   icon_image_alt  LOGO - Windows
   vrml_image  windows.png
   statusmap_image windows.png
   action_url  /info/host/275
   check_period    24x7
   contact_groups  hostgroup15_servicegroup1,hostgroup15_servicegroup10,hostgroup15_servicegroup13,hostgroup15_servicegroup14,hostgroup15_servicegroup2,hostgroup15_servicegroup3,hostgroup15_servicegroup4,hostgroup15_servicegroup42,hostgroup15_servicegroup45,hostgroup15_servicegroup46,hostgroup15_servicegroup47,hostgroup15_servicegroup5,hostgroup15_servicegroup8,hostgroup15_servicegroup9,ov_monitored_by_master
   check_command       check_host_15!-H $HOSTADDRESS$ -t 3 -w 500.0,80% -c 1000.0,100%
   parents nagios
   notifications_enabled   1
   notification_interval   3
   notification_period 24x7
   notification_options    u,d,r
   use host-global
}

define hostescalation{
   host_name               test
   first_notification      3
   last_notification       4
   notification_interval   10
   contact_groups          hostgroup15_servicegroup1,hostgroup15_servicegroup10,hostgroup15_servicegroup13,hostgroup15_servicegroup14,hostgroup15_servicegroup2,hostgroup15_servicegroup3,hostgroup15_servicegroup4,hostgroup15_servicegroup42,hostgroup15_servicegroup45,hostgroup15_servicegroup46,hostgroup15_servicegroup47,hostgroup15_servicegroup5,hostgroup15_servicegroup8,hostgroup15_servicegroup9,ov_monitored_by_master
}

define hostescalation{
   host_name               test
   first_notification      4
   last_notification       5
   notification_interval   30
   contact_groups          hostgroup15_servicegroup1,hostgroup15_servicegroup10,hostgroup15_servicegroup13,hostgroup15_servicegroup14,hostgroup15_servicegroup2,hostgroup15_servicegroup3,hostgroup15_servicegroup4,hostgroup15_servicegroup42,hostgroup15_servicegroup45,hostgroup15_servicegroup46,hostgroup15_servicegroup47,hostgroup15_servicegroup5,hostgroup15_servicegroup8,hostgroup15_servicegroup9,ov_monitored_by_master
}

define hostescalation{
   host_name               test
   first_notification      5
   last_notification       0
   notification_interval   240
   contact_groups          hostgroup15_servicegroup1,hostgroup15_servicegroup10,hostgroup15_servicegroup13,hostgroup15_servicegroup14,hostgroup15_servicegroup2,hostgroup15_servicegroup3,hostgroup15_servicegroup4,hostgroup15_servicegroup42,hostgroup15_servicegroup45,hostgroup15_servicegroup46,hostgroup15_servicegroup47,hostgroup15_servicegroup5,hostgroup15_servicegroup8,hostgroup15_servicegroup9,ov_monitored_by_master
}

定義是正確的,但 nagios 使用的是預記憶體對像模型,因此對配置文件的更改對重新載入沒有任何影響。重新生成預記憶體解決了該問題。

引用自:https://serverfault.com/questions/192744