创建一个json脚本以从zabbix获取警报

时间:2014-12-01 13:12:45

标签: json zabbix

我想从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
}

1 个答案:

答案 0 :(得分:0)

您想获取提醒,但是您要求触发器 - trigger.get

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

alert.get

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

OR

event.get

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