文档文档

BigPanda 事件处理程序

BigPanda 是一个事件关联和自动化平台,可帮助组织预防和解决 IT 停机事件。

配置

BigPanda 事件处理程序的配置和默认 选项 值在您的 kapacitor.conf 中设置。下面的示例显示了默认配置

[bigpanda]
  enabled = false
  # BigPanda integration App Key
  app-key = ""
  # Authorization Bearer token for BigPanda REST API.  
  token = ""
  # BigPanda Alert API url  
  url = "https://api.bigpanda.io/data/v2/alerts"  

enabled

设置为 true 以启用 BigPanda 事件处理程序。

token

设置您的 BigPanda REST API 的授权 Bearer 令牌。

app-key

设置您的 BigPanda 集成 App Key。要获取您的 App Key,请登录您的 BigPanda 帐户,然后在标题工具栏中选择 **Integrations**,然后单击 **New Integration**。选择 **Alerts REST API**,单击 **Integrate** 按钮,然后单击 **Create an App Key**。

url

BigPanda Alert API URL。

选项

以下 BigPanda 事件处理程序选项可以在 handler 文件中设置,或者在 TICKscript 中使用 .bigPanda() 时设置。

名称类型描述
appKeystringBigPanda appKey
primaryPropertystringBigPanda primary property
secondaryPropertystringBigPanda secondary property
hoststringHost alert payload parameter (object that caused the alert)
attributesmap of key value pairsOption to add additional attribute(s) to the alert payload

BigPanda 使用 primary property 来构造 incident 的标题,并使用 secondary property 来构造副标题。有关更多信息,请参阅 Alert Correlation Logic

默认情况下,该处理程序将 Kapacitor 任务和警报属性映射到 BigPanda Alert 或 Event 字段,如下所示:

ValueBigPanda Alert Field
idcheck
messagedescription
detailsdetails
TaskNametask

所有 EventData 标签和字段都将作为 **Additional attributes** 附加到 BigPanda Alert。有关更多信息,请参阅 BigPanda Alert REST API

TICKscript 示例

stream
  |from()
    .measurement('cpu')
  |alert()
    .id('cpu_usage')
    .crit(lambda: "usage_user" > 90)
    .stateChangesOnly()
    .message('Hey, check your CPU')
    .bigPanda()
stream
  |from()
    .database('telegraf')
    .retentionPolicy('autogen')
    .measurement('cpu')
    .groupBy('host')
    .where(lambda: "cpu" == 'cpu-total')
  |eval(lambda: 100.0 - "usage_idle").as('total_used')
  |window().period(10s).every(10s)
  |mean('total_used').as('total_used')
  |alert()
    .id('cpu_usage_check')
    .message('Hey {{ index .Tags "host"}} / {{ .ID }}: is high!')
    .details('https://example.com/dashboard/{{ index .Tags "host"}}')
    .info(lambda: "total_used" > 70)
    .warn(lambda: "total_used" > 80)
    .crit(lambda: "total_used" > 90)
    .stateChangesOnly()
    .appKey('...')
    bigPanda()
      .host('{{ .Tags.host }}')
      .attribute('monitor_link', 'http://example.com/monitor?node={{ .Tags.host }}')
      .attribute('x_total_used', '{{ .Fields.total_used }}')

此页面是否有帮助?

感谢您的反馈!


InfluxDB 3.8 新特性

InfluxDB 3.8 和 InfluxDB 3 Explorer 1.6 的主要增强功能。

查看博客文章

InfluxDB 3.8 现已适用于 Core 和 Enterprise 版本,同时发布了 InfluxDB 3 Explorer UI 的 1.6 版本。本次发布着重于操作成熟度,以及如何更轻松地部署、管理和可靠地运行 InfluxDB。

更多信息,请查看

InfluxDB Docker 的 latest 标签将指向 InfluxDB 3 Core

在 **2026 年 2 月 3 日**,InfluxDB Docker 镜像的 latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。

如果使用 Docker 来安装和运行 InfluxDB,latest 标签将指向 InfluxDB 3 Core。为避免意外升级,请在您的 Docker 部署中使用特定的版本标签。例如,如果使用 Docker 运行 InfluxDB v2,请将 latest 版本标签替换为 Docker pull 命令中的特定版本标签 — 例如

docker pull influxdb:2