You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
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.
The text was updated successfully, but these errors were encountered: