Fix querying and authentication for Zabbix v7.0+ #1931
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Fixes #1914
Fixes #1929
Fixes #1917
In this PR, we are fixing authentication that is currently broken for Zabbix v7.2+ (in some cases also 7.0). The reason is that in 7.0
auth
param was deprecated in favour ofAuth
header and in 7.2 the support was removed: https://www.zabbix.com/documentation/7.0/en/manual/api#authorization-methodsMoreover, the
real_hosts
was deprecated https://www.zabbix.com/documentation/7.0/en/manual/api/reference/hostgroup/get?hl=real_hosts in favor ofwith_hosts
and support was removed in in 7.2.And last
select_acknowledges
was deprecated and replaced withselectAcknowledges
. https://www.zabbix.com/documentation/7.0/en/manual/api/reference/event/get?hl=select_acknowledges%2CselectAcknowledgesThis PR fixes it and also adds a new docker block for Zabbix 72 for testing.
I have tested this PR with Zabbix 7.2:
zabbix72.mov
I have tested this PR with Zabbix 7.0:
zabbix70.mov
I have also tested with 6.2 and all works as expected.