Good news indeed, thank you. Do you know the time of the next Decanter release?
One more question: are there any constraints regarding supported bean names? I'm asking because we publish some additional metrics with quite exotic names and would like to scrap them as well, for example: *metrics:name=vertxEventbusHandlers_address_/delayer* We can adjust bean names but it would be nice to know what are the allowed name patterns. Regards wt., 17 sty 2023 o 14:15 Jean-Baptiste Onofré <[email protected]> napisał(a): > Hi Daniel, > > it looks like a bug with the names containing "-". Let me try to > reproduce and I will create a Jira. > > The good news is that I'm preparing a new Decanter release with a lot > of updates and fixes. I will include this fix. > > Sorry for the inconvenience. > > Regards > JB > > On Tue, Jan 17, 2023 at 7:52 AM Daniel Las <[email protected]> wrote: > > > > Hi, > > > > I'm trying to use Decanter 2.9.0 JMX Collector with Prometheus Appender > to monitor our applications. I have configured beans to be monitored as: > > > > object.name.system=java.lang:* > > > > but some metrics are not available. There are some messages logged in > DEBUG level like: > > > > 2023-01-17T06:48:03,607 | DEBUG | Karaf_Worker-10 | BeanHarvester > | 72 - org.apache.karaf.decanter.collector.jmx - 2.9.0 | > Could not read attribute java.lang:type=MemoryPool,name=G1 Survivor Space > UsageThresholdCount > > > > Is it a known issue or there is some workaround to have such JMX beans > metrics available? > > > > I also tried to monitor Kafka consumer metrics: > > > > object.name.kafkaConsumer=kafka.consumer:* > > > > but such configuration causes following errors to appear in the logs: > > > > 2023-01-17T06:50:46,143 | WARN | EventAdminThread #9 | eventadmin > | 2 - org.apache.karaf.services.eventadmin - 4.2.11 | > EventAdmin: Exception during event dispatch [org.osgi.service.event.Event > [topic=decanter/collect/jmx/jmx-local/kafka/consumer] > {hostName=empirica-algo-engine-hft.empirica-crypto, records-lag=0.0, > felix.fileinstall.filename=file:/opt/algo-engine-hft-4.2.11.4-SNAPSHOT/etc/org.apache.karaf.decanter.collector.jmx-local.cfg, > type=jmx-local, service.factoryPid=org.apache.karaf.decanter.collector.jmx, > decanter.collector.name=jmx, records-lead-min=5133554.0, > records-lead-avg=5135042.1, scheduler.period=60, records-lead=5136728.0, > scheduler.concurrent=false, component.id=3, karafName=root, host=null, > scheduler.name=decanter-collector-jmx, object.name.system=java.lang:*, > timestamp=1673938246142, > component.name=org.apache.karaf.decanter.collector.jmx, > records-lag-avg=0.12, url=local, > ObjectName=kafka.consumer:type=consumer-fetch-manager-metrics,client-id=consumer-ORDER-TO-TRADE-MEASURES-4,topic=MARKET_DATA_ENRICHED,partition=1, > service.pid=org.apache.karaf.decanter.collector.jmx.044ca602-2290-4868-a6aa-b77131155312, > object.name.kafkaConsumer=kafka.consumer:*, records-lag-max=2.0, > preferred-read-replica=-1, hostAddress=172.22.0.13} | > [org.osgi.service.event.EventHandler] | > Bundle(org.apache.karaf.decanter.appender.prometheus [71])] > > java.lang.IllegalArgumentException: Invalid metric name: > preferred-read-replica > > at io.prometheus.client.Collector.checkMetricName(Collector.java:351) > ~[?:?] > > at io.prometheus.client.SimpleCollector.<init>(SimpleCollector.java:169) > ~[?:?] > > at io.prometheus.client.Gauge.<init>(Gauge.java:69) ~[?:?] > > at io.prometheus.client.Gauge$Builder.create(Gauge.java:75) ~[?:?] > > at io.prometheus.client.Gauge$Builder.create(Gauge.java:72) ~[?:?] > > at > io.prometheus.client.SimpleCollector$Builder.register(SimpleCollector.java:260) > ~[?:?] > > at > io.prometheus.client.SimpleCollector$Builder.register(SimpleCollector.java:253) > ~[?:?] > > at > org.apache.karaf.decanter.appender.prometheus.PrometheusServlet.handleEvent(PrometheusServlet.java:92) > ~[?:?] > > at > org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:431) > [!/:?] > > at > org.apache.felix.eventadmin.impl.tasks.HandlerTask.run(HandlerTask.java:70) > [!/:?] > > at > java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) > [?:1.8.0_322] > > at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_322] > > at > java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) > [?:1.8.0_322] > > at > java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) > [?:1.8.0_322] > > at java.lang.Thread.run(Thread.java:750) [?:1.8.0_322] > > > > Best regards > > -- > > Daniel Łaś > -- Daniel Łaś
