Hello there!
I am attempting to make use of the Zabbix API to retrieve ALL current problems, on hosts & items that are enabled.
I've been able to accomplish part of this, i can get all current problems, however i also get problems from disabled hosts, items & triggers coming back in the response as well.
Having tried for a few days, i'm now at a bit of a loss. I've attempted this on 4.0 LTS, 5.0 LTS and 5.2 all of which have the same behaviour.
We have disabled items & triggers on some hosts - such as switches - as there are certain ports which we expect to go up/down for example, and as such do not need to be notified of these events.
Similarly, some hosts are disabled as they are either old machines or not currently in use (I could use maintenance for the latter, though that's out with the scope of this query)
So, in summary, can i please get some guidance to return only current problems, on enabled hosts, items & triggers?
Thanks in advance
Here's a very brief example of the issue i'm facing, using the following API call, i get events that are indeed problems, however i also get events that are linked to disabled triggers & items.

I am attempting to make use of the Zabbix API to retrieve ALL current problems, on hosts & items that are enabled.
I've been able to accomplish part of this, i can get all current problems, however i also get problems from disabled hosts, items & triggers coming back in the response as well.
Having tried for a few days, i'm now at a bit of a loss. I've attempted this on 4.0 LTS, 5.0 LTS and 5.2 all of which have the same behaviour.
We have disabled items & triggers on some hosts - such as switches - as there are certain ports which we expect to go up/down for example, and as such do not need to be notified of these events.
Similarly, some hosts are disabled as they are either old machines or not currently in use (I could use maintenance for the latter, though that's out with the scope of this query)
So, in summary, can i please get some guidance to return only current problems, on enabled hosts, items & triggers?
Thanks in advance

Here's a very brief example of the issue i'm facing, using the following API call, i get events that are indeed problems, however i also get events that are linked to disabled triggers & items.
Code:
curl -s -X POST -H 'Content-Type: application/json-rpc' -d " \
{
\"jsonrpc\": \"2.0\",
\"method\": \"problem.get\",
\"params\": {
\"output\": \"extend\",
\"selectAcknowledges\": \"extend\",
\"selectTags\": \"extend\",
\"selectSuppressionData\": \"extend\",
\"severities\": \"4\",
\"acknowledged\": \"0\",
\"recent\": \"0\",
\"suppressed\": \"0\"
},
\"auth\": \"$auth\",
\"id\": 1
}
" $url | jq .
Comment