You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Justin Bertram (Jira)" <ji...@apache.org> on 2024/09/27 13:17:00 UTC
[jira] [Commented] (ARTEMIS-5073) Formatting error of some audit log events when using Prometheus JMX Exporter
[ https://issues.apache.org/jira/browse/ARTEMIS-5073?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17885362#comment-17885362 ]
Justin Bertram commented on ARTEMIS-5073:
-----------------------------------------
Thanks for the report!
Out of curiosity, why are you using the Prometheus JMX Exporter instead of something like this [Prometheus Metrics Plugin|https://github.com/rh-messaging/artemis-prometheus-metrics-plugin]? Have you secured JMX access on your broker?
> Formatting error of some audit log events when using Prometheus JMX Exporter
> ----------------------------------------------------------------------------
>
> Key: ARTEMIS-5073
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5073
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Affects Versions: 2.36.0, 2.37.0
> Reporter: Aleksandr Milovidov
> Priority: Minor
> Attachments: artemis_log_event.txt
>
>
> When audit logging is enabled and JMX exporter is used as a Java agent, some errors are written to stdout. It happens when Prometheus JMX exporter collects metrics. Username in this case may be null or anonymous.
> Reproducible in versions 2.36.0 and 2.37.0.
> Steps to reproduce:
> 1. Create Artemis instance.
> 2. Enable base audit logging in log4j2.properties:
>
> {code:java}
> logger.audit_base.level = INFO{code}
>
> 3. Add JMX exporter as javaagent: add following arguments to the JAVA_ARGS variable in the artemis.profile (change paths according to the environment):
>
> {code:java}
> -javaagent:/path/to/jmx_prometheus_javaagent.jar=9404:/path/to/jmx_exporter_config.yml{code}
>
> Example jmx_exporter_config.yml:
>
> {code:java}
> lowercaseOutputName: true
> lowercaseOutputLabelNames: true
> rules:
> - pattern: "^org.apache.activemq.artemis<broker=\"([^\"]*)\"><>([^:]*):\\s(.*)"
> attrNameSnakeCase: true
> name: artemis_$2
> type: GAUGE{code}
>
> JMX Exporter can be downloaded from github: https://github.com/prometheus/jmx_exporter/tree/release-1.0.1/docs
> 4. Start Artemis, open http://your-server-name:9404/metrics/ using browser or curl command-line utility.
> Event is logged to stdout of Artemis process: [^artemis_log_event.txt]
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@activemq.apache.org
For additional commands, e-mail: issues-help@activemq.apache.org
For further information, visit: https://activemq.apache.org/contact