连接断开时Icinga2客户端主机culster-zone检查命令未关闭(RED)

时间:2018-07-10 19:35:15

标签: icinga icinga2 icingaweb2

我在icintga2监视系统中使用具有Top-Down模式的Director设置了一个具有2个客户端端点的主机。 我还设置了两个客户端节点,它们都接受配置和接受命令。 (希望这表示我正在运行Top Down Command Endpoint模式)

3个主机的服务检查(磁盘/内存/负载)返回正确的结果。但是我的问题是: 根据{{​​3}}的示例, 主机icinga2-client1使用“ hostalive ”作为主机check_command。 例如。

object Host "icinga2-client1.localdomain" {
  check_command = "hostalive" //check is executed on the master
  address = "192.168.56.111"

  vars.client_endpoint = name //follows the convention that host name == endpoint name
}

但是我有一个问题是 如果client1 icinga进程未运行, 主机状态保持为 GREEN ,所有服务状态(磁盘/内存/负载)也均保持为 GREEN 因为主服务器没有收到任何服务检查更新,并且hostalive check命令能够对节点执行ping操作。

Top Down Command Endpoint example部分下, 它提到使用“ 集群区域”检查命令。 我期望在使用“ 集群区域”时, 主机状态为 RED 当客户端节点icinga进程停止时, 但不知何故。

有人有什么主意吗?

我的区域/主机/端点配置如下:

object Zone "icinga-master" {
    endpoints = [ "icinga-master" ]
}
object Host "icinga-master" {
    import "Master-Template"

    display_name = "icinga-master [192.168.100.71]"
    address = "192.168.100.71"
    groups = [ "Servers" ]
}
object Endpoint "icinga-master" {
    host = "192.168.100.71"
    port = "5665"
}


object Zone "rick-tftp" {
    parent = "icinga-master"
    endpoints = [ "rick-tftp" ]
}
object Endpoint "rick-tftp" {
    host = "172.16.181.216"
}
object Host "rick-tftp" {
    import "Host-Template"

    display_name = "rick-tftp [172.16.181.216]"
    address = "172.16.181.216"
    groups = [ "Servers" ]
    vars.cluster_zone = "icinga-master"
}


object Zone "tftp-server" {
    parent = "icinga-master"
    endpoints = [ "tftp-server" ]
}
object Endpoint "tftp-server" {
    host = "192.168.100.221"
}
object Host "tftp-server" {
    import "Host-Template"

    display_name = "tftp-server [192.168.100.221]"
    address = "192.168.100.221"
    groups = [ "Servers" ]
    vars.cluster_zone = "icinga-master"
}


template Host "Host-Template" {
    import "pnp4nagios-host"

    check_command = "cluster-zone"
    max_check_attempts = "5"
    check_interval = 1m
    retry_interval = 30s
    enable_notifications = true
    enable_active_checks = true
    enable_passive_checks = true
    enable_event_handler = true
    enable_perfdata = true
}

谢谢

里克

0 个答案:

没有答案