problem.get
The method allows to retrieve problems according to the given parameters.
This method is for retrieving unresolved problems. It is also possible, if specified, to additionally retrieve recently resolved problems. The period that determines how old is “recently” is defined in Administration → . Problems that were resolved prior to that period are not kept in the problem table. To retrieve problems that were resolved further back in the past, use the event.get method.
This method may return problems of a deleted entity if these problems have not been removed by the housekeeper yet.
Parameters
(object)
Parameters defining the desired output.
The method supports the following parameters.
(integer/array)
Returns either:
- an array of objects;
- the count of retrieved objects, if the
countOutput
parameter has been used.
Examples
Retrieving trigger problem events
:
Response:
{
"jsonrpc": "2.0",
"result": [
{
"eventid": "1245463",
"source": "0",
"object": "0",
"objectid": "15112",
"clock": "1472457242",
"ns": "209442442",
"r_eventid": "1245468",
"r_clock": "1472457285",
"correlationid": "0",
"userid": "1",
"name": "Zabbix agent on localhost is unreachable for 5 minutes",
"acknowledged": "1",
"severity": "3",
"cause_eventid": "0",
"acknowledges": [
{
"acknowledgeid": "14443",
"userid": "1",
"eventid": "1245463",
"clock": "1472457281",
"message": "problem solved",
"action": "6",
"old_severity": "0",
"new_severity": "0",
"suppress_until": "1472511600",
"taskid": "0"
}
],
{
"maintenanceid": "15",
"suppress_until": "1472511600",
"userid": "0"
}
],
"suppressed": "1",
"tags": [
{
"tag": "test tag",
"value": "test value"
}
]
}
],
"id": 1
Source
CEvent::get() in ui/include/classes/api/services/CProblem.php.