Steps to ensure correct operation of templates that collect metrics via ODBC monitoring:
1. Make sure that required ODBC driver is installed on Zabbix server or proxy.
2. Link the template to a target host (if the template is not available in your Zabbix installation, you may need to import the template's .xml file first - see Templates out-of-the-box section for instructions).
3. Adjust the values of mandatory macros as needed.
4. Configure the instance being monitored to allow sharing data with Zabbix - see instructions in the Additional steps/comments column.
| Template | Mandatory macros | Additional steps/comments |
|---|---|---|
| Template DB MSSQL by ODBC | {MSSQL.DSN} - the system data source name (default: <Put your DSN here>) {$MSSQL.PORT} - the TCP port of Microsoft SQL Server (default: 1433) {MSSQL.USER}, {MSSQL.PASSWORD} - Microsoft SQL login credentials (default: not set) | Create a Microsoft SQL user for monitoring and grant the user the following permissions: View Server State; View Any Definition (see Microsoft SQL documentation for details). The “Service's TCP port state” item uses {HOST.CONN} and {$MSSQL.PORT} macros to check the availability of the Microsoft SQL instance. |
| Template DB MySQL by ODBC | {MYSQL.DSN} - the system data source name (default: <Put your DSN here>) {MYSQL.USER}, {MYSQL.PASSWORD} - MySQL login credentials; password can be blank (default: not set) | To grant required privileges to MySQL user that will be used for monitoring, run: GRANT USAGE,REPLICATION CLIENT,PROCESS,SHOW DATABASES,SHOW VIEW ON *.* TO '<username>'@'%'; See MYSQL documentation for details. |