I'm stuck with Microsoft SQL monitoring 
Based on this I tried:
I ran these on the Zabbix server:
root@zabbixsrv:/etc# curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
root@zabbixsrv:/etc# yum remove unixODBC-utf16 unixODBC-utf16-devel #to avoid conflicts
root@zabbixsrv:/etc# ACCEPT_EULA=Y yum install -y msodbcsql17
root@zabbixsrv:~# odbcinst -j
unixODBC 2.3.7
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
root@zabbixsrv:~#
root@zabbixsrv:/etc# odbcinst -q -d -n
[PostgreSQL]
[MySQL]
[FreeTDS]
[MariaDB]
[Oracle 19 ODBC driver]
[ODBC Driver 17 for SQL Server]
root@zabbixsrv:/etc#
root@zabbixsrv:/etc# cat /etc/odbcinst.ini
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.2
UsageCount=1
In the /etc/odbc.ini:
[MSSQLSRV04]
Driver = ODBC Driver 17 for SQL Server
Server = 10.10.10.11\\\MSSQLSRV04,1433
root@zabbixsrv:/etc#
root@zabbixsrv:/etc# isql -v MSSQLSRV04 'zbx_monitor' 'zbx_monitor'
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> quit
root@zabbixsrv:/etc#
Up to this point, I think everything is fine.
On the Zabbix frontend, I added a new host with the "Template DB MSSQL by ODBC" template.
The IP address of the interface is the IP address of the MSSQL server.
I set these two macros:
{$ MSSQL.USER}
{$ MSSQL.PASSWORD}
But unfortunately the measurements don't work, only this one MSSQL measurement works:
MSSQL: Service's TCP port state: Up (1)
I even tried to add this macro, but no change:
{$ MSSQL.DSN} 10.10.10.11\\\MSSQLSRV04,1433
Do you have any idea what could be wrong?

Based on this I tried:
I ran these on the Zabbix server:
root@zabbixsrv:/etc# curl https://packages.microsoft.com/config/rhel/8/prod.repo > /etc/yum.repos.d/mssql-release.repo
root@zabbixsrv:/etc# yum remove unixODBC-utf16 unixODBC-utf16-devel #to avoid conflicts
root@zabbixsrv:/etc# ACCEPT_EULA=Y yum install -y msodbcsql17
root@zabbixsrv:~# odbcinst -j
unixODBC 2.3.7
DRIVERS............: /etc/odbcinst.ini
SYSTEM DATA SOURCES: /etc/odbc.ini
FILE DATA SOURCES..: /etc/ODBCDataSources
USER DATA SOURCES..: /root/.odbc.ini
SQLULEN Size.......: 8
SQLLEN Size........: 8
SQLSETPOSIROW Size.: 8
root@zabbixsrv:~#
root@zabbixsrv:/etc# odbcinst -q -d -n
[PostgreSQL]
[MySQL]
[FreeTDS]
[MariaDB]
[Oracle 19 ODBC driver]
[ODBC Driver 17 for SQL Server]
root@zabbixsrv:/etc#
root@zabbixsrv:/etc# cat /etc/odbcinst.ini
[ODBC Driver 17 for SQL Server]
Description=Microsoft ODBC Driver 17 for SQL Server
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.8.so.1.2
UsageCount=1
In the /etc/odbc.ini:
[MSSQLSRV04]
Driver = ODBC Driver 17 for SQL Server
Server = 10.10.10.11\\\MSSQLSRV04,1433
root@zabbixsrv:/etc#
root@zabbixsrv:/etc# isql -v MSSQLSRV04 'zbx_monitor' 'zbx_monitor'
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> quit
root@zabbixsrv:/etc#
Up to this point, I think everything is fine.
On the Zabbix frontend, I added a new host with the "Template DB MSSQL by ODBC" template.
The IP address of the interface is the IP address of the MSSQL server.
I set these two macros:
{$ MSSQL.USER}
{$ MSSQL.PASSWORD}
But unfortunately the measurements don't work, only this one MSSQL measurement works:
MSSQL: Service's TCP port state: Up (1)
I even tried to add this macro, but no change:
{$ MSSQL.DSN} 10.10.10.11\\\MSSQLSRV04,1433
Do you have any idea what could be wrong?

Comment