PrometheusReportingTask 不在 NiFi 中发出指标
PrometheusReportingTask not emitting metrics in NiFi
我使用汉堡包菜单创建了一个新的PrometheusReportingTask,然后选择了“All Components”策略,如下图:
在设置中,运行 时间表设置为“60 秒”
正如您在下面看到的,PrometheusReportingTask 是 运行。
也在nifi日志文件中证实了这一点:
INFO org.eclipse.jetty.server.Server jetty-9.4.26.v20200117; built: 2020-01-17T12:35:33.676Z; git: 7b38981d25d14afb4a12ff1f2596756144edf695; jvm 11.0.5+10-LTS
INFO o.e.jetty.server.handler.ContextHandler Started o.e.j.s.ServletContextHandler@3a6d7945{/metrics,null,AVAILABLE}
INFO o.eclipse.jetty.server.AbstractConnector Started ServerConnector@139a9c85{HTTP/1.1,[http/1.1]}{0.0.0.0:9092}
INFO org.eclipse.jetty.server.Server Started @16382501ms
INFO o.a.n.r.p.PrometheusReportingTask PrometheusReportingTask[id=1b3385ce-0174-1000-ff14-1bf8d240953c] Started JETTY server
INFO o.a.n.c.s.TimerDrivenSchedulingAgent PrometheusReportingTask[id=1b3385ce-0174-1000-ff14-1bf8d240953c] started.
我有一个处理器组 Foo Group,我希望看到 JVM 以及这个处理器组指标
但是,当我 cURL 指标端点时,我没有找到任何指标。没有错误,只是没有输出。
$curl localhost:9092/metrics
$
此外,当我停止 PrometheusReportingTask 时,我确实看到指标端点变得不可用
$curl localhost:9092/metrics
curl: (7) Failed to connect to localhost port 9092: Connection refused
还有什么需要配置的吗?
我正在使用 Apache NiFi 1.10.0,我在 1.12.0 上尝试过,但都没有成功。这告诉我,我在配置中缺少某些东西,或者我没有正确到达端点。
谢谢。
从指标端点拉取时需要尾部斜杠:
curl localhost:9092/metrics/
我使用汉堡包菜单创建了一个新的PrometheusReportingTask,然后选择了“All Components”策略,如下图:
在设置中,运行 时间表设置为“60 秒”
正如您在下面看到的,PrometheusReportingTask 是 运行。
也在nifi日志文件中证实了这一点:
INFO org.eclipse.jetty.server.Server jetty-9.4.26.v20200117; built: 2020-01-17T12:35:33.676Z; git: 7b38981d25d14afb4a12ff1f2596756144edf695; jvm 11.0.5+10-LTS
INFO o.e.jetty.server.handler.ContextHandler Started o.e.j.s.ServletContextHandler@3a6d7945{/metrics,null,AVAILABLE}
INFO o.eclipse.jetty.server.AbstractConnector Started ServerConnector@139a9c85{HTTP/1.1,[http/1.1]}{0.0.0.0:9092}
INFO org.eclipse.jetty.server.Server Started @16382501ms
INFO o.a.n.r.p.PrometheusReportingTask PrometheusReportingTask[id=1b3385ce-0174-1000-ff14-1bf8d240953c] Started JETTY server
INFO o.a.n.c.s.TimerDrivenSchedulingAgent PrometheusReportingTask[id=1b3385ce-0174-1000-ff14-1bf8d240953c] started.
我有一个处理器组 Foo Group,我希望看到 JVM 以及这个处理器组指标
但是,当我 cURL 指标端点时,我没有找到任何指标。没有错误,只是没有输出。
$curl localhost:9092/metrics
$
此外,当我停止 PrometheusReportingTask 时,我确实看到指标端点变得不可用
$curl localhost:9092/metrics
curl: (7) Failed to connect to localhost port 9092: Connection refused
还有什么需要配置的吗?
我正在使用 Apache NiFi 1.10.0,我在 1.12.0 上尝试过,但都没有成功。这告诉我,我在配置中缺少某些东西,或者我没有正确到达端点。
谢谢。
从指标端点拉取时需要尾部斜杠:
curl localhost:9092/metrics/