I have to display all current problems in my infrastructure (like in Zabbix dashboard). I would like it to look like this:
Date Host Problem info
19.03 hostsap1 Lack of free swap space
18.03 hostsmb2 Zabbix_agentd is not running!
I use problem.get
problemlist = zapi.do_request('problem.get',
{
"output": "extend",
"selectAcknowledges": "extend",
"recent": "true",
"sortfield": ["eventid"],
"sortorder": "DESC"
})
and I have the answer:
{
'eventid': '25644',
'source': '0',
'object': '0',
'objectid': '147717',
'clock': '2447665140',
'ns': '193586738',
'r_eventid': '0',
'r_clock': '0',
'r_ns': '0',
'correlationid': '0',
'userid': '0',
'acknowledges': []
},
[...]
How to ask zabbix about host name and most importantly about problem description like "Lack of free swap space"?