JMX explorer - JDBC connection pools library

292 views
Skip to first unread message

panh...@gmail.com

unread,
Nov 16, 2017, 10:20:08 PM11/16/17
to Prometheus Users
Hi
I have an application using JDBC connection pool library www.mchange.com/projects/c3p0/

This library expose metric via JMX. Currently, jmx_explorer got this without any rule

# HELP com_mchange_v2_c3p0_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_1deb010a_logintimeout null (com.mchange.v2.c3p0<type=PooledDataSource[1bqq1hg9r1jg9ztp1vpvod0|1deb010a]><>loginTimeout)
# TYPE com_mchange_v2_c3p0_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_1deb010a_logintimeout untyped
com_mchange_v2_c3p0_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_1deb010a_logintimeout 0.0

Once rule added:

- pattern: 'com.mchange.v2.c3p0<type=PooledDataSource\[(\w+)\|(\w+)\]><>(\w+)'
  name: mchange_pooleddatasource_$1_$2_$3
  help: mchange pooleddatasource $1_$2_$3
  type: COUNTER

I got this 

# HELP mchange_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_1d06f631_logintimeout mchange pooleddatasource 1bqq1hg9r1jg9ztp1vpvod0_1d06f631_loginTimeout
# TYPE mchange_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_1d06f631_logintimeout counter
mchange_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_1d06f631_logintimeout 0.0

# HELP mchange_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_38cd4b86_logintimeout mchange pooleddatasource 1bqq1hg9r1jg9ztp1vpvod0_38cd4b86_loginTimeout
# TYPE mchange_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_38cd4b86_logintimeout counter
mchange_pooleddatasource_1bqq1hg9r1jg9ztp1vpvod0_38cd4b86_logintimeout 0.0

These values is not meaningful and change (I think) when application restart. Is there a way to rename it to something meaningful?
    1bqq1hg9r1jg9ztp1vpvod0 
    1d06f631
    38cd4b86


Anyone try to enable JMX metric for JDBC 3 connection pool libary mchange ? any example ?

Brian Brazil

unread,
Nov 17, 2017, 4:10:23 AM11/17/17
to panh...@gmail.com, Prometheus Users
That's a question for the JBDC library you're using, the JMX exporter can only work with what it is given.

Brian
 
    1bqq1hg9r1jg9ztp1vpvod0 
    1d06f631
    38cd4b86


Anyone try to enable JMX metric for JDBC 3 connection pool libary mchange ? any example ?

--
You received this message because you are subscribed to the Google Groups "Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/72a7fafe-7591-4803-a501-69a39eb4ff1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
Reply all
Reply to author
Forward
0 new messages