API 没有将文件同步到 Icinga2 卫星

API not syncing files to Icinga2 satellite

我有一个主机和一个卫星在互联网上运行。我无法从主机获取文件以同步到卫星。我正在查看 /var/lib/icinga2/api。没有区域文件。

我的master zones文件如下-

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
}

当我 运行 服务 icinga2 状态时,我得到以下 -

Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:17 +0000] information/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 2, rate: 5.35/s (321/min 808/5min 808/15min); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:17 +0000] information/ApiListener: New client connection for identity 'test-satellite-a' from [51.52.53.54]:37376 Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:17 +0000] warning/ApiListener: No data received on new API connection for identity 'test-satellite-a'. Ensure that the remote endpoints are properly configured in a cluster setup. Nov 24 19:35:17 master1 icinga2[21599]: Context: Nov 24 19:35:17 master1 icinga2[21599]: (0) Handling new API client connection Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:27 +0000] information/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 8, rate: 5.5/s (330/min 835/5min 835/15min); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:37 +0000] information/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 2, rate: 5.5/s (330/min 890/5min 890/15min); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:34:47 +0000] information/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 2, rate: 5.33333/s (320/min 1025/5min 1025/15min); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:35:07 +0000] information/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 6, rate: 5.5/s (330/min 1091/5min 1091/15min); Nov 24 19:35:17 master1 icinga2[21599]: [2017-11-24 19:35:17 +0000] information/WorkQueue: #7 (IdoMysqlConnection, ido-mysql) items: 8, rate: 5.46667/s (328/min 1134/5min 1134/15min);

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

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

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

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

主机端口设置需要在主机或卫星中配置..

由于它是通过 Internet 确保没有可达性问题。

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