zabbixapi
zabbixapi copied to clipboard
Support for Zabbix 5.x
5.0 is now out and should be supported!
@Splyth @snehitgajjar Is there anything i can do to help this along? I'm currently using 4.1.2 on Zabbix 5.0.3. (Through puppet-zabbix) with no issues. What are the prereqs you'd like, to get zabbix 5.x officially supported with this gem?
4.2.0 seems to break this gem on any unsupported zabbix version, when previous versions only warned. Making 5.x support even more important now imo. https://github.com/express42/zabbixapi/commit/add21b692b34acaa4ddb568fa13b27a52adf2856#diff-e4c256e6a91f4de6d474565ff8c53dc9R65
Sorry I'm swamped six ways from Sunday.
Honestly what needs to happen is this in my view:
- Bump Version
- Make Changes
- Add/Update Tests
Tests are currently passing and we're trying to keep them that way going forward.
If you have any specific question I'll try to answer. It's going to be a long while before I can get to it.
@aclarkee I'm willing to help as well - this library is too important to just let die like this.
I haven't been able to give this gem the time and attention it deserves and the way things are looking I won't be able to. @aclarkee @svdasein if you'd like I'm more than happy to turn it over to either one of you.
@Splyth I'm willing to get involved. I'm going to confess up front that I have much to learn vis a vis the CI stuff, but I am willing to learn it. Am I right in thinking that the path forward here is to upgrade the docker test environment to a 5.x and then hammer at the code 'til all the tests pass (and then add new stuff + tests if required)?
@svdasein that's about the long and short of it yeah. You can find my email on my profile and I can work on getting stuff transferred over to you.
I'm also willing to help but I'm in the same camp as @svdasein and not up to speed on all the CI hotness.
@jameskirsop I'm a contributor now - just starting. Def. could use some help. Where can I find your email addr? [edit nevermind - found it]
initial support for Zabbix 5.x (tested with 5.2.2): https://github.com/anapsix/zabbixapi/tree/zabbix-5
@anapsix do you know how to work all the ci stuff in this project? There aren't any dox for it and I'm really kind of out of my element. If you'd like I can see if I can get you added here.
@svdasein do you mean Rspec, or Travis CI stuff? Travis recently made it harder for OSS projects to get credits, so it might be worth considering move to Github Actions.. Either way, I'm familiar enough with Travis CI and Github Actions to update CI job with Zabbix 5.x or recreate the entire thing in Gitlab Actions. Though, I'd switch to using Zabbix Docker images, rather than installing Zabbix packages on Ubuntu.
@anapsix ok - I need to get you added as a contributor - you actually know how to work this stuff. Lemme see if I can figure out who to ping here (I'm pretty new myself).
alrighty..
- made a Gitlab Action based CI: https://github.com/anapsix/zabbixapi/actions?query=workflow%3ACI
- here's the workflow definition file: https://github.com/anapsix/zabbixapi/blob/zabbix-5/.github/workflows/main.yml
Now that I've got access to the repo, I've pushed zabbix5.2-alpha1 branch here.
Since folks are eager to use zabbixapi gem with latest version of Zabbix, how about we publish a pre-release version 5.2.0-alpha1 to RubyGems based on zabbix5.2-alpha1?
There is still plenty of work to be done, including updating documentation, adding support for previously unsupported API objects (such as problem), etc.. But at very least, folks can start using previously supported API.
Nice! We definitely need this gem for puppet-zabbix so pushing it to RubyGems could help us.
@Splyth (sorry for the ping 😄 ) could you possibly add as maintainer @anapsix so they can push to RubyGems? Thank you!
Alternatively, as @root-expert suggested, we could setup a Github Action to push to Rubygems based on tag pattern v5.2**.
Couple of pre-made actions are available for that:
- https://github.com/marketplace/actions/publish-to-rubygems
- https://github.com/marketplace/actions/publish-gem
UPDATE: I got access to RubyGems for zabbixapi.. will hook up the Github Action job to push based on branch / tag soon
Nice!
I do not have enough permissions on this repo to add secrets for CI job.. .. and exposing a personal API token in public project's repo might not be as good of an idea
I've pushed zabbixapi 5.0.0-alpha1 to Rubygems maually: https://rubygems.org/gems/zabbixapi/versions/5.0.0.pre.alpha1
Install it via
gem install zabbixapi -v 5.0.0-alpha1
# or
gem install zabbixapi -v 5.0.0.pre.alpha1
Or in Gemfile
gem 'zabbixapi', '~> 5.0.0-alpha1
# or
gem 'zabbixapi', '~> 5.0.0.pre.alpha1
It seems that 5.0.0-alpha1 only supports API versions 5.0 and 5.2. Are there breaking changes in later versions, such as 5.4?
You can use ignore_version to get this gem working on 5.4. Works fine for my purposes.
Backward incompatible changes here (Only thing that affected me was the inability to read PSK values) https://www.zabbix.com/documentation/current/manual/api/changes_5.2_-_5.4
What's left to do before the official 5.x release can be published?