-
Notifications
You must be signed in to change notification settings - Fork 295
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 5.0 support #45
Comments
Thanks for opening this issue @apiening I was thinking about this yesterday as I've seen the release announcement, but haven't had any time to actually look at it any closer. To be honest, we haven't established any roadmap yet for this collection repo and most of the work is done with best effort reactive to issues as they arise. I will kick into our CI and make it spin containers for 5.0 as well to see what errors we get. There will be probably some misses as not all of the modules have integration tests written yet. Until then, please feel free to open a new issue (or PR if you are up to it) if you find any bug |
Thank you @apiening for reporting. I tried zabbix integration test with zabbix 5.0 in my lab and the following module integration tests are errors occurred.
The above errors are investigating now. It can't zabbix 5.0 run using current docker-compose file because It was changed listen port for a container from 80 to 8080 by zabbix developer. |
Please, go ahead and open the PR. We can even have it failing CI until errors in integration tests are under investigation. |
@sky-joker have you started working on failing zabbix_ modules? I am asking, because if not, I can start working on #46 and fix the issues you've reported at the same time. |
As far as I can see #46 has been closed since the component zabbix_host does work with Zabbix 5.0 when the details parameters are set accordingly. I have updated my Zabbix server instance to 5.0 (docker-compose based installation) and I would like to configure some clients now. Since I have used https://galaxy.ansible.com/dj-wasabi/zabbix-agent in the past to deploy 4.4 Agents I wonder if it is possible to deploy 5.0 agents with ansible yet? I would like to setup some Zabbix 5.0 clients with ansible on my systems and to do some testing. Is there a way to start with a dev branch or are we not quite there yet? |
@apiening we are unfortunately not there yet. 5.0 release came just as we are in the process of "consuming" zabbix roles from @dj-wasabi into this collection. There is a project open for this migration as was discussed in #16 and dj-wasabi/ansible-zabbix-agent#341 @dj-wasabi - any thoughts on when other zabbix roles may make it as a PRs into this collection? |
Since I'm a little bit under time pressure and I didn't want to deploy my zabbix agents manually (without ansible) I tried to setup a zabbix agent version 5.0 with the role zabbix-agent from the devel-roles-migration branch. With just some minor modifications, it worked so far. In case there are other impatient ones around, here is what I did:
Then I was able to install / setup the zabbix client 5.0 with the following playbook:
I then was able to register the client on my Zabbix 5.0 server using the zabbix_host module from this community.zabbix ansible collection. I noticed that the apt repository seems to be removed and re-added on each run of the playbook. So the setup is not idempotent and I haven't really tried to find out why this is. |
Sorry @apiening that it is taking us so long and thanks for posting this workaround. Just a minor correction - I believe that 5.0 support for zabbix_agent role is planned for a near future. |
Hi @apiening I am currently working on getting the CI work with the Ansible roles. Once I have finished that, I will be working on getting the roles to work with Zabbix 5.0. So no worries, it will be coming. :) Regards, |
Hi @D3DeFi and @dj-wasabi, thank you for the update: Can't wait for the release. As soon as there's something ready to be testet I would like to give it a try. I expect that the vars might change or have a different prefix, but that should not be an issue. With kind regards |
That is indeed planned in #77 and |
Hello, I did not manage to reproduce @apiening's workaround with 0.2.0. (edit: I did.) |
Hi @raph-topo, I have cloned your fork and replaced my own modified version with it and gave it a try. Here is the complete playbook I used to do the test: ---
- hosts: all
collections:
- community.zabbix
tasks:
- name: Import zabbix-agent role
import_role:
name: zabbix_agent
- name: Ensure host is monitored by Zabbix.
zabbix_host:
server_url: https://zabbix.myserver.com
login_user: Admin
login_password: "verysecurepassword"
host_name: '{{ inventory_hostname }}'
host_groups:
- Linux servers
link_templates:
- Template OS Linux by Zabbix agent
status: enabled
state: present
interfaces:
- type: 1
main: 1
dns: '{{ inventory_hostname }}'
delegate_to: localhost If this works for you as well, may I suggest that you do a PR based on your fork? |
@raph-topo I should have mentioned, that the following vars are still required to execute the playbook from my previous post successfully. I've put these variables in a host_vars-file: ---
zabbix_agent_version: 5.0
zabbix_version_long: 5.0.1
zabbix_agent_server: ###zabbix-server###
zabbix_agent_serveractive: ###zabbix-server###
zabbix_url: https://###zabbix-server###
zabbix_agent_become_on_localhost: false |
Thanks for your help, @apiening!
are enough. |
I think the playbook can be much smaller if you would go for this: Playbook.yml
group_vars (or host_vars):
Now the Ansible Zabbix Agent role will make sure the host is created via the API. |
for zabbix-proxy5 with sqlite3 db on Centos 8 i've added in collections/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/RedHat.yml
and it's work for me |
Hi @b2ronn Thank you, I will add it to my PR. 👍 Have some issues with PHP on a CentOS 8.. So hopefully I am able to get the PR merged this weekend.. |
on the existing host, I had no problems with selinux, but on a new minimal installation Centos8 there is an error
need in the collections/ansible_collections/community/zabbix/roles/zabbix_proxy/tasks/RedHat.yml in the task - name: "RedHat | Install related SELinux package to fix issues on RHEL8" to add
|
@dj-wasabi why did you add this if-block? I tried to set up zabbix_web on Ubuntu 20.04 and it lacks the required php settings. Changing the two lines mentioned above to include version 5.0 includes the php settings and resolves the front-end error. |
Hi @stephankn It seems that Zabbix is very inconsistent with certain things, this would be another one. Will try to check this weekend. Thank you for making a comment. 👍 |
сouple of questions about the default variables
because in one envirement I have problems connecting to the repository via http, but without any problems it is available via https. |
Hi @b2ronn
|
@dj-wasabi . please do you. |
I've created a new PR for my last comment, because in addition to those changes, I added keys that are not in the templates. |
I believe a huge effort was made to provide support for Zabbix 5.0 both in modules and roles, which is now in much better state than it was when this issue was first opened. If you find any additional problems, please create a new issue. Closing this one, thank you everyone! |
SUMMARY
Zabbix 5.0.0 has been released: https://www.zabbix.com/release_notes
The
README.md
file states:I'm curious if there has been some progress made towards supporting Zabbix 5.0 or if there is some scheduling in place.
ISSUE TYPE
COMPONENT NAME
Supported Zabbix Versions
ADDITIONAL INFORMATION
I know that version 5.0.0 has just been released. From what I extracted from the release notes there are no breaking changes. The client is aimed to be a drop-in-replacement where config compatibility is preserved. An upgrade of the server is supported, too: https://www.zabbix.com/documentation/current/manual/installation/upgrade
The text was updated successfully, but these errors were encountered: