Metricbeat jolokia problem using wildcard


(Gabriel Belingueres) #1

Hi:
I configured jolokia to get metrics on a Tomcat 7 ThreadPool.
The configuration included the wildcard (*) to avoid to specify the pool name (which changes from Tomcat 7 to Tomcat 8) this way:

  • module: jolokia
    metricsets: ["jmx"]
    period: 10s
    hosts: ["localhost:8080"]
    namespace: "metrics"
    path: "/jolokia/?ignoreErrors=true&canonicalNaming=false"
    jmx.mapping:
    jmx.application:
    jmx.instance:

    jmx.mappings:

    • mbean: 'Catalina:name=*,type=ThreadPool'
      attributes:
      • attr: maxConnections
        field: max_connections
      • attr: currentThreadsBusy
        field: current_threads_busy
      • attr: maxThreads
        field: max_threads
      • attr: currentThreadCount
        field: current_thread_count
      • attr: connectionCount
        field: connection_count

jolokia webapp actually returns all the ThreadPool instances (in my case only one named "http-bio-8080") however metricbeat does not send the metrics to Logstash but rather a field with:

error.message: "1 error: metric key '' not found in response"

As suggested in a github issue, I changed the wildcard for the ACTUAL name returned by jolokia and it worked fine.

However I just wanted to know if can be improved such behavior to allow the wildcard to work when only one mbean is found (many results returned would seem like you need to refine the actual metric to get).

Thanks in advance,
Gabriel


(ruflin) #2

I think this is a valid request. I even wonder what we should do if we have multiple returns for the name? As you describe it works with the webapp, I assume the jolokia API should also support such requests.

Could you open a feature request on Github for this?


(system) #3

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.