Ad Widget

Collapse

Monitoring C3p0 via JMX using zabbix 2.4.6 with "[", "|" and "]" in objectName

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lserranov
    Junior Member
    • Apr 2016
    • 7

    #1

    Monitoring C3p0 via JMX using zabbix 2.4.6 with "[", "|" and "]" in objectName

    Hello,

    I'm trying to Monitoring C3p0 via JMX using zabbix 2.4.6.

    The problem is that the objectName that I'm trying to monitor has characters like "[", "|" and "]", as example, my object name looks like this:

    com.mchange.v2.c3p0:type=PooledDataSource[30y2o49f1tyrsoo1yis3do|22271ddb]

    The issue here is that if in zabbix in a template I configure below in the "Key" field of a template "item", which is meant to monitor numIdleConnections, zabbix will set status for my "item" as "Not supported" :

    jmx["com.mchange.v2.c3p0:type=PooledDataSource[30y2o49f1tyrsoo1yis3do|68967f33]",numIdleConnections]


    Can somebody please help me with an example of proper sintax to be used in the "Key" field when defining an "item" in a template so that I can get counters like numIdleConnections from c3p0 via JMX?

    Note1: I tried escaping one or all of "[" "]" and "|" but no luck.
    Note2: I'm in C3p0 version 0.9.1.1 which returns those funny [ | ]. Is there anything to be done other than upgrading version?

    Thanks
    Luis
  • lserranov
    Junior Member
    • Apr 2016
    • 7

    #2
    same issue with last version of Cp30

    Installed latest version of Cp30. Same problem

    Comment

    • matt.dresden@gm.com
      Junior Member
      • Jun 2016
      • 2

      #3
      Your domain and bean values are probably wrong

      I found the correct way to enter the value using jmxterm like this:

      java -jar jmxterm-1.0-alpha-4-uber.jar --noninteract --url 192.168.1.1:28082 -i <inputfile> | grep com.mchange.v2.c3p0

      the input file had a command like this:

      beans

      The output of that:
      com.mchange.v2.c3p0:identityToken=1bqov4c9hahtmgt1 dbuz5n|388ffbc2,name=1bqov4c9hahtmgt1dbuz5n|388ffb c2,type=PooledDataSource",numConnections

      I was able to cut and past into zabbix

      for something like this that worked with the special chars

      jmx["com.mchange.v2.c3p0:identityToken=1bqov4c9hahtmgt 1dbuz5n|388ffbc2,name=1bqov4c9hahtmgt1dbuz5n|388ff bc2,type=PooledDataSource",numConnections]

      This was test in 2.4

      Comment

      Working...