[ZBX-21152] Monitoring over ODBC is not working on Zabbix 6.0 LTS Created: 2022 Jun 02  Updated: 2022 Jun 10  Resolved: 2022 Jun 10

Status: Closed
Project: ZABBIX BUGS AND ISSUES
Component/s: Templates (T)
Affects Version/s: 6.0.5
Fix Version/s: None

Type: Incident report Priority: Trivial
Reporter: Martin Sindler Assignee: Zabbix Support Team
Resolution: Won't fix Votes: 0
Labels: database
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified
Environment:

ODBC


Attachments: PNG File odbc.ini.png     PNG File odbcinst.ini.png     PNG File zabbix_test1.png     PNG File zabbix_test1_result.png    

 Description   

Steps to reproduce:

  1. Installation of Zabbix 6.0 LTS based on installation instruction with configration:
    1. Zabbix Version: 6.0 LTS
    2. OS Distribution: Cent OS
    3. OS Version: 8 Stream
    4. Database: MySQL
    5. Web Server: Apache
  2. Install template based on instructions: https://git.zabbix.com/projects/ZBX/repos/zabbix/browse/templates/db/mssql_odbc?at=release/6.0
  3. Configure odbc driver to use Microsoft Driver
  4. Add to host with MSSQL ODBC Template
  5. Test connection from Zabbix server over isql is successful (isql -v Sx***.domain.local zbx_monitor password). 
  6. Open Host (Sx**.domain.local) with SQL template attached in Zabbix  (Configuration->Sx**.domain.local) -> Discovery -> MSSQL by ODBCDatabase discovery and click on Test button and Get Values button with error : 
  7. Cannot connect to ODBC DSN: [SQL_ERROR]:[HYT00][0][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Login timeout expired]|[08001][10013][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x271D]|[08001][10013][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]A network-related or instance-specific error has occurred while establishin]
  8. Same issue shows also with Driver 18  or with FreeTDS even isql works correctly.

Result:
Query over Zabbix ends with error even ODBC is working as i can connect to the same server over isql.

Expected:
When i tried to install Zabbix 5.0 LTS ODBC query with Get Values button was successful. 



 Comments   
Comment by Vladimir Stepanov (Inactive) [ 2022 Jun 03 ]

I cannot reproduce the issue with the fallen ODBC failing connection. I repeated all your steps, but my Zabbix got a correct answer from MSSQL server.
Could you please check SELinux status on your Linux? One more question: did you check connection using isql under root?

Comment by Martin Sindler [ 2022 Jun 06 ]

Hi Vladimir,

Thank you very much for your quick response. SELinux disable resolved the issue. 

 

Best regards,

 

Martin 

 

 

Comment by Martin Sindler [ 2022 Jun 06 ]

Disable of SELinux solved the issue.

Generated at Sat May 31 03:19:10 EEST 2025 using Jira 9.12.4#9120004-sha1:625303b708afdb767e17cb2838290c41888e9ff0.