-
Notifications
You must be signed in to change notification settings - Fork 463
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
Authentication broken for ancient Zabbix since support added for Zabbix 6.4 #1616
Comments
I have the same issue here. Grafana 9.4.3 and i can't connect to one of my old Zabbix 3.0 Plugin version 4.3.0 and 4.3.1, only connect to my new Zabbix 6.0, but can't connect to the 3.0 Plugin version 4.2.10 and lower, i can connect to my old Zabbix 3.0, but can't connect to the new 6.0. I receive a Error: Invalid params. Invalid parameter "/": unexpected parameter "user". |
I'm having the same problem, my Zabbix 3.0 in which I'm migrating to a new Zabbix 6.4 in parallel, I'm using two datasources to keep the alerts in a single dashboard and I'm having the same problem. |
Fixed in 4.3 #1544 |
No, this is a different issue. The 4.3 makes the plugin work on Zabbix 6.4, but breaks the plugin with Zabbix 3.0 |
Alguem ja achou a solução? Pois ainda sofro com esse erro! |
- Remove Authenticate and isDeprecatedUserParamError methods - Using the Zabbix API version determines the use of Login or LoginDeprecated - This will prevent errors login in old Zabbix 3 as reported in grafana#1616
Hello, @alexanderzobnin First of all, thanks for this great plugin. I provided a PR with a possible fix to this issue. It was tested using Zabbix 3.0.32. |
Zabbix changed their user.login API endpoint to use "username" instead of "user" in 6.4rc, and you added support for it.
You added a isDeprecatedUserParamError check in order to be retro-compatible, and you look for 'unexpected parameter "user' in the error string. So far so good.
But ancient Zabbix installs are now broken, because when getting a user.login request with "username" instead of "user", they throw a generic error:
Sadly, I have no idea at what point Zabbix changed from that generic error to the one where they check the parameter names.
Possibly it would be cleaner to check the apiinfo.version endpoint before trying to user.login, and set the parameter name accordingly. Unfortunately, I suck at go and don't think I can provide a good pull request.
Hope this helps!
The text was updated successfully, but these errors were encountered: