-
Notifications
You must be signed in to change notification settings - Fork 458
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 api authentication not working in 6.4.0rc1 (and probably higher) #1544
Comments
update: apparently the "user" parameter was deprecated in version 5.4. Support for it is dropped in 6.4, see [ZBXNEXT-8085]. Please update the API call in the plugin |
Yes, |
dear, I'm on zabbix 6.4 b5 and grafana 9.3.2. Until version 6.4 b4 it was working but now I get the same error. I'm not finding in my debian file /usr/share/zabbix/api_jsonrpc.php that part to change the name to username. follow my file 'json-rpc', 'application/json' => 'json-rpc', 'application/jsonrequest' => 'json-rpc' ]; $http_request = new CHttpRequest(); $content_type = $http_request->header('Content-Type'); $content_type = explode(';', $content_type); $content_type = $content_type[0]; if (!isset($allowed_content[$content_type])) { header('HTTP/1.0 412 Precondition Failed'); return; } require_once dirname(__FILE__).'/include/classes/core/APP.php'; header('Content-Type: application/json'); $data = $http_request->body(); try { APP::getInstance()->run(APP::EXEC_MODE_API); $apiClient = API::getWrapper()->getClient(); // unset wrappers so that calls between methods would be made directly to the services API::setWrapper(); $jsonRpc = new CJsonRpc($apiClient, $data); echo $jsonRpc->execute(); } catch (Exception $e) { // decode input json request to get request's id $jsonData = json_decode($data, true); $response = [ 'jsonrpc' => '2.0', 'error' => [ 'code' => 1, 'message' => $e->getMessage(), 'data' => '' ], 'id' => (isset($jsonData['id']) ? $jsonData['id'] : null) ]; echo json_encode($response); } session_write_close(); |
Here's a test build (linux+windows). You can try it and see if issue is fixed |
thanks! I’m using the docker image so there is no possibility for me to manually update plugins , since i don’t have root access to that image. I will have to wait for the plugin to be published
|
Alexandre, the commands you have in the readme are the same ones we install in normally. How do I apply this build? is it by cli? which command? or is it through the web gui? which way?
Alexandre, the commands you have in the readme are the same ones we install in normally. How do I apply this build? is it by cli? which command? or is it through the web gui? which way? |
when copying the files to the /var/lib/grafana/plugins/alexanderzobnin-zabbix-app folder it deactivates the plugin and does not let it activate asking to reinstall the plugin. |
|
Please sign this test version. plugin=alexanderzobnin-zabbix-app path=/var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_freebsd_arm64 |
Although the unsigned plug-in is set in grafana.ini, it still cannot be used
|
Also running Zabbix 6.4b5. Unsigned option in grafana does not seem to work. Could you sign either your test build or a new release? |
Thanks for the hint. The following works for me:
|
I can't get the plugin to work. It gives the error: level=warn msg="Skipping loading plugin due to problem with signature" pluginID=alexanderzobnin-zabbix-datasource status=modified. [plugins] According to grafana documentation plugins with modified signature cannot be loaded. Has anyone managed to resolve? |
got it "solved" since this afternoon : delete MANIFEST.txt from the plugin directory and restart then it will load as "unsigned" plugin, if you add it to in short: unsigned plugins can be overwritten, incorrect signed plugins, cannot |
@solitprojects , It worked thank you very much. |
field "user" is now only accepted as "username" (not) nice, useless zabbix changes. |
Is it any tricky way to avoid this bug in pluggin side |
I installed 4.2.10 but still getting the same problems with sending user instead of username. Any workarounds? As for digital signature I have no issues. I enabled unsigned plugins as per below, updated it through grafana UI from 4.2.6 to 4.2.10 and it can be used... [plugins] But it still throws the user param error. Any suggestions? |
Hi, I also have the same problem. I have upgraded everything (Zabbix and Grafana) to their latest versions, and I still continue to get the same error: Invalid params. Invalid parameter "/": unexpected parameter "user". logger=plugin.alexanderzobnin-zabbix-datasource t=2023-02-21T15:10:45.300991485Z level=error msg="Zabbix API request error" error="Invalid params. Invalid parameter "/": unexpected parameter "user"." |
Hi, and thanks for excellent integration... I installed the last version of plugin that you has published in this thread... i solved "unsigned plugin" errors... but the error persist: "Invalid params. Invalid parameter "/": unexpected parameter "user". Zabbix 6.4.0rc2 Can you help me please? I'm migrating from PRTG Network Monitor to Zabbix + Grafana and this error stops our migration. Sorry for my poor english Thx for advance Best regards |
Thanks a lot mate this worked for me and thanks @alexanderzobnin for providing the test build, I was able to do these changes on my Grafana docker container and it worked!, you saved my life (Got a meeting this monday on how we are now monitoring network and servers using this awesome plugin) |
Another option is editing 52a53
> $data = str_replace('"user"', '"username"', $data); |
hello @bpbp-boop, where is the file ? I have docker installation |
Top man! Thanks! |
file is located here: then, I just had to include the additional line provided by bpbp-boop after $data variable:
don't forget to make a makup before adding any changes! ;) hope this will be fixed in the future |
Thank you. That solves the problem |
During testing version 6.4.0rc1 of Zabbix, the json rpc authentication fails
apparently instead of 'user' you need to use 'username' as parameter name now
maybe not really a plugin bug, but unless Zabbix confirms this as a bug themselves, the authentication mechanism in your plugin should change to be able to work in newer versions of Zabbix
original parameters are not working:
error = Invalid parameter "/": unexpected parameter "user".
new parameters are working (change user -> username) :
The text was updated successfully, but these errors were encountered: