【问题标题】:icinga2 api dynamically added hostgroups not visible in icingaweb2icinga2 api 动态添加的主机组在 icingaweb2 中不可见
【发布时间】:2015-11-09 19:09:16
【问题描述】:

我将 icinga2 的快照版本用于 api 功能。 我能够成功地通过 api 动态添加主机组和主机并查询它们。

但是,我无法看到通过 icingaweb2 中的 api 添加的主机组。

这就是我正在做的事情:

添加主机组: curl -k -s -u icingaadmin:icinga 'https://localhost:5665/v1/objects/hostgroups/testgrp' -X PUT -d '{ "attrs": { "name" : "testgrp" ,"display_name" : "testgrp" , "state_loaded" :true }} '

添加主机:

curl -k -s -u icingaadmin:icinga 'https://localhost:5665/v1/objects/hosts/8.8.8.8' -X PUT -d '{ "templates": [ "generic-host" ], "attrs": { "address": "8.8.8.8 " , "组" : [ "testgrp" ]} }'

在 UI 中,我无法看到通过 API 创建的主机组,但是主机在 UI 中是可见的。

【问题讨论】:

  • 刚刚发现,通过API添加后,我必须重新启动它才能在UI中看到。有什么办法,我们可以在不重启 icinga2 进程的情况下做到这一点

标签: icinga


【解决方案1】:

感谢您的测试,我们已经修复了当前快照版本中的错误,现在准备在周一发布。

https://dev.icinga.org/issues/10604

【讨论】:

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