zabbix7使用最新版OceanBase

1731058838601
zabbix7使用的最新版OceanBase4.3.3,但是却提示错误检测到数据库版本是MySQL 5.07.28,这个有啥办法改吗

使用obproxy 连接 OB ,然后修改 obproxy的 变量 mysql_version 欺骗一下 zabbix

[root@server065 mq]# obclient -h10.0.0.65 -uroot@sys#obdemo -P2883 -paaAA11__ -c -A test
Welcome to the OceanBase.  Commands end with ; or \g.
Your OceanBase connection id is 530357
Server version: OceanBase 4.3.3.0 (r100000412024101200-0701a8319ff6499651ba0f95520709081c751b20) (Built Oct 12 2024 01:29:48)

Copyright (c) 2000, 2018, OceanBase and/or its affiliates. All rights reserved.

Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.

(root@10.0.0.65:2883) [test]> show proxyconfig like '%version%';
+------------------------------+----------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------+---------------+-------+--------------+
| name                         | value                            | info                                                                                                                     | need_reboot | visible_level | range | config_level |
+------------------------------+----------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------+---------------+-------+--------------+
| client_session_id_version    | 2                                | client session id version                                                                                                | false       | SYS           | [1,2] | LEVEL_GLOBAL |
| mysql_version                | 5.6.25                           | returned version for mysql mode, default value is 5.6.25. If set, proxy will send new version when user connect to proxy | false       | USER          |       | LEVEL_VIP    |
| local_vip_tenant_version     | 0                                | local vip tenant version                                                                                                 | false       | MEMORY        | [0,]  | LEVEL_GLOBAL |
| current_local_config_version | 0                                | local config version for current app                                                                                     | false       | SYS           | [0,]  | LEVEL_GLOBAL |
| json_config_version          | 5e0bad8c9b9d5098d3134aac83e5056a | json config info version                                                                                                 | false       | virtual       | NULL  | NULL         |
+------------------------------+----------------------------------+--------------------------------------------------------------------------------------------------------------------------+-------------+---------------+-------+--------------+
5 rows in set (0.002 sec)

(root@10.0.0.65:2883) [test]> alter proxyconfig set mysql_version='5.07.28';
Query OK, 0 rows affected (0.014 sec)

(root@10.0.0.65:2883) [test]> show proxyconfig like '%mysql_version%';
+---------------+---------+--------------------------------------------------------------------------------------------------------------------------+-------------+---------------+-------+--------------+
| name          | value   | info                                                                                                                     | need_reboot | visible_level | range | config_level |
+---------------+---------+--------------------------------------------------------------------------------------------------------------------------+-------------+---------------+-------+--------------+
| mysql_version | 5.07.28 | returned version for mysql mode, default value is 5.6.25. If set, proxy will send new version when user connect to proxy | false       | USER          |       | LEVEL_VIP    |
+---------------+---------+--------------------------------------------------------------------------------------------------------------------------+-------------+---------------+-------+--------------+
1 row in set (0.003 sec)

(root@10.0.0.65:2883) [test]> 
1 个赞

抱紧庆涛大腿

zabbix6版本开始就兼容OB了,我们生产zabbix老版本4.2(用的mysql,试过切换到OB几次),obproxy上mysql_version参数怎么改zabbix都报错
Cannot get the database version. Exiting .