【问题标题】:Reading Graphite events from Icinga2从 Icinga2 读取 Graphite 事件
【发布时间】:2018-02-19 23:48:41
【问题描述】:

在我们的实验室中,我们目前正在使用两个系统来远程监控敏感数量等:

  • Icinga2,作为一个监控系统,从称为 Watchdog 的日志记录 DAQ 中读取数据,并在测量值超过用户定义的阈值时发出警报;

  • Graphite 将来自 Carbon 的数据(通过网络或其他方式接收并存储在磁盘上)绘制到网页上,以便远程访问。

到目前为止,我们只能让 Icinga2 写入它在 Graphite 上收到的任何内容,以便我们可以看到它。

是否可以让 Icinga2 从 Graphite 读取
还有其他程序直接向 Graphite 写入内容,并且无法通过 DAQ 看门狗从 Icinga 读取(缺少端口)。
理想情况下,我们希望在到达 Graphite 的任何东西上创建警报(Icinga2 可以做到)。

【问题讨论】:

    标签: graphite icinga icinga2 graphite-carbon


    【解决方案1】:

    有几个 check_graphite 插件实现允许您查询 Graphite web 提供的 API。很遗憾,我在这里没有推荐,请尝试最适合您需求的 Google 点击。

    所有这些都连接到 Graphite Web API:

    http://graphite.readthedocs.io/en/latest/render_api.html

    Graphite 本身已经非常强大,您可以让它聚合数据点并减少插件中的逻辑,以仅评估给定的阈值并返回输出和状态。

    如果您使用的是 Grafana,您还可以查看他们的警报和通知条件,并让例如网络挂钩将检查结果传回给 Icinga 2 的 REST API。

    http://docs.grafana.org/alerting/rules/ http://docs.grafana.org/alerting/notifications/

    【讨论】:

    【解决方案2】:

    我想我最终找到了解决方案:作为Graphite 软件包安装的一部分,Whisper 数据库。这包括许多有用的脚本,例如whisper-fetch.py,它允许从.wsp 文件(其中存储了绘制的graphite-web)中提取数据为我们想要的任何格式。

    只需检查整个Whisper 包是否已安装,这可以通过在python 终端上检查 import whisper 是否不返回错误来完成。如果未完全安装,请查看 GitHub 上的 whisper

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-02-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2021-08-15
      • 1970-01-01
      相关资源
      最近更新 更多