【问题标题】:API not syncing files to Icinga2 satelliteAPI 未将文件同步到 Icinga2 卫星
【发布时间】:2017-11-25 06:06:29
【问题描述】:

我有一个主人和一个卫星通过互联网。我无法从主服务器获取文件以同步到卫星。我正在查看 /var/lib/icinga2/api。没有区域文件。

我的主区域文件如下 -

object Zone "master" {
    endpoints = [ "master1" ]
}
object Endpoint "master1" {
    host = "192.168.1.69"
    port = "5665"
}
object Zone "Zone-Test" {
    endpoints = [ "test-satellite-a" ]
}
object Endpoint "test-satellite-a" {
    host = "51.52.53.54"
    port = "5665"
}
object Zone "global-templates" {
    global = true
}

卫星上的区域如下-

object Endpoint "master1" {
    host = "41.42.43.44"
    port = "5665"
}
object Zone "master" {
    endpoints = [ "master1" ]
}
object Endpoint NodeName {
}
object Zone ZoneName {
    endpoints = [ NodeName ]
    parent = "master"
}
object Zone "global-templates" {
    global = true
}

当我运行 service icinga2 status 时,我得到以下信息 -

Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:17 +0000] 信息/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 2, rate: 5.35 /s (321/min 808/5min 808/15min); 11 月 24 日 19:35:17 master1 icinga2[21599]:[2017-11-24 19:34:17 +0000] 信息/ApiListener:来自 [51.52.53.54] 的身份“test-satellite-a”的新客户端连接: 37376 11 月 24 日 19:35:17 master1 icinga2[21599]:[2017-11-24 19:34:17 +0000] 警告/ApiListener:在新的 API 连接上未收到身份“test-satellite-a”的数据。确保在集群设置中正确配置了远程端点。 11 月 24 日 19:35:17 master1 icinga2[21599]:上下文: 11 月 24 日 19:35:17 master1 icinga2[21599]: (0) 处理新的 API 客户端连接 Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:27 +0000] 信息/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 8, rate: 5.5/s ( 330/分钟 835/5分钟 835/15分钟); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:37 +0000] 信息/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 2, rate: 5.5/s ( 330/分钟 890/5分钟 890/15分钟); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:47 +0000] 信息/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 2, rate: 5.33333/s ( 320/分钟 1025/5分钟 1025/15分钟); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:35:07 +0000] 信息/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 6, rate: 5.5/s ( 330/分钟 1091/5分钟 1091/15分钟); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:35:17 +0000] 信息/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 8, rate: 5.46667/s ( 328/分钟 1134/5分钟 1134/15分钟);

你知道这里出了什么问题吗?

【问题讨论】:

    标签: icinga2 icingaweb2


    【解决方案1】:

    您是否尝试将以下内容添加到 zone.conf:

    object Zone "director-global" {
      global = true
    }
    

    这为 Icinga Director 定义了一个全局区域。 这是同步配置命令所必需的, 模板、应用规则等到卫星和客户端。 所有节点都需要相同的配置,并且必须 在api 功能中启用accept_config

    【讨论】:

      【解决方案2】:

      主机端口设置需要在master或satellite中配置..

      由于它通过 Internet,请确保不存在可访问性问题。

      另外,我假设您已经为卫星区域添加了一些配置。只有全局区域和卫星区域的配置才会同步到卫星。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2011-09-06
        • 1970-01-01
        • 1970-01-01
        • 2020-05-01
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多