Open ralf0131 opened 6 years ago
@wenshao Any progress on this issue?
Expose JdbcStatManager as MBean is a very useful feature. As long as implemented, one can easily use jmx-exporter to gather stats information from a cluster environment to prometheus.
这问题,还没结单。。。 我也有同样的需求
In order to get the druid stats [1] for monitoring, I found that it is impossible to get such data via JMX. My local application depends on druid 1.0.25, after bootstrapping my application and execute some query to database, I opened up JConsole and could not found any MBean represents com.alibaba.druid.stat.JdbcStatManager.
The only way I could found is to call com.alibaba.druid.stat.JdbcStatManager#getInstance() reflectively to get the reference, which seems not very elegant.
It will be very appreciated to expose com.alibaba.druid.stat.JdbcStatManager as MBean so that external program could access via JMX directly.
[1] https://github.com/alibaba/druid/wiki/StatFilter_Items