未找到 RabbitMQ 指标

RabbitMQ Metrics Not found

我是 运行 docker 上最新的 RabbitMQ,我正在尝试获取 RabbitMQ 的指标以将其与 prometheus 一起使用,但没有成功。 当我访问 host.docker.internal:15672/metrics 时,我得到以下响应

{"Error":"Object Not Found","reason":"Not Found"}

不知道为什么我的回答被@Jean-François Fabre 删除了,但让我引用官方的 rabbitmq 网站,它说默认情况下 prometheus 指标在端口 15692 上公开:

Notice that RabbitMQ exposes the metrics on a dedicated TCP port, 15692 by default.

来源:https://www.rabbitmq.com/prometheus.html#rabbitmq-configuration