Skip to content
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

Zabbix 6.0 #814

Closed
jameskirsop opened this issue Feb 14, 2022 · 8 comments · Fixed by #820
Closed

Zabbix 6.0 #814

jameskirsop opened this issue Feb 14, 2022 · 8 comments · Fixed by #820
Labels
good first issue Good for newcomers

Comments

@jameskirsop
Copy link
Contributor

Zabbix 6.0 will be released soon (RC's are now out). This issue is to track discussion around changes to allow this module to install/upgrade to 6.0.

@greenaar
Copy link

greenaar commented Feb 16, 2022

Switching the versioncmp strings from

if versioncmp($zabbix_version, '5.4') == 0 {

to

if versioncmp($zabbix_version, '5.4') != -1 {

was enough to get 6.0 running for me.

I did manually run the /usr/share/doc/zabbix-sql-scripts/mysql/history_pk_prepare.sql script against my db, but i'm not sure if that was technically required.

The service also needed a manual restart post install, but everything came up cleanly.

@smortex
Copy link
Member

smortex commented Feb 16, 2022

Switching the versioncmp strings from

if versioncmp($zabbix_version, '5.4') == 0 {
to
if versioncmp($zabbix_version, '5.4') != -1 {

Better keep a comparison with 0:

if versioncmp($zabbix_version, '5.4') >= 0 {

you can then put the comparison operator between the operands in your head to immediately see what is tested: $zabbix_version >= '5.4' 😉


Have you considered opening a Pull Request (PR) to add your change? This look like a perfect enhancement for a first-time contributor!

If you do not know how to start, here is a quite complete guide about the process of contributing to projects on GitHub:
https://dataschool.io/how-to-contribute-on-github

In any case, do not feel scared: we are here to help!

@smortex smortex added the good first issue Good for newcomers label Feb 16, 2022
@greenaar
Copy link

greenaar commented Feb 16, 2022

There's a few more bits it turns out. StartODBCPollers needs an addition in params, proxy.pp, server.pp and the appropriate templates.

Upgrades DO require the sql for history to be run.
Templates need to be manually updated (from https://git.zabbix.com/rest/api/latest/projects/ZBX/repos/zabbix/archive?at=refs%2Ftags%2F6.0.0&format=zip )

I'll admit you're right with your logic, ! -1 will catch 0 (equal) or 1 (newer), but working with negatives isn't really ideal.

My module isn't PR capable at this point, i've delta'd off the beaten track (in part due to some custom hackery to early-enable agent2).

If this is still pending when the agent2 PR is merged I'll come back and backfill my changes in a PR on that.

Otherwise, consider this at minimum a quantification of the known upgrade caveats. With the items noted above, conversion time was ~15 minutes, but you do lose your history (renamed to history_old), which may be non-trivial for some consumers.

@jameskirsop
Copy link
Contributor Author

I've got a branch here: https://github.com/jameskirsop/puppet-zabbix/tree/zabbix6.0support

It's probably PR-ready for adding basic 6.0 support after someone more familiar with this module has a quick look to make sure I've not missed anything.

@root-expert
Copy link
Member

https://github.com/voxpupuli/puppet-zabbix/blob/master/lib/puppet/provider/zabbix_template/ruby.rb#L46

This may need updating as well. And generally some other regexes. The test should catch those though.
@jameskirsop provide the PR whenever it's ready, else i'll can help later 😄

@root-expert
Copy link
Member

Hello folks!

I would appreciate it if you took a moment to review/test the linked PR which adds Zabbix 6.0 support to the module 😄

-Chris

@Damianv99
Copy link

Damianv99 commented May 17, 2022

Hi All,

Proxy schema file is no longer an archive file and the name has changed to proxy.sql

https://git.zabbix.com/projects/WEB/repos/documentation/browse/en/manual/installation/install_from_packages/debian_ubuntu.md?at=refs%2Fheads%2Frelease%2F6.0

@root-expert
Copy link
Member

Hi All,

Proxy schema file is no longer an archive file and the name has changed to proxy.sql

https://git.zabbix.com/projects/WEB/repos/documentation/browse/en/manual/installation/install_from_packages/debian_ubuntu.md?at=refs%2Fheads%2Frelease%2F6.0

This is already covered by the PR

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants