rocketmq icon indicating copy to clipboard operation
rocketmq copied to clipboard

[Bug] Bug title promtool check: unknown metric type "info"

Open liuxuzxx opened this issue 10 months ago • 4 comments

Before Creating the Bug Report

  • [x] I found a bug, not just asking a question, which should be created in GitHub Discussions.

  • [x] I have searched the GitHub Issues and GitHub Discussions of this repository and believe that this is not a duplicate.

  • [x] I have confirmed that this bug belongs to the current repository, not other repositories of RocketMQ.

Runtime platform environment

RocketMQ version : 5.3.2 Prometheus version: 2.36.2 Prometheus metrics: http://172.16.1.11:5557/metrics

When I use the promtool tool to detect the indicators of RocketMQ 5, the results are as follows

linux > curl -s http://172.16.1.11:5557/metrics | ./promtool check metrics
error while linting: text format parsing error in line 1: unknown metric type "info"

RocketMQ version

RocketMQ version : 5.3.2

JDK Version

OpenJDK:17

Describe the Bug

When I use the promtool tool to detect the indicators of RocketMQ 5, the results are as follows

linux > curl -s http://172.16.1.11:5557/metrics | ./promtool check metrics
error while linting: text format parsing error in line 1: unknown metric type "info"

Steps to Reproduce

When I use the promtool tool to detect the indicators of RocketMQ 5, the results are as follows

linux > curl -s http://172.16.1.11:5557/metrics | ./promtool check metrics
error while linting: text format parsing error in line 1: unknown metric type "info"

What Did You Expect to See?

# TYPE target info
# HELP target Target metadata
target_info{} 1
# TYPE otel_scope_info info
# HELP otel_scope_info Scope metadata
otel_scope_info{otel_scope_name="broker-meter"} 1

......

Promtheus support: counter、gauge、histogram、summary. not contain: "info" type

What Did You See Instead?

counter、gauge、histogram、summarycounter、gauge、histogram、summaryP

Additional Context

No response

liuxuzxx avatar Apr 07 '25 09:04 liuxuzxx

But when I use prometheus to collect directly, it is possible

liuxuzxx avatar Apr 07 '25 09:04 liuxuzxx

When I passed a prometheus proxy_url, an error occurred: invalid metric type: "info"

liuxuzxx avatar Apr 07 '25 09:04 liuxuzxx

但是官方网站在可观测性这章节说法如下:

消息队列 RocketMQ 版定义的 Metrics 完全兼容开源 Prometheus 的标准,提供的 Metrics 的类型为 Counter、Gauge 和 Histogram。更多信息,请参见 [METRIC TYPES](https://prometheus.io/docs/concepts/metric_types/)。

但是最前面两个指标,如果解析出来就是:info类型

https://rocketmq.apache.org/zh/docs/observability/01metrics

Image

liuxuzxx avatar Apr 07 '25 09:04 liuxuzxx

看到配置文件也是配置了如下的信息

metricsExporterType=PROM

liuxuzxx avatar Apr 07 '25 09:04 liuxuzxx