Приветствую, каким образом можно получить поле Acknowledge или хотя бы значение True/False (Есть Acknowledge или нету?) с помощью данного API метода (на подобии того, как это выводиться на главной страницы Заббикса)?
В данный момент строю запрос так:
Получаю такой вывод (все в этом выводе устраивает, но очень не хватает этого поля):
Очень надеюсь на помощь.
В данный момент строю запрос так:
Code:
JSONObject triggers = new JSONObject();
JSONObject params = new JSONObject();
JSONObject filter = new JSONObject();
JSONArray selectHost = new JSONArray();
triggers.put("jsonrpc", "2.0");
triggers.put("method", "trigger.get");
params.put("output", "extend");
params.put("expandData", 1);
params.put("expandDescription", 1);
params.put("limit", 100);
params.put("monitored", 1);
params.put("sortfield", "lastchange");
params.put("sortorder", "DESC");
selectHost.put("maintenance_status");
params.put("selectHost", selectHost);
filter.put("status", 0);
filter.put("value", 1);
params.put("filter", filter);
triggers.put("auth", session);
triggers.put("params", params);
triggers.put("id", 3);
Code:
{"jsonrpc":"2.0","result":
[{"triggerid":"14894","expression":"{14536}>30","description":"***","url":"","status":"0","value":"1","priority":"4","lastchange":"1455902398","comments":"","error":"","templateid":"14480","type":"0","state":"0","flags":"0","hostname":"***","host":"***","hostid":"10125","value_flag":"0"},
{"triggerid":"14561","expression":"{14198}<31","description":"***","url":"","status":"0","value":"1","priority":"3","lastchange":"1455753807","comments":"","error":"","templateid":"14505","type":"0","state":"0","flags":"0","hostname":"***","host":"***","hostid":"10117","value_flag":"0"},
{"triggerid":"15206","expression":"{14852}=0","description":"***","url":"","status":"0","value":"1","priority":"4","lastchange":"1454937266","comments":"","error":"","templateid":"14436","type":"0","state":"0","flags":"0","hostname":"***","host":"***","hostid":"10154","value_flag":"0"}],"id":3}

Comment