【问题标题】:Create a json script to get alerts from zabbix创建一个 json 脚本以从 zabbix 获取警报
【发布时间】:2014-12-01 13:12:44
【问题描述】:

我想从 zabbix 获取警报,上面写着"description": "Free disk space is less than 20% on volume D:",但即使知道还有更多警报,我也只会收到 1 个警报。我是不是做错了什么?

{
   "jsonrpc":"2.0",
   "method":"trigger.get",
   "params":{
      "expandData":"hostname",
      "output":[
         "triggerid",
         "description"
      ],
      "filter":{
         "value":1,
         "description":"Free disk space is less than 20% on volume D:"
      },
      "sortorder":"DESC"
   },
   "auth":"auth",
   "id":1
}

【问题讨论】:

  • 请始终提供mcve 您的问题。此外,请描述您已经尝试过的内容。

标签: json zabbix


【解决方案1】:

您想获得警报,但您要求触发 - trigger.get

我不确定你真正想要得到什么,但可能你应该使用:

alert.get

https://www.zabbix.com/documentation/2.4/manual/api/reference/alert/get

event.get

https://www.zabbix.com/documentation/2.4/manual/api/reference/event/get

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 2017-09-17
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2022-12-05
    相关资源
    最近更新 更多