[ZBX-24879] MSSQL and PGSQL cannot be monitored via ODBC with the special characters in the password field Created: 2024 Jul 19  Updated: 2024 Oct 18  Resolved: 2024 Sep 30

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: 6.0.34rc1, 6.4.19rc1, 7.0.4rc1, 7.2.0alpha1

Type: Problem report Priority: Major
Reporter: Maksym Buz Assignee: Sergejs Boidenko
Resolution: Fixed Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: 5h
Original Estimate: Not Specified

Attachments: PNG File image-2024-09-04-13-13-52-118.png     PNG File image-2024-09-04-16-26-00-072.png     PNG File image-2024-09-05-14-23-35-815.png    
Issue Links:
Duplicate
Team: Team A
Sprint: S24-W34/35, S24-W36/37
Story Points: 2

 Description   

Steps to reproduce:

  1. Setup ODBC check with the special characters in the password field

Result:
Query failed:

[[FreeTDS][SQL Server]Login failed. The login is from an untrusted domain and cannot be used with Integrated authentication.]|[08001][0][[FreeTDS][SQL Server]Unable to connect to data source]

But it's working with the password specified in the item key itself.

Example of password used:

{*fXGeUlJ0<$Tce5%83n;0}

Zabbix version is 6.4.12

Expected:
Working monitoring



 Comments   
Comment by Yurii Polenok [ 2024 Sep 03 ]

Hi
The semicolon (; ) has been fixed, but the equals sign (=) is now not supported, which significantly broke the monitoring of our environment.
Upgraded from 6.4.17 to 7.0.3.
oracle-instantclient-odbc-21.5.0.0.0-1.el8.x86_64.rpm

Comment by Vladislavs Sokurenko [ 2024 Sep 04 ]

'=' Can still be used in connection string, was '=' used in username and password fields as not part of the username or password but for another meaning, is that the case that was broken ?

Comment by Yurii Polenok [ 2024 Sep 04 ]

db.odbc.select["db_availability",,"Driver=\{$DB_ORACLE_DRIVER};DBQ=//\{HOST.IP}:\{$DB_PORT}/\{$DB_SERVICE};"]

'=' was used in password (host secret macro {$DB_PASSWORD}).

Driver=/usr/lib/oracle/21/client64/lib/libsqora.so.21.1;DBQ=//10.10.10.110:1521/example.world;UID=dbuser;PWD=pass=word=with=spec=char

Comment by Yurii Polenok [ 2024 Sep 04 ]


for test just added '=' to the end of password.
At the same time:

[yuriip@zabbix-proxy-01 ~]$ isql -n -v -k 'Driver=/usr/lib/oracle/21/client64/lib/libsqora.so.21.1;DBQ=//10.10.10.110:1521/example.world;UID=dbuser;PWD=**,**_Wq-39eU7()Ub='
---------------------------------------

Connected!                            

...

                                     

---------------------------------------
1 SQL> select 1 from dual;
-----------------------------------------

1                                      

-----------------------------------------

1                                      

-----------------------------------------
SQLRowCount returns -1
1 rows fetched

Comment by Vladislavs Sokurenko [ 2024 Sep 04 ]

Could you please be so kind and try enclosing in {} does it work ?

[yuriip@zabbix-proxy-01 ~]$ isql -n -v -k 'Driver=/usr/lib/oracle/21/client64/lib/libsqora.so.21.1;DBQ=//10.10.10.110:1521/example.world;UID=dbuser;PWD={**,**_Wq-39eU7()Ub=}'
Comment by Yurii Polenok [ 2024 Sep 04 ]

It works fine via isql without brackets.
Try enclosing a password in the frontend?

Comment by Sergejs Boidenko [ 2024 Sep 06 ]

Fixed in:

Generated at Mon Mar 31 18:48:02 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.