Comments (27)
file is located here: /usr/share/zabbix/api_jsonrpc.php
then, I just had to include the additional line provided by bpbp-boop after $data variable:
...
header('Content-Type: application/json');
$data = $http_request->body();
$data = str_replace('"user"', '"username"', $data);
don't forget to make a makup before adding any changes! ;) hope this will be fixed in the future
from grafana-zabbix.
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
from grafana-zabbix.
field "user" is now only accepted as "username"
(not) nice, useless zabbix changes.
from grafana-zabbix.
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
[plugins]
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource,alexanderzobnin-zabbix-triggers-panel
in short: unsigned plugins can be overwritten, incorrect signed plugins, cannot
so the trick is to delete the signing key ...
from grafana-zabbix.
I installed 4.2.10 but still getting the same problems with sending user instead of username. Any workarounds?
I have tried almost everything except compiling it from the source(which I am doing right now as I write).
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]
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource,alexanderzobnin-zabbix-triggers-panel
But it still throws the user param error.
Any suggestions?
from grafana-zabbix.
Another option is editing api_jsonrpc.php
on your zabbix servers to update the user parameter
52a53
> $data = str_replace('"user"', '"username"', $data);
from grafana-zabbix.
Yes, user
was renamed to username
.
from grafana-zabbix.
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();from grafana-zabbix.
Here's a test build (linux+windows). You can try it and see if issue is fixed
alexanderzobnin-zabbix-app.zip
from grafana-zabbix.
from grafana-zabbix.
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?
Here's a test build (linux+windows). You can try it and see if issue is fixed
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?
from grafana-zabbix.
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?
Here's a test build (linux+windows). You can try it and see if issue is fixed
alexanderzobnin-zabbix-app.zipAlexandre, 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.
from grafana-zabbix.
Here's a test build (linux+windows). You can try it and see if issue is fixed
alexanderzobnin-zabbix-app.zip
@alexanderzobnin , I uninstalled the old plugin, applied the bug fix and the problem still exists. I get the following message: Invalid params. Invalid parameter "/": unexpected parameter "user".
from grafana-zabbix.
Here's a test build (linux+windows). You can try it and see if issue is fixed
Please sign this test version.
plugin=alexanderzobnin-zabbix-app path=/var/lib/grafana/plugins/alexanderzobnin-zabbix-app/gpx_zabbix-plugin_freebsd_arm64
logger=plugin.loader t=2023-01-10T09:50:13.860210076Z level=warn msg="Skipping loading plugin due to problem with signature" pluginID=alexanderzobnin-zabbix-datasource status=modified
logger=plugin.loader t=2023-01-10T09:50:13.860429449Z level=warn msg="Skipping loading plugin due to problem with signature" pluginID=alexanderzobnin-zabbix-triggers-panel status=modified
logger=plugin.loader t=2023-01-10T09:50:13.860523876Z level=warn msg="Skipping loading plugin due to problem with signature" pluginID=alexanderzobnin-zabbix-app status=modified
from grafana-zabbix.
Although the unsigned plug-in is set in grafana.ini, it still cannot be used
[plugins]
enable_alpha = true
app_tls_skip_verify_insecure = true
# Enter a comma-separated list of plugin identifiers to identify plugins to load even if they are unsigned. Plugins with modified signatures are never loaded.
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-datasource
# Enable or disable installing / uninstalling / updating plugins directly from within Grafana.
plugin_admin_enabled = true
;plugin_admin_external_manage_enabled = false
from grafana-zabbix.
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?
from grafana-zabbix.
Thanks for the hint. The following works for me:
[plugins]
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource,alexanderzobnin-zabbix-triggers-panel
from grafana-zabbix.
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.
Even adding the line:
[plugins]
allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource,alexanderzobnin-zabbix-triggers-panel
According to grafana documentation plugins with modified signature cannot be loaded. Has anyone managed to resolve?
from grafana-zabbix.
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 [plugins] allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource,alexanderzobnin-zabbix-triggers-panel
in short: unsigned plugins can be overwritten, incorrect signed plugins, cannot so the trick is to delete the signing key ...
@solitprojects , It worked thank you very much.
from grafana-zabbix.
I can't get the plugin to work. It gives the error: Plugin disabled
from grafana-zabbix.
Is it any tricky way to avoid this bug in pluggin side
from grafana-zabbix.
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"."
logger=context userId=1 orgId=1 uname=admin t=2023-02-21T15:10:45.301609358Z level=error msg="Request Completed" method=POST path=/api/datasources/10/resources/zabbix-api status=500 remote_addr=X.X.X.X time_ms=60 duration=60.692836ms size=117 referer=https://grafana.test.es:3000/datasources/edit/mBeMTU0Vk handler=/api/datasources/:id/resources/*
from grafana-zabbix.
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
from grafana-zabbix.
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 [plugins] allow_loading_unsigned_plugins = alexanderzobnin-zabbix-app,alexanderzobnin-zabbix-datasource,alexanderzobnin-zabbix-triggers-panel
in short: unsigned plugins can be overwritten, incorrect signed plugins, cannot so the trick is to delete the signing key ...
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)
from grafana-zabbix.
hello @bpbp-boop, where is the file ? I have docker installation
thanks
from grafana-zabbix.
= str_replace('"user"', '"username"', $data);
Top man! Thanks!
from grafana-zabbix.
Thank you. That solves the problem
from grafana-zabbix.
Related Issues (20)
- Wrong query option - 'Query type' = 'Item'
- Grafana plugin still using parameter "selectGroups" and "auth"
- RangeError: Incorrect locale information provided
- Feature Request - Check box to only include enabled hosts when setting up variables.
- Grafana cloud refuses to reset Zabbix API token HOT 7
- Zabbix plugin tcp timeout after Grafana upgrade to latest version HOT 3
- I cannot delete a function (for example, transform -1) by clicking the x HOT 1
- How to see hostname + metric in legend? HOT 2
- From version 4.3.0 onwards (Zabbix 3.2.11) - "Invalid params. Login name or password is incorrect." - HOT 7
- "Zabbix Problems Panel" display problems HOT 1
- "skip TLS certificate validation" is not working
- Grafana Variable doesn't work at filter of hosts
- Problems Issue with Zabbix 7.0 beta 2 HOT 1
- An error occured within the plugin HOT 10
- replaceAlias function get ignored when Dashboard Transforms like "Join by label" are applied on the dashboard HOT 1
- plugin version 4.4.6 query ignoring selected application
- Support prometheus for querying data
- replaceAlias function get ignored when Dashboard Transforms like "Join by label" are applied on the dashboard
- Plugin is failing to render in new Scenes architecture HOT 1
- Grafana after acknowladge HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. ๐๐๐
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google โค๏ธ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from grafana-zabbix.