helm-zabbix
helm-zabbix copied to clipboard
[zabbix-community/zabbix] Support ODBC for Database Monitoring
Is your feature request related to a problem? Please describe. Zabbix supports database monitoring via ODBC, but the current Helm chart does not seem to provide an easy way to configure ODBC settings for Zabbix Server and Zabbix Proxy. This makes it difficult to monitor databases like MySQL, PostgreSQL, or MSSQL using Zabbix in a Kubernetes environment.
Describe the solution you'd like The Helm chart should support configuring ODBC drivers and DSN settings through values.yaml, allowing users to enable and manage database monitoring without manual intervention inside the container. Specifically, this could involve:
- Allowing users to specify required ODBC drivers (unixODBC, freetds, etc.)
- Providing a way to mount DSN configuration files
- Adding necessary environment variables and configuration options for Zabbix to use ODBC
Describe alternatives you've considered
- Manually modifying the Zabbix container within the Helm deployment, which is not maintainable.
- Using external scripts to configure ODBC post-deployment, but this adds complexity.
Additional context This feature would enhance Zabbix’s monitoring capabilities in Kubernetes environments and align the Helm chart with the full range of Zabbix’s built-in monitoring features. Relevant documentation:
Hello @veshant!
Excellent issue. Thank you very much for creating and raising this need.
Unfortunately, I do not have the knowledge or a suitable test environment to test one or more ODBC monitoring (even reading the doc, there are N scenarios to configure according to the many types of databases supported).
Feel free to open the various PRs needed to implement this.
If you do not have the knowledge or time to implement this, we will be waiting for someone who does have the knowledge and time to do it.
I wish you a good week.
I believe, this is more an issue to be handled by Zabbix themselves, as they provide the official Zabbix Server / Zabbix Proxy images that this helm chart uses.
Nevertheless, it should be no problem to get a good setup with ODBC monitoring running using this helm chart:
- at least the ubuntu-based images come with unixodbc package installed
- both config files
/etc/odbc.iniand/etc/odbcinst.iniare there, but empty
What is NOT included in the official images are the drivers for Unixodbc to connect to the databases you may require. Depending on which databases these are, those could be added by using additional Ubuntu packages, or by downloading them directly from the web sites of the database management system vendors, i.e. Postgresql. When wanting to use additional (Ubuntu) packages, you would have to build your own image. Another option would be to create a simple init container downloading and installing those drivers you desire and share them with the actual server container using an emptydir volume. Everything needed for this is prepared in values.yaml: you can add zabbixServer.extraInitContainers, zabbixServer.extraVolumes and zabbixServer.extraVolumeMounts in the values.yaml as you need.
Config files /etc/odbc.ini and /etc/odbcinst.ini are actually not needed to be created anymore, as you can refer to the path of the driver file and other settings directly in the db.odbc.get item configuration using Zabbix UI.
Beside of all that, please consider using Zabbix Agent2 for database monitoring in case you want to monitor either Postgresql, MySQL or MSSQL, as this is being considered as the "more modern way to do it" from Zabbix side. Zabbix Agent2 offers capabilities to monitor those databases using Agent 2 plugins provided by Zabbix, with an almost equal or even better range of functionality than the "old" ODBC based database monitoring.