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 Plugin does not load on windows #1785

Closed
patokav opened this issue Jan 25, 2024 · 7 comments
Closed

Zabbix Plugin does not load on windows #1785

patokav opened this issue Jan 25, 2024 · 7 comments

Comments

@patokav
Copy link

patokav commented Jan 25, 2024

Describe the bug
When trying to create a Zabbix data source I get the prompt "plugin unavailable". The plugin was working on older versions of Grafana but I was unable to connect to the zabbix database due to the "user" to "username" change on login with the php file. Would modifying the php file work for this or would it break things in zabbix?
I have also tried different versions of the plugin recommended by other issues on the GitHub with no luck, I installed the plugin using Grafana-cli each time
I have also tried executing gpx_zabbix-plugin_windows_amd64.exe as recommended in other posts

I have tried setting the following in defaults.ini
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource
enable_alpha = true
app_tls_skip_verify_insecure = true

And I restarted the server after making any changes/plugin installs

Expected behaviour
The database should test connection, so far that is not happening, it is just saving - to note the MySQL data source being used is tested and working

Screenshots
1
2
3
4

Logs
logger=context userId=1 orgId=1 uname=admin t=2024-01-24T16:05:00.2121184Z level=info msg="Request Completed" method=GET path=/api/live/ws status=-1 remote_addr=[::1] time_ms=1 duration=1.4059ms size=0 referer= handler=/api/live/ws
logger=context userId=1 orgId=1 uname=admin t=2024-01-24T16:05:05.0657805Z level=warn msg="Plugin unavailable" error="plugin unavailable" traceID=
logger=context userId=1 orgId=1 uname=admin t=2024-01-24T16:05:05.0657805Z level=error msg="Request Completed" method=POST path=/api/datasources/3/resources/zabbix-api status=503 remote_addr=[::1] time_ms=3 duration=3.2825ms size=46 referer=http://localhost:3000/datasources/edit/da3277fb-2c73-4738-a147-5fe955e9a7c8 handler=/api/datasources/:id/resources/*

Software versions
Windows 11 23H2

Grafana Zabbix Grafana-Zabbix Plugin
9.5.15 6.4 4.4.5

I have also tried Grafana V 10.3.1, every other version the same, and getting the same issue

@gabor
Copy link
Contributor

gabor commented Feb 12, 2024

hi @patokav , some ideas:
could you try to create a new plugin configuration, using the user-interface (do not use provisioning). also try to keep the configuration as simple as possible (do not use direct db connection). is the error still happening?

another idea: in the beginning you wrote:

The plugin was working on older versions of Grafana but I was unable to connect to the zabbix database due to the "user" to "username" change on login with the php file. Would modifying the php file work for this or would it break things in zabbix?"

the grafana-version should have no effect on the plugin's compatibility with Zabbix. so, if you take the Grafana version where the plugin was still working, and upgrade the plugin there to the newest plugin version, it should work. (of course, we'd like to find out why it does not work on the newest grafana-version, but we have to start somewhere). what was the last working grafana-version? could you try what i described? (upgrade the zabbix-plugin on that grafana-vserion to newest)

@gabor gabor moved this to Backlog in OSS Big Tent Feb 12, 2024
@patokav
Copy link
Author

patokav commented Feb 15, 2024

Hi @gabor thanks for responding,

I don't see an option to create a plugin configuration but I tried creating a new data source with the same error. I also tried disabling the direct DB connection but still the same.
The version of Grafana where the plugin would actually test for connection, was 7.5.17, unfortunately I couldn't update the plugin as they had a dependency on using Grafana 9 or newer.
After doing some research, the older versions of zabbix API expected to be sent "user" and "password" to access the API, this is what the older versions of the zabbix plugin used. When Zabbix API changed to expect "username" and "password", the older versions of the plugin stopped working on the newer versions of zabbix.
I am currently on Grafana 10.3.1 and the most up to date zabbix plugin but still no luck

@gabor
Copy link
Contributor

gabor commented Feb 20, 2024

hi, i tried the combination of Grafana10.3.1, the grafana-zabbix-plugin version 4.4.5, and zabbix6.4, and was able to connect to zabbix (on a linux server.. well, using docker).

the error message you are getting (Plugin unavailable), usually means the plugin is not willing to work at all, for example it's missing some of it's files, or something like that.

i see this is running on windows, may i ask, is the grafana-server running on windows, and also the zabbix-server running on windows?

@patokav
Copy link
Author

patokav commented Feb 21, 2024

Hi, Thanks for the help. I figured it might be the case as well however I have tried reinstalling it and updating it both using the Grafana CLI and getting the release from GitHub. The Zabbix server is running on Linux and has been updated over the weekend to 6.4.11 (if that makes any difference). The Grafana Server is running on windows, I am currently self hosting it on my machine.

I have reinstalled the grafana plugin but I am now getting this error
image

logger=context userId=1 orgId=1 uname=admin t=2024-02-21T09:29:43.2862505Z level=error msg="Internal server error" error="[plugin.downstreamError] client: failed to call resources: [plugin.unavailable] plugin unavailable" remote_addr=[::1] traceID=
logger=context userId=1 orgId=1 uname=admin t=2024-02-21T09:29:43.2862505Z level=error msg="Request Completed" method=POST path=/api/datasources/10/resources/zabbix-api status=500 remote_addr=[::1] time_ms=2 duration=2.6926ms size=116 referer=http://localhost:3000/connections/datasources/edit/a1bf383a-3cc6-4e01-a9f4-74bdcc904218 handler=/api/datasources/:id/resources/*

@gabor gabor changed the title Zabbix Plugin unavailable Zabbix Plugin does not load on windows Feb 26, 2024
@gabor
Copy link
Contributor

gabor commented Feb 26, 2024

thanks for the info @patokav . i was able to reproduce this. i think the plugin does not currently work on windows.

@gabor
Copy link
Contributor

gabor commented Feb 26, 2024

after more investigation, this seems to be a problem in grafana itself, and not specific to the zabbix plugin. i created a bugreport in grafana at grafana/grafana#83416, i recommend following that issue. i will close this isuse, because the fix will probably happen in core grafana. if that's not the case, we can always reopen this issue later.

thanks for your help in investigating this 👍

@gabor
Copy link
Contributor

gabor commented Jul 19, 2024

hi, this is fixed now in the current zabbix plugin version (4.5.2)

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

No branches or pull requests

2 participants