-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add Zabbix 7.0 compatibility #79
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Moves everything into failsafe.py module. This allows us to test the failsafe checking more thoroughly.
Changing destination branch to |
pederhan
added a commit
that referenced
this pull request
Sep 3, 2024
* Add Zabbix 7.0 compatibility (#79) * Add Zabbix 7.0 compatibility * Add Host model comments * Add missing type annotations to __init__ .py * Fix state manager mypy issues * Refactor failsafe OK file checking, add test * Add type annotations to __init__ * Refactor process initialization * Refactor hanging process handling * Ignore missing mypy stubs in import * Extract failsafe functions, add tests * Fix zabbix_tags2zac_tags, add types * Fix StateManager mypy stub hack * Add type annotations for all processing.py methods * Improve state.State comments+docstrings * Refactor host modifier/source collector loading * Refactor failsafe checking Moves everything into failsafe.py module. This allows us to test the failsafe checking more thoroughly. * Fix incorrect variable usage * Refactor DB host retrieval in `ZabbixUpdater` * Fix broken tests * Add check_failsafe tests * Fix incorrect variable name * Rewrite API internals with Pydantic (#82) * Remove disabled hosts from maintenance * Add periodic maintenance cleanup * Add map_dir fixtures * Add config options * Fix mocks, use fixture * Rewrite API internals with Pydantic * Fix tests * Fix and improve JSON serialization * Fix changelog headers * Add API param building functions * Fix `set_hostgroups` not being able to remove groups * Add read-only mode for ZabbixAPI Activated during dryruns. * Fix `ParamsType` docstring * Document new config options in changelog * Update changelog * Add Py3.12 trove classifier * Update sample config * Fix ZabbixAPI method docstring tense * README: update supported versions * Create required host groups on startup * README: fix JSON example * README: Make host modifier example more relevant * Update changelog * Add notes on running source collectors standalone * Warn if no proxies * Remove redundant bool cast * Use absolute import * Use absolute imports * Sort host groups when logging new and old * Add note regarding Source Handler update interval * Change "replaced" to "updated" for source hosts * Remove trigger support in GC * Remove validation of request params * Add support for mysterious host.status==3 * Fix missing assignments in SignalHandler.__init__ * Fix missing parameter type annotation * Move warning next to statement that caused it * Add py.typed marker file * Update README, run GC every 24h * Show data in request errors * Fix fetching templates via old API code * Remove urllib3 logger, set logger on httpcore * Fetch groups when fetching hosts * Make bulk an optional field for CreateHostInterfaceDetails * Remove duplicated code for host interfaces * Refactor `set_interface` * Fix setting proxies on Zabbix 7 * Comments, var name * Update host group map when creating host group * Changelog heading * Fix README grammar * Log names of templates * Add NOTE comment * Add configurable group prefix separator
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This PR adds Zabbix 7.0 compatibility. There are numerous API changes in 7.0, for which a new
compat.py
module has been added. This module adds functions that take in the current Zabbix API version and return the correct API method parameter / object property name.The current implementation is a bit messy, and we will have to consider if we want to refactor all the API calls. Constructing large parameter dicts inline leads to some readability issuses, which we should try to mitigate. It's already kind of overloaded with long names and such.