admin管理员组文章数量:1389772
I try to configure Graphite as metric reporter DB in Apache Flink 1.20
metrics:
scope:
operator: <job_name>.<operator_name>
task: <job_name>.<task_name>
reporters: grph,prom
reporter:
grph:
factory:
class: .apache.flink.metrics.graphite.GraphiteReporterFactory
host: localhost3
port: 2001
protocol: TCP
interval: 10 SECONDS
prom:
factory:
class: .apache.flink.metrics.prometheus.PrometheusReporterFactory
port: 9249-9251
scope:
operator: <job_name>.<operator_name>
task: <job_name>.<task_name>
But when I start the cluster, I get the exception below. AS you can see, host name is parsed but port is invalid.
2025-03-12 19:31:26,025 ERROR .apache.flink.runtime.metrics.ReporterSetup [] - Could not instantiate MetricReporter grph. Metrics might not be exposed/reported.
java.lang.IllegalArgumentException: Invalid host/port configuration. Host: localhost3
Port: -1
at .apache.flink.metrics.graphite.GraphiteReporter.getReporter(GraphiteReporter.java:51) ~ [?:?]
at .apache.flink.dropwizard.ScheduledDropwizardReporter.open(ScheduledDropwizardReporter.ja va:113) ~[?:?]
at .apache.flink.runtime.metrics.ReporterSetup.createReporterSetup(ReporterSetup.java:185) ~[flink-dist-1.20.0.jar:1.20.0]
at .apache.flink.runtime.metrics.ReporterSetup.lambda$setupReporters$2(ReporterSetup.java:3 60) ~[flink-dist-1.20.0.jar:1.20.0]
in Flink logs, at startup I can see, these values are parsed correctly.
INFO [] - Loading configuration property: metrics.reporter.grph.port, 2001
INFO [] - Loading configuration property: metrics.reporter.grph.host, localhost3
INFO [] - Loading configuration property: metrics.reporter.grph.interval, 10 SECONDS
INFO [] - Loading configuration property: metrics.reporter.grph.interval, 10 SECONDS
Any idea why port value can not be parsed and seems -1 ,default value?
I try to configure Graphite as metric reporter DB in Apache Flink 1.20
metrics:
scope:
operator: <job_name>.<operator_name>
task: <job_name>.<task_name>
reporters: grph,prom
reporter:
grph:
factory:
class: .apache.flink.metrics.graphite.GraphiteReporterFactory
host: localhost3
port: 2001
protocol: TCP
interval: 10 SECONDS
prom:
factory:
class: .apache.flink.metrics.prometheus.PrometheusReporterFactory
port: 9249-9251
scope:
operator: <job_name>.<operator_name>
task: <job_name>.<task_name>
But when I start the cluster, I get the exception below. AS you can see, host name is parsed but port is invalid.
2025-03-12 19:31:26,025 ERROR .apache.flink.runtime.metrics.ReporterSetup [] - Could not instantiate MetricReporter grph. Metrics might not be exposed/reported.
java.lang.IllegalArgumentException: Invalid host/port configuration. Host: localhost3
Port: -1
at .apache.flink.metrics.graphite.GraphiteReporter.getReporter(GraphiteReporter.java:51) ~ [?:?]
at .apache.flink.dropwizard.ScheduledDropwizardReporter.open(ScheduledDropwizardReporter.ja va:113) ~[?:?]
at .apache.flink.runtime.metrics.ReporterSetup.createReporterSetup(ReporterSetup.java:185) ~[flink-dist-1.20.0.jar:1.20.0]
at .apache.flink.runtime.metrics.ReporterSetup.lambda$setupReporters$2(ReporterSetup.java:3 60) ~[flink-dist-1.20.0.jar:1.20.0]
in Flink logs, at startup I can see, these values are parsed correctly.
INFO [] - Loading configuration property: metrics.reporter.grph.port, 2001
INFO [] - Loading configuration property: metrics.reporter.grph.host, localhost3
INFO [] - Loading configuration property: metrics.reporter.grph.interval, 10 SECONDS
INFO [] - Loading configuration property: metrics.reporter.grph.interval, 10 SECONDS
Any idea why port value can not be parsed and seems -1 ,default value?
Share Improve this question asked Mar 12 at 16:49 KenankKenank 3682 silver badges11 bronze badges1 Answer
Reset to default 1For some reason defining the port as a string allow the plugin to work.
reporter:
grph:
factory:
class: .apache.flink.metrics.graphite.GraphiteReporterFactory
host: localhost3
port: '2001'
protocol: TCP
interval: 10 SECONDS
本文标签: Graphite Metric Reporter for Apache Flink does not recognize Port valueStack Overflow
版权声明:本文标题:Graphite Metric Reporter for Apache Flink does not recognize Port value - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1744739032a2622501.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论