-THIS HAS BEEN SOLVED - SEE MY LAST UPDATE FOR WHAT WAS THE RESOLUTION.-
Hey,
I already monitor MS SQL and PostgreSQL with success, wanted to add MySQL.
My environmet looks like this:
UBUNTU: Linux version 4.15.0-48-generic (buildd@lgw01-amd64-036) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019
ZABBIX: 4.0.7
MySQL: mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using EditLine wrapper
MySQL ODBC: mysql-connector-odbc-8.0.16-linux-ubuntu18.04-x86-64bit
My odbc.ini looks like this:
[ZABBIXDB]
Description = ZABBIX database
Driver = mysql
Server = 127.0.0.1
User = zabbix
Password = ********
Port = 3306
Database = zabbix
My odbcinst.ini looks like this:
[mysql]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8S.so
UsageCount=1
I try to run queries agains ZABBIX database itself, isql works correctly:
root@objplzab0:/home/pjarosz_admin/mysql-connector-odbc-8.0.16-linux-ubuntu18.04-x86-64bit/bin# isql ZABBIXDB
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT count(*) FROM items i, hosts h WHERE i.hostid=h.hostid AND h.name='SERVER1' AND i.state=1;
+---------------------+
| count(*) |
+---------------------+
| 10 |
+---------------------+
However in ZABBIX in latest data I get sometihng like this:
I think I did it the same way I was doing other DB monitoring, where do I make mistake?
Appreciate your help,
Pawel J.
Hey,
I already monitor MS SQL and PostgreSQL with success, wanted to add MySQL.
My environmet looks like this:
UBUNTU: Linux version 4.15.0-48-generic (buildd@lgw01-amd64-036) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #51-Ubuntu SMP Wed Apr 3 08:28:49 UTC 2019
ZABBIX: 4.0.7
MySQL: mysql Ver 14.14 Distrib 5.7.26, for Linux (x86_64) using EditLine wrapper
MySQL ODBC: mysql-connector-odbc-8.0.16-linux-ubuntu18.04-x86-64bit
My odbc.ini looks like this:
[ZABBIXDB]
Description = ZABBIX database
Driver = mysql
Server = 127.0.0.1
User = zabbix
Password = ********
Port = 3306
Database = zabbix
My odbcinst.ini looks like this:
[mysql]
Driver=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8w.so
Setup=/usr/lib/x86_64-linux-gnu/odbc/libmyodbc8S.so
UsageCount=1
I try to run queries agains ZABBIX database itself, isql works correctly:
root@objplzab0:/home/pjarosz_admin/mysql-connector-odbc-8.0.16-linux-ubuntu18.04-x86-64bit/bin# isql ZABBIXDB
+---------------------------------------+
| Connected! |
| |
| sql-statement |
| help [tablename] |
| quit |
| |
+---------------------------------------+
SQL> SELECT count(*) FROM items i, hosts h WHERE i.hostid=h.hostid AND h.name='SERVER1' AND i.state=1;
+---------------------+
| count(*) |
+---------------------+
| 10 |
+---------------------+
However in ZABBIX in latest data I get sometihng like this:
| 019-06-18 08:09:22 | en_US.UTF-8 |
| 2019-06-18 08:08:52 | en_US.UTF-8 |
| 2019-06-18 08:08:22 | ??*? V |
| 2019-06-18 08:07:52 | en_US.UTF-8 |
| 2019-06-18 08:07:26 | ??W??~ |
Appreciate your help,
Pawel J.
Comment