Nagios 升级调试

Nagios 升级调试

我在升级过程中遇到了一些问题,我不确定这是因为我的配置还是因为 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
}

答案1

定义是正确的,但 nagios 使用的是预缓存对象模型,因此对配置文件的更改对重新加载没有任何影响。重新生成预缓存解决了这个问题。

相关内容