[
https://issues.apache.org/jira/browse/JAMES-3841?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17639727#comment-17639727
]
ouvtam commented on JAMES-3841:
-------------------------------
Here some exemplary log metrics:
* broker metrics
* per-queue metrics (NEW)
* timer metric how long it took the fetch the metrics -> *._time (NEW)
{code:java}
23:06:06.266 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.consumerCount, value=40
23:06:06.266 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.dequeueCount, value=0
23:06:06.266 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.dispatchCount, value=10508
23:06:06.266 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.enqueueCount, value=1487
23:06:06.266 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.expiredCount, value=0
23:06:06.267 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.inflightCount, value=10508
23:06:06.268 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.lastUpdate, value=1669590365575
23:06:06.268 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.maxEnqueueTime, value=143.0
23:06:06.268 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.memoryLimit, value=1073741824
23:06:06.268 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.memoryPercentUsage, value=0
23:06:06.269 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.memoryUsage, value=0
23:06:06.269 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.messagesCached, value=0
23:06:06.269 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.minEnqueueTime, value=1.0
23:06:06.269 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.producerCount, value=3
23:06:06.269 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.size, value=0
23:06:06.269 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.storeLimit, value=16339816520
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.storePercentUsage, value=0
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.storeUsage, value=135762
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.tempLimit, value=16339804160
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.tempPercentUsage, value=0
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Broker.tempUsage, value=0
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.averageEnqueueTime, value=0.0
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.consumerCount, value=1
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.dequeueCount, value=0
23:06:06.270 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.dispatchCount, value=0
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.enqueueCount, value=0
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.expiredCount, value=0
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.inflightCount, value=0
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.lastUpdate, value=1669590365533
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.maxEnqueueTime, value=0.0
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.memoryLimit, value=1073741824
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.messagesCached, value=0
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.minEnqueueTime, value=0.0
23:06:06.271 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.producerCount, value=1
23:06:06.272 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.outgoing.size, value=0
23:06:06.272 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.averageEnqueueTime, value=0.0
23:06:06.272 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.consumerCount, value=1
23:06:06.272 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.dequeueCount, value=0
23:06:06.272 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.dispatchCount, value=0
23:06:06.273 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.enqueueCount, value=0
23:06:06.273 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.expiredCount, value=0
23:06:06.273 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.inflightCount, value=0
23:06:06.273 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.lastUpdate, value=1669590365609
23:06:06.273 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.maxEnqueueTime, value=0.0
23:06:06.273 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.memoryLimit, value=1073741824
23:06:06.273 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.messagesCached, value=0
23:06:06.274 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.minEnqueueTime, value=0.0
23:06:06.276 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.producerCount, value=1
23:06:06.276 [DEBUG] o.a.j.metrics - type=GAUGE,
name=ActiveMQ.Statistics.Destination.spool.size, value=0
23:06:06.340 [DEBUG] o.a.j.metrics - type=TIMER,
name=ActiveMQ.Statistics.Broker._time, count=66, min=30.539776, max=289.406975,
mean=51.27993406060606, stddev=31.783680823933842, p50=45.350911,
p75=56.623103, p95=74.448895, p98=88.604671, p99=289.406975, p999=289.406975,
m1_rate=0.20214070229262646, m5_rate=0.26901944823985086,
m15_rate=0.34018704297266894, mean_rate=0.20265404074535695,
rate_unit=events/second, duration_unit=milliseconds
23:06:06.341 [DEBUG] o.a.j.metrics - type=TIMER,
name=ActiveMQ.Statistics.Destination.outgoing._time, count=66, min=30.015488,
max=152.043519, mean=85.70023563636364, stddev=21.199560464617125,
p50=85.458943, p75=98.041855, p95=125.304831, p98=135.266303, p99=152.043519,
p999=152.043519, m1_rate=0.19920525480840734, m5_rate=0.199880531115036,
m15_rate=0.1999834281769723, mean_rate=0.2025653469800763,
rate_unit=events/second, duration_unit=milliseconds
23:06:06.343 [DEBUG] o.a.j.metrics - type=TIMER,
name=ActiveMQ.Statistics.Destination.spool._time, count=66, min=26.345472,
max=476.053503, mean=54.07315781818182, stddev=53.72771172053227,
p50=46.137343, p75=55.050239, p95=66.584575, p98=96.468991, p99=476.053503,
p999=476.053503, m1_rate=0.20177438323974942, m5_rate=0.26897689568049793,
m15_rate=0.3401813951357432, mean_rate=0.2026923933224768,
rate_unit=events/second, duration_unit=milliseconds{code}
> ActiveMQ: Collect statistics and publish metrics
> ------------------------------------------------
>
> Key: JAMES-3841
> URL: https://issues.apache.org/jira/browse/JAMES-3841
> Project: James Server
> Issue Type: Improvement
> Components: Queue
> Reporter: ouvtam
> Priority: Minor
> Time Spent: 1h 10m
> Remaining Estimate: 0h
>
> Currently, only some James metrics are available for ActiveMQ which are
> exposed in WebAdmin. Namely, enqueuedMail and dequeuedMail for each
> registered queue (i.e. spool and outgoing). Some ActiveMQ broker stats
> (memoryUsage, memoryLimit, storeUsage, storeLimit, maxEnqueueTime, etc.) are
> currently not available.
> According to [https://activemq.apache.org/statisticsplugin.html] ActiveMQ
> Metrics can be obtained through subscription or by polling regularly. At the
> moment the statistics plugin is only used to get the size of a queue.
> I propose to poll ActiveMQ statistics via ActiveMQHealthCheck and publish
> those as metrics. Currently, the health check creates a session and checks if
> no exception occurred.
> What do you think?
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]