Tom Brisland created NIFI-6902:
----------------------------------
Summary: PrometheusReportingTask doesn't work with Output ports
Key: NIFI-6902
URL: https://issues.apache.org/jira/browse/NIFI-6902
Project: Apache NiFi
Issue Type: Bug
Components: Extensions
Affects Versions: 1.10.0
Reporter: Tom Brisland
Placing an OutputPort anywhere on the canvas causes a stacktrace when querying
the Prometheus metrics.
{code:java}
java.lang.IllegalArgumentException: Incorrect number of labels. at
io.prometheus.client.SimpleCollector.labels(SimpleCollector.java:64) at
org.apache.nifi.reporting.prometheus.api.PrometheusMetricsUtil.createNifiMetrics(PrometheusMetricsUtil.java:483)
at
org.apache.nifi.reporting.prometheus.PrometheusReportingTask.lambda$onScheduled$0(PrometheusReportingTask.java:121)
at
org.apache.nifi.reporting.prometheus.PrometheusServer$MetricsServlet.doGet(PrometheusServer.java:71)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:687) at
javax.servlet.http.HttpServlet.service(HttpServlet.java:790) at
org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:876) at
org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:542) at
org.eclipse.jetty.server.handler.ScopedHandler.nextHandle(ScopedHandler.java:255)
at
org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1347)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:203)
at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:480)
at
org.eclipse.jetty.server.handler.ScopedHandler.nextScope(ScopedHandler.java:201)
at
org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1249)
at
org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:144)
at
org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:132)
at org.eclipse.jetty.server.Server.handle(Server.java:505) at
org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:370) at
org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:267) at
org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:305)
at org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:103) at
org.eclipse.jetty.io.ChannelEndPoint$2.run(ChannelEndPoint.java:117) at
org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:781)
at
org.eclipse.jetty.util.thread.QueuedThreadPool$Runner.run(QueuedThreadPool.java:917)
at java.lang.Thread.run(Thread.java:748)
{code}
This appears to be because the parentGroupId isn't provided in
PrometheusMetricsUtil.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)