Closed tjyang closed 11 months ago
It seems like a bunch of proxy-related properties (Proxy.name, Host.proxyid, and more?) have been renamed in 7.0.
I have a branch with a temporary fix here: https://github.com/pederhan/zabbix-cli/tree/fix-login-7-0-bandaid
I am working on a more robust solution that solves this a bit more elegantly, but I need to actually understand the full extent of what was changed in 7.0 first.
@pederhan
Big thanks for 7.0 API fix, It almost worked.
pip install git+https://github.com/pederhan/zabbix-cli.git@fix-login-7-0-bandaid
[me@t01 ~]$ ls -l .zabbix-cli_auth .zabbix-cli/zabbix-cli.conf
-r-------- 1 tjyang domain users 14 Nov 25 10:16 .zabbix-cli_auth
-rw-r--r-- 1 tjyang domain users 595 Nov 25 10:18 .zabbix-cli/zabbix-cli.conf
[me@t01 ~]$
[me@t01 ~]$ zabbix-cli
<snipped>
/usr/lib/python3.6/site-packages/urllib3/connectionpool.py:1052: InsecureRequestWarning: Unverified HTTPS request is being made to host 'ilclnagios03.mot.com'. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.io/en/1.26.x/advanced-usage.html#ssl-warnings
InsecureRequestWarning,
[ERROR]:'host'
[me@t01 ~]$
Oh, that's weird. It worked for me on my empty local Zabbix 7.0 instance, but I encounter the same error now after adding a proxy to it.
@pederhan , you are correct. My test zabbix-server have 5 proxy severs configured.
Sorry for the inconvenience, but since the bandaid fix didn't pan out, I'm just going to keep these new changes in the main branch I'm working on: https://github.com/pederhan/zabbix-cli/tree/fix-login-7-0
Try it out to see if it solves the issue for you.
I am grateful of your effort and fix. I will keep checking the latest comment at https://github.com/pederhan/zabbix-cli/commits/fix-login-7-0. To see if it fix the zabbix 7 alpha 7 with proxy servers configured.
@pederhan ,Thanks for the fixes in fix-login-7-0. I can now connect to 7.0a7 zabbix server with proxy servers configured.
#############################################################
Welcome to the Zabbix command-line interface (v2.3.1)
Connected to server https://test03/zabbix (v7.0.0)
#############################################################
Type help or \? to list commands.
[zabbix-cli Admin@test03]$
[zabbix-cli Admin@test03.test.com]$ shell uname
[Error]: Problems running uname
[zabbix-cli Admin@test03$
I'll create a new issue for that, since the original issue you had seems to be resolved.
Fixed in #173