After a few struggles I got odbc running with MySQL on the Zabbix server (Zabbix 5.0.23).
isql connects fine & I can run a query from the command line, so I believe the configuration is all OK on that level:
# isql -v ZTMySQL
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select count(1) from thresholds;
+---------------------+
| count(1) |
+---------------------+
| 1 |
+---------------------+
SQLRowCount returns 1
1 rows fetched
SQL>
On Zabbix, I've set up an item of type "Database monitor" using the odbc connection as above, but it doesn't give any error in the GUI or in the zabbix server log file, and just returns an empty value. I don't think it even runs a query as when I deliberately put errors in the sql it doesn't give an error either.
Zabbix-side config:
Result when I test it:
Would appreciate any recommendations, any other ways of testing the Zabbix access (for example I searched for some command-line equivalent of the test but haven't been able to find it).
Thanks!
isql connects fine & I can run a query from the command line, so I believe the configuration is all OK on that level:
# isql -v ZTMySQL
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> select count(1) from thresholds;
+---------------------+
| count(1) |
+---------------------+
| 1 |
+---------------------+
SQLRowCount returns 1
1 rows fetched
SQL>
On Zabbix, I've set up an item of type "Database monitor" using the odbc connection as above, but it doesn't give any error in the GUI or in the zabbix server log file, and just returns an empty value. I don't think it even runs a query as when I deliberately put errors in the sql it doesn't give an error either.
Zabbix-side config:
Result when I test it:
Would appreciate any recommendations, any other ways of testing the Zabbix access (for example I searched for some command-line equivalent of the test but haven't been able to find it).
Thanks!