Sign inSign up

rafaelbaumann/zabbix-proxy-odbc

By rafaelbaumann

•Updated 8 months ago

Zabbix images with ODBC installed.

Image
Monitoring & observability
0

669

rafaelbaumann/zabbix-proxy-odbc repository overview

⁠🐳 Zabbix Proxy with Oracle and MSSQL ODBC

Custom Zabbix Proxy image based onzabbix/zabbix-proxy-sqlite3:ol-7.0-latest⁠, extended to support ODBC connections with Oracle and Microsoft SQL Server by default.

⭐Docker Stars 🐳Docker Pulls šŸ“¦Docker Image Size


ā šŸ“¦ What's included

  • āœ… Oracle Instant Client 19.28 (Basic + ODBC)
  • āœ… Microsoft ODBC Drivers:
    • ODBC Driver 13 for SQL Server
    • ODBC Driver 17 for SQL Server
    • ODBC Driver 18 for SQL Server
  • āœ… Pre-configured /etc/odbcinst.ini file with Oracle and MSSQL drivers.

ā āš™ļø Environment Variables

The image pre-defines:

LD_LIBRARY_PATH=/usr/lib/oracle/19.28/client64/lib
ORACLE_HOME=/usr/lib/oracle/19.28/client64

ā šŸ“‚ Configuration files

  • /etc/odbcinst.ini → ODBC driver definitions (Oracle and MSSQL)
  • /etc/odbc.ini → (optional) add your custom DSNs by mounting a volume or copying during build

⁠odbc.ini Example (to be mounted in the container):
[MyMSSQL]
Driver=ODBC Driver 18 for SQL Server
Server=myserver.database.windows.net
Database=mydb

[MyOracle]
Driver=Oracle19ODBC
ServerName=//oraclehost:1521/ORCLCDB.localdomain

ā šŸš€ How to use

Running Zabbix Proxy with ODBC support using Docker Run:

docker run -d \
  --name zbx-proxy-odbc \
  -e ZBX_SERVER_HOST="zabbix-server" \
  -e ZBX_HOSTNAME="zbx-proxy-odbc" \
  -v /etc/localtime:/etc/localtime:ro \
  -v /etc/odbc.ini:/etc/odbc.ini:ro \
  rafaelbaumann/zabbix-proxy-odbc:latest

Running Zabbix Proxy with ODBC support using compose.yaml:

version: '3'
services:
   zabbix_proxy:
      container_name: zabbix_proxy
      image: rafaelbaumann/zabbix-proxy-odbc
      restart: always
      ports:
        - '10051:10051'
      environment:
        - ZBX_SERVER_HOST=xxx.xxx.xxx.xxx 	 #Change according to Zabbix Server IP
        - ZBX_SERVER_PORT=10051
        - ZBX_HOSTNAME=zabbix-proxy 		 #Change according to Proxy Name
        - ZBX_STATSALLOWEDIP=xxx.xxx.xxx.xxx     #Change according to Zabbix Server IP
      volumes:
        - ./odbc.ini:/etc/odbc.ini:ro

ā šŸ”— Testing the ODBC connection

Enter the container:

docker exec -it zbx-proxy-odbc bash

Test the connection:

isql -v MyMSSQL myuser mypassword
isql -v MyOracle myuser mypassword

If the connection is successful, you will see a SQL prompt.


ā šŸ“ Notes

  • The image is based on Oracle Linux 9 (compatible with Oracle and Microsoft packages).
  • Oracle and MSSQL ODBC drivers are ready; just configure your DSN in odbc.ini.
  • Recommended to use official Zabbix templates "MSSQL by ODBC" or "Oracle by ODBC" for monitoring.
  • There is a version under testing [TAG:mypssql] that adds support for MySQL and Postgres.

✦ Built to facilitate the use of ODBC in Zabbix Proxy šŸš€

Tag summary

Content type

Image

Digest

sha256:1b42be5a7…

Size

156.6 MB

Last updated

8 months ago

docker pull rafaelbaumann/zabbix-proxy-odbc