Alberto Medina
Alberto Medina

Reputation: 107

How to get problem history through Zabbix API

I want to create a report of resolved problems in Zabbix in a period of time, for example, last month. I can fetch only problems "active" or unresolved using the API (problems.get), but I can't get resolved problems.

I can't get the list of resolved problems in the Portal selecting "History" in the "Problems" window, but I can't find how to retrieve those problem cases using the API.

enter image description here

Is there a way to get that data via API? Or maybe via a database query?

Thanks and best regards.

Upvotes: 0

Views: 493

Answers (1)

Simone Zabberoni
Simone Zabberoni

Reputation: 2113

You should use the event.get api.

According to the object definition, you can filter on source :

Possible values:

0 - event created by a trigger;

[cut]

and on value

Possible values if source is set to "event created by a trigger" or "event created on service status update":

0 - OK;

1 - problem.

Upvotes: 0

Related Questions