[ZBXNEXT-1961] Database monitor ODBC connections should be dynamic without involving odbc.ini Created: 2013 Oct 10 Updated: 2024 Apr 10 Resolved: 2020 Mar 24 |
|
Status: | Closed |
Project: | ZABBIX FEATURE REQUESTS |
Component/s: | Proxy (P), Server (S) |
Affects Version/s: | 2.0.9 |
Fix Version/s: | 5.0.0alpha4, 5.0 (plan) |
Type: | New Feature Request | Priority: | Major |
Reporter: | Lewis Thompson | Assignee: | Andrejs Tumilovics |
Resolution: | Fixed | Votes: | 17 |
Labels: | database, dsn, odbc, patch | ||
Remaining Estimate: | Not Specified | ||
Time Spent: | Not Specified | ||
Original Estimate: | Not Specified | ||
Environment: |
Ubuntu 12.04 |
Attachments: | change.diff odbc_dsn.diff zbx_export_hosts.xml | ||||||||
Issue Links: |
|
||||||||
Team: | Team C | ||||||||
Team: | Team C | ||||||||
Sprint: | Sprint 61 (Feb 2020), Sprint 62 (Mar 2020) | ||||||||
Story Points: | 1 |
Description |
Database monitor item types use ODBC as described in "ODBC monitoring" at https://www.zabbix.com/documentation/2.0/manual/config/items/itemtypes/odbc_checks Everything in the docs suggest that in order to query a database it must first be defined in the odbc.ini file (usually located in /etc/odbc.ini). This seems to go against the otherwise self-contained nature of Zabbix, particularly host auto discovery and LLD. My use case is:
The feature request is therefore that DSNs can be fully defined within Zabbix - e.g. hostname, database, username, password and connector (defined in odbcinst.ini). |
Comments |
Comment by Tatapoum [ 2015 Mar 11 ] |
I've created a patch for this purpose (see attachment). It allows to define the ODBC item in two ways : db.odbc.select[unique_description,data_source_name] 2) Using a connection string : db.odbc.select[unique_description,connection_string] Example :
db.odbc.select[odbc.test,"DRIVER={FreeTDS};SERVER=MYSERVER\MYINSTANCE;UID=user;PWD=password"]
The patch is rebased against the trunk. Could you please consider adding it to the next release ? |
Comment by Alexei Vladishev [ 2020 Feb 11 ] |
It will simplify configuration of ODBC monitoring for many users. I included it into Zabbix 5.0 roadmap. tatapoum, thanks for the patch! |
Comment by Andrejs Tumilovics [ 2020 Mar 18 ] |
Available in:
Documentation updated: |