-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Open
Description
For years the organization I work for used Apache ActiveMQ Artemis versions combined with an older version or JMX Exporter: 0.17.0. Worked like a charm, except a little bug we'd like to resolve. Since 0.17.0 is dated over 3 years back the first thing I tried was upgrading to the latest version: 1.5.0. This doesn't work directly. When performing a curl http://localhost:9404/metrics the following error occurs:
An Exception occurred while scraping metrics: java.lang.IllegalArgumentException: -1.0: counters cannot have a negative value
at io.prometheus.metrics.model.snapshots.CounterSnapshot$CounterDataPointSnapshot.validate(CounterSnapshot.java:78)
at io.prometheus.metrics.model.snapshots.CounterSnapshot$CounterDataPointSnapshot.<init>(CounterSnapshot.java:64)
at io.prometheus.metrics.model.snapshots.CounterSnapshot$CounterDataPointSnapshot$Builder.build(CounterSnapshot.java:115)
at io.prometheus.jmx.MatchedRuleToMetricSnapshotsConverter.convertRulesWithSameName(MatchedRuleToMetricSnapshotsConverter.java:106)
at io.prometheus.jmx.MatchedRuleToMetricSnapshotsConverter.convert(MatchedRuleToMetricSnapshotsConverter.java:79)
at io.prometheus.jmx.JmxCollector.collect(JmxCollector.java:795)
at io.prometheus.metrics.model.registry.MultiCollector.collect(MultiCollector.java:21)
at io.prometheus.metrics.model.registry.PrometheusRegistry.scrape(PrometheusRegistry.java:84)
at io.prometheus.metrics.exporter.common.PrometheusScrapeHandler.scrape(PrometheusScrapeHandler.java:135)
at io.prometheus.metrics.exporter.common.PrometheusScrapeHandler.handleRequest(PrometheusScrapeHandler.java:56)
at io.prometheus.metrics.exporter.httpserver.MetricsHandler.handle(MetricsHandler.java:33)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at jdk.httpserver/sun.net.httpserver.AuthFilter.doFilter(Unknown Source)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange$LinkHandler.handle(Unknown Source)
at jdk.httpserver/com.sun.net.httpserver.Filter$Chain.doFilter(Unknown Source)
at jdk.httpserver/sun.net.httpserver.ServerImpl$Exchange.run(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
The same error also on version 1.1.0 and 1.0.1. Version 0.20.0 seems to be the latest version that work well.