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

Problem with Zabbix 6.4 #59

Open
Skifi opened this issue May 23, 2023 · 1 comment
Open

Problem with Zabbix 6.4 #59

Skifi opened this issue May 23, 2023 · 1 comment

Comments

@Skifi
Copy link

Skifi commented May 23, 2023

Hello,
I am using your script on Zabbix server 6.4. I found problem with API change: https://support.zabbix.com/browse/ZBX-17955
In update media function there needs to be version check. I am not programmer but this works for me:

if self.get_api_minor_version() >= 5.2:
result = self.conn.user.update(userid=str(userid), medias=[media_defaults])
if self.get_api_minor_version() > 3.2 and self.get_api_minor_version() < 5.2:
result = self.conn.user.update(userid=str(userid), user_medias=[media_defaults])
else:
self.delete_media_by_description(user, description)
result = self.conn.user.updatemedia(users=[{"userid": str(userid)}], medias=media_defaults)

I have tested this on 6.4 and 6.2.9.
Please implement this.

scoopex pushed a commit that referenced this issue May 29, 2023
@scoopex
Copy link

scoopex commented May 29, 2023

Thanks for reporting, pull requests and contribution are always welcome.
I made the suggested change, can you test my change?

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

No branches or pull requests

2 participants