enable_extra_prometheus_metric参数修改生效问题。

ocp:4.2.2

这里没有值,需要把enable_extra_prometheus_metric设置为true。

修改enable_extra_prometheus_metric值:

image

貌似没有生效,查询数据库确实没有生效:

mysql> select * from proxy_config where name='enable_extra_prometheus_metric';
+------+------+-------+-------------+--------------+--------------------------------+-------+------+-------+-------------+---------------+--------------+
| vid  | vip  | vport | tenant_name | cluster_name | name                           | value | info | range | need_reboot | visible_level | config_level |
+------+------+-------+-------------+--------------+--------------------------------+-------+------+-------+-------------+---------------+--------------+
| -1   |      | 0     |             |              | enable_extra_prometheus_metric | False |      |       |             |               | LEVEL_GLOBAL |
+------+------+-------+-------------+--------------+--------------------------------+-------+------+-------+-------------+---------------+--------------+
1 row in set (0.00 sec)

1 个赞

我试了下,我这没问题,修改完就有数据了。
你看看你修改历史那有记录吗?

修改的时候下面有个提交,你点了吗?

1 个赞

应该是压根没有一次修改成功,所以不会有历史记录

自己摆乌龙,不好意思。

admin@ubuntu:~/obproxy/log$ grep -i extra_prometheus *.log
obproxy.log:[2024-06-20 09:28:24.826858] INFO  [PROXY] print (ob_proxy_config.cpp:46) [20570][Y0-00007F951F2E7FF0] [lt=0] [dc=0] | enable_extra_prometheus_metric       = True
obproxy.log:[2024-06-20 09:28:24.828436] INFO  [PROXY.ICMD] handle_set_config (ob_alter_config_handler.cpp:204) [20570][Y0-00007F951F2E7FF0] [lt=0] [dc=0] succ to update config(key_string=enable_extra_prometheus_metric)
obproxy.log:[2024-06-20 09:29:24.521450] INFO  [PROXY] print (ob_proxy_config.cpp:46) [20571][Y0-00007F951EAE7FF0] [lt=0] [dc=0] | enable_extra_prometheus_metric       = True
obproxy.log:[2024-06-20 09:29:24.522964] INFO  [PROXY.ICMD] handle_set_config (ob_alter_config_handler.cpp:204) [20571][Y0-00007F951EAE7FF0] [lt=0] [dc=0] succ to update config(key_string=enable_extra_prometheus_metric)