You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Aleksandr Milovidov (Jira)" <ji...@apache.org> on 2024/09/27 14:30:00 UTC
[jira] [Comment Edited] (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=17885388#comment-17885388 ]
Aleksandr Milovidov edited comment on ARTEMIS-5073 at 9/27/24 2:29 PM:
-----------------------------------------------------------------------
After replica sync metric was added in ARTEMIS-4675, we have almost all needed observability metrics. But some users still need first message age queue metrics.
We also can create metrics with custom labels, for example Artemis version:
{code:java}
- pattern: "^org.apache.activemq.artemis<broker=\"([^\"]*)\"><>Version:\\s(.*)"
name: artemis_version_info
type: GAUGE
value: 1
help: ActiveMQ Artemis version info
labels:
broker: $1
version: $2 {code}
Anyway we plan to remove JMX exporter or move to standalone version. When I tried to configure management operation permissions in the security-settings, I've found that it is incompatible with JMX Exporter working as Java agent. But there are still many issues when running it as separate service.
When using JMX exporter as Java agent, we limit access to JMX port to localhost only.
was (Author: JIRAUSER301922):
After replica sync metric was added in ARTEMIS-4675, we have almost all needed observability metrics. But some users still need first message age queue metrics.
We also can create metrics with custom labels, for example Artemis version:
{code:java}
- pattern: "^org.apache.activemq.artemis<broker=\"([^\"]*)\"><>Version:\\s(.*)"
name: artemis_version_info
type: GAUGE
value: 1
help: ActiveMQ Artemis version info
labels:
broker: $1
version: $2 {code}
Anyway we plan to remove JMX exporter or move to standalone version. When I tried to configure management operation permissions in the security-settings, I've found that it is incompatible with JMX Exporter working as Java agent. But there are still many issues when running it as separate service.
> 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 the Prometheus JMX exporter is used as a Java agent, some errors are written to stdout. It happens when the 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:
> # Create Artemis instance.
> # Enable base audit logging in {{log4j2.properties}}:
> {noformat}
> logger.audit_base.level = INFO{noformat}
> # Add JMX exporter as Java agent: add following arguments to the {{JAVA_ARGS}} variable in the {{artemis.profile}} (change paths according to the environment):
> {noformat}
> -javaagent:/path/to/jmx_prometheus_javaagent.jar=9404:/path/to/jmx_exporter_config.yml{noformat}
> Example {{jmx_exporter_config.yml}}:
> {code:yaml}
> 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 [here|https://github.com/prometheus/jmx_exporter/tree/release-1.0.1/docs].
> # Start Artemis and access {{http://your-server-name:9404/metrics/}} using a 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