基于Stackdriver,我想发送通知给我的Centreon监控(在Nagios后面),因为工作流程的原因,你知道怎么做吗?谢谢
发布于 2019-05-03 02:21:17
Stackdriver警报允许webhook notifications,因此您可以运行服务器将通知转发到需要的任何位置(包括Centreon),并将Stackdriver警报通知通道指向该服务器。
发布于 2019-08-29 06:13:13
有两种方法可以在没有传统被动代理模式的情况下在Centreon队列中发送外部信息。
首先,您可以在上使用Centreon DSM (动态服务管理)插件。这很有趣,因为您不必在配置中注册一个专用且已知的服务来匹配通知。使用Centreon DSM,Centreon可以接收事件,如检测到问题导致的SNMP陷阱,并将事件动态分配到Centreon中定义的插槽,如托盘事件。
资源具有设置数量的“槽”,将在这些槽上分配(存储)警报。虽然人类行为没有考虑到这一事件,但它仍将在web前端的中心可见。确认该事件后,该插槽将可用于新事件。
该事件必须通过SNMP陷阱传输到服务器。
所有配置均在模块安装后通过Centreon web界面进行。有关完整的解释、屏幕截图和提示,请参阅在线文档:https://documentation.centreon.com/docs/centreon-dsm/en/latest/user.html
其次,Centreon开发人员添加了一个Centreon REST API,您可以使用它向监控引擎提交信息。此功能比SNMP Trap方式更易于使用。在这种情况下,您必须在使用任何API之前创建主机/服务对象。
要发送状态,请通过POST方法使用以下URL:
api.domain.tld/centreon/api/index.php?action=submit&object=centreon_submit_results标题
key value
Content-Type    application/json
centreon-auth-token the value of authToken you got on the authentication response服务body提交示例: body是一个JSON,上面提供的参数格式如下:
{
  "results": [
    {
      "updatetime": "1528884076",
      "host": "Centreon-Central"
      "service": "Memory",
      "status": "2"
      "output": "The service is in CRITICAL state"
      "perfdata": "perf=20"
    },
    {
      "updatetime": "1528884076",
      "host": "Centreon-Central"
      "service": "fake-service",
      "status": "1"
      "output": "The service is in WARNING state"
      "perfdata": "perf=10"
    }
  ]
}响应正文的示例:响应正文是一个带有HTTP返回码的JSON,并且每次提交时都有一条消息:
{
  "results": [
    {
      "code": 202,
      "message": "The status send to the engine"
    },
    {
      "code": 404,
      "message": "The service is not present."
    }
  ]
}有关更多信息,请参阅在线文档:https://documentation.centreon.com/docs/centreon/en/19.04/api/api_rest/index.html
Centreon REST API还允许获取主机、服务的实时状态,并进行对象配置。
https://stackoverflow.com/questions/53870485
复制相似问题