[ZBX-24254] Database monitoring with ODBC has insufficient settings for timeout Created: 2024 Mar 21  Updated: 2025 Apr 11

Status: Open
Project: ZABBIX BUGS AND ISSUES
Component/s: Proxy (P), Server (S)
Affects Version/s: None
Fix Version/s: None

Type: Problem report Priority: Trivial
Reporter: Taiki Fujiwara Assignee: Alexey Pustovalov
Resolution: Unresolved Votes: 4
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

Zabbix server
OS: Red Hat Enterprise Linux 8.4
Zabbix server: 5.0.29

Zabbix proxy
OS: Red Hat Enterprise Linux 8.8
ODBC driver: msodbcsql18.x86_64 18.3.2.1-1
Zabbix proxy: 5.0.29

Host
OS: Windows Server 2019



 Description   

Database monitoring with ODBC sets only SQL_LOGIN_TIMEOUT as its timeout setting, so there is no timeout for any other processes except login.

MySQL and PostgreSQL ODBC driver does not support SQL_ATTR_CONNECTION_TIMEOUT is noted in the following issue.

https://support.zabbix.com/browse/ZBX-6797

So, I think it is need to add timeout handling to ODBC connection process on Zabbix side.

 

I have not confirmed that it is related to this, but after restarting the target host for MSSQL monitoring, the logs of the process are no longer output after the following log (DebugLevel=4) and cannot be monitored after that.

In zbx_odbc_connect() dsn:'test' user:'test' 

I suspect that the problem may have been caused by the timeout settings.

 

Steps to reproduce:

  1. Monitoring MSSQL using the Template DB MSSQL by ODBC.
  2. Item added by the discovery rule Availability groups discovery and monitored it.
  3. Restart the monitored host.

Result:

Cannot be monitored, but there is no error.

Expected:
Monitoring will continue.



 Comments   
Comment by Smirnov Dmitriy [ 2024 Apr 02 ]

Oracle monitoring also suffers from this. Database performance issues block the poller and it is never released.

Comment by Taiki Fujiwara [ 2025 Apr 11 ]

Is there a plan to fix this problem?

Generated at Wed Sep 03 22:16:30 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.