Ad Widget

Collapse

Monitoring MSSQL by ODBC

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mattjan
    Junior Member
    • Apr 2021
    • 19

    #1

    Monitoring MSSQL by ODBC

    Hi, I just started using Zabbix (try to move from Solar). I'm trying to monitor MSSQL (2014 on Windows 2012) using "Template DB MSSQL by ODBC" but stuck for 2 days.

    Finally I could connect with isql [dsn] [user] [password] after I changed domain user to SQL user but I still couldn't do it from UI, when I test:
    key: db.odbc.discovery[dbname,"{$MSSQL.DSN}"] with same DSN and creds I always get error below:
    • Cannot connect to ODBC DSN: [SQL_ERROR]:[08001][10054][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]TCP Provider: Error code 0x2746]|[08001][10054][[unixODBC][Microsoft][ODBC Driver 17 for SQL Server]Client unable to establish connection]
    There is nothing in SQL server log and ODBC log,I have searched Error code 0x2746, all of them have problem connecting to SQL server install on Linux due to newer openSSL doesn't support TLS1 but I'm trying to connect to windows box.
    Could you guys give me any direction to look?

    Thanks.
  • VPNZ
    Junior Member
    • Mar 2022
    • 2

    #2
    Did you ever get this working?
    I have exact same issue and am using the newer Driver 18 for SQL server. I have tried all types of hacks and variations of settings to no avail. iSQL connects fine however Zabbix "MSSQL: Get performance counters" fails.
    • Cannot connect to ODBC DSN: [SQL_ERROR]:[08001][10054][[unixODBC][Microsoft][ODBC Driver 18 for SQL Server]TCP Provider: Error code 0x2746]|[08001][10054][[unixODBC][Microsoft][ODBC Driver 18 for SQL Server]Client unable to establish connection]

    Comment

    • VPNZ
      Junior Member
      • Mar 2022
      • 2

      #3
      Fixed by following this: https://github.com/microsoft/msphpsq...ment-643522139

      Instrucitons copied here:
      edit: /etc/ssl/openssl.cnf

      Near 1st line in the file added
      openssl_conf = default_conf

      At end of file added
      [default_conf]
      ssl_conf = ssl_sect
      [ssl_sect]
      system_default = system_default_sect
      system_default_sect]
      MinProtocol = TLSv1
      CipherString = DEFAULT@SECLEVEL=1

      systemctl restart apache2
      # I rebooted the server...

      Comment

      Working...