Zabbix server uses MySQL database with Microsoft ODBC driver for SQL Server on Alpine docker images
5.4K
Zabbix server uses MySQL database with Microsoft ODBC driver for SQL Server on Alpine and Ubuntu docker images
DockerfileDockerfile.ubuntudocker exec _container_name_ odbcinst -q -d -n "ODBC Driver 18 for SQL Server"
Result:
[ODBC Driver 18 for SQL Server]
Description=Microsoft ODBC Driver 18 for SQL Server
Driver=/opt/microsoft/msodbcsql18/lib64/libmsodbcsql-18.3.so.1.1
UsageCount=1
[mssql-test]
Description = MS SQL test
Driver = ODBC Driver 18 for SQL Server
Server = tcp:192.168.100.100,1433
TrustServerCertificate = Yes
-v /path/our/odbc.ini:/etc/odbc.ini:ro
docker exec _container_name_ odbcinst -q -s -n
Result our DSN name:
[mssql-test]
and show our DSN mssql-test:
docker exec _container_name_ odbcinst -q -s -n mssql-test
Result will show the contents of our odbc.ini:
[mssql-test]
Description = MS SQL test
Driver = ODBC Driver 18 for SQL Server
Server = tcp:192.168.100.100,1433
docker exec _container_name_ isql mssql sqluser sqlpassword
Result:
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL>
Create login & grant permission for zabbix:
CREATE LOGIN zabbixlogin WITH PASSWORD='*Password*';
GRANT VIEW SERVER STATE TO zabbixlogin;
GRANT VIEW ANY DEFINITION TO zabbixlogin;
permission for the "Get job status" item :
USE [msdb]
CREATE USER zabbixlogin FOR LOGIN zabbixlogin
GRANT EXECUTE ON [dbo].agent_datetime TO [zabbixlogin]
ALTER ROLE db_datareader ADD MEMBER [zabbixlogin];
Content type
Image
Digest
sha256:c1ded6fc2…
Size
40.3 MB
Last updated
about 1 month ago
docker pull idscan/zabbix-server-mysql