Uploaded image for project: 'AMQ Broker'
  1. AMQ Broker
  2. ENTMQBR-3695

Prometheus metrics plugin is loaded but causes NPE

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: AMQ 7.7.0.GA
    • Fix Version/s: AMQ 7.8.0.CR1
    • Component/s: None
    • Target Release:
    • Upstream Jira:
      ARTEMIS-2833
    • Verified:
      Verified in a release

      Description

      We think we've found a regression with the Broker 7.7 release after running the AMQ Online test suite on the final broker image. It appears that prometheus is unable to scrape broker metrics. The broker logs show the following error:

       

      java.lang.NullPointerException: null
              at 
      org.apache.activemq.artemis.core.server.metrics.plugins.ArtemisPrometheusMetricsPluginServlet.doGet(ArtemisPrometheusMetricsPluginServlet.java:49)

       

      This NPE is fixed by https://github.com/rh-messaging/artemis-prometheus-metrics-plugin/pull/2  - however it does not fix the underlying problem of metrics plugin not working.

       

      I've been able to reproduce this with the broker 7.7 distribution outside of OpenShift and following the documention at https://access.redhat.com/documentation/en-us/red_hat_amq/7.7/html/managing_amq_broker/prometheus-plugin-managing for configuring the plugin.

       

      I've attached broker.xml and the broker.log. I've noticed that the broker seems to be able to load the plugin at startup:

       2020-06-30 11:58:56,528 INFO  [org.apache.activemq.artemis.core.server] AMQ221082: Initializing metrics plugin org.apache.activemq.artemis.core.server.metrics.plugins.ArtemisPrometheusMetric
      sPlugin with properties: {} 

       

      The exception is printed when I'm trying to access localhost:8161/metrics.

       

      broker.xml

      broker.log

       

        Attachments

        1. broker.log
          11 kB
        2. broker.xml
          11 kB

          Issue Links

            Activity

              People

              Assignee:
              dbruscin Domenico Francesco Bruscino
              Reporter:
              ulf.lilleengen Ulf Lilleengen
              Tester:
              Oleg Sushchenko Oleg Sushchenko
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: