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

"Successfully authenticated/Authentication token expired, performing re-login" loop on HTTPS Zabbix #1978

Open
d1nuc0m opened this issue Feb 25, 2025 · 1 comment

Comments

@d1nuc0m
Copy link

d1nuc0m commented Feb 25, 2025

Describe the bug

When adding an HTTPS Zabbix data source with a self-signed certificate (selected Skip TLS certificate validation), the plugin loops onto authentication

logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.297850361+01:00 level=debug msg="Zabbix request" method=hostgroup.get
logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.297891781+01:00 level=debug msg="performing query params migration" version=70 dsName=zabbix-datasource pluginId=alexanderzobnin-zabbix-datasource uname=admin dsUid=aee4a8cpmqpz4b endpoint=callResource method=hostgroup.get
logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.361275494+01:00 level=debug msg="Authentication token expired, performing re-login"
logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.361338174+01:00 level=debug msg="performing query params migration" dsUid=aee4a8cpmqpz4b method=user.login pluginId=alexanderzobnin-zabbix-datasource uname=admin dsName=zabbix-datasource endpoint=callResource version=70
logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.515508722+01:00 level=debug msg="Successfully authenticated" user=Admin url=https://zabbix.example.com/api_jsonrpc.php
logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.515556322+01:00 level=debug msg="Zabbix request" method=hostgroup.get
logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.515589002+01:00 level=debug msg="performing query params migration" endpoint=callResource pluginId=alexanderzobnin-zabbix-datasource version=70 dsName=zabbix-datasource dsUid=aee4a8cpmqpz4b method=hostgroup.get uname=admin
logger=plugin.alexanderzobnin-zabbix-datasource t=2025-02-25T13:39:18.574832312+01:00 level=debug msg="Authentication token expired, performing re-login"
(...)

And so on

Zabbix endpoint is working, correctly answers to test queries such as:

curl -k --request POST  --url 'https://zabbix.example.com/api_jsonrpc.php'  --header 'Content-Type: application/json-rpc'  --data '{"jsonrpc":"2.0","method":"user.login","params":{"username":"Admin","password":"MySecretPasswordHere"},"id":1}'

{"jsonrpc":"2.0","result":"LOREMIPSUM","id":1}

Plugin is able to authenticate against another Zabbix instance using cleartext (no HTTPS)

Expected behavior
Plugin works regardless of HTTP/HTTPS

Screenshots
\

Network data
\

Software versions

Grafana Zabbix Grafana-Zabbix Plugin
11.5.2 7.0.9 5.0.2

EDITS

  • 2025/02/27 - tested with Grafana-Zabbix 5.0.2
@d1nuc0m
Copy link
Author

d1nuc0m commented Feb 27, 2025

@ivanahuckova let me know if more information and/or a MWE are needed

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

No branches or pull requests

2 participants