简体   繁体   English

Flink statsD 集成

[英]Flink statsD integration

We are using Flink 1.9.1 on EMR 5.29 with multi-master mode enabled.我们在启用了多主模式的EMR 5.29上使用Flink 1.9.1 We added the below configuration to the flink-conf.yaml file in conf folder and added the jar flink-metrics-statsd-1.9.1.jar to the flink/lib folder.我们将以下配置添加到 conf 文件夹中的 flink-conf.yaml 文件中,并将 jar flink-metrics-statsd-1.9.1.jar 1.9.1.Z68995FCBF432492D40484D04A9D2 文件夹添加到linkAC。

metrics.scope.jm: <host>.jobmanager
metrics.scope.jm.job: <host>.jobmanager.<job_name>
metrics.scope.tm: <host>.taskmanager.<tm_id>
metrics.scope.tm.job: <host>.taskmanager.<tm_id>.<job_name>
metrics.scope.task: <host>.taskmanager.<tm_id>.<job_name>.<task_name>.<subtask_index>
metrics.scope.operator: <host>.taskmanager.<tm_id>.<job_name>.<operator_name>.<subtask_index>

metrics.reporters: stsd
metrics.reporter.stsd.factory.class: org.apache.flink.metrics.statsd.StatsDReporter
metrics.reporter.stsd.host: localhost
metrics.reporter.stsd.port: 8130
metrics.reporter.stsd.interval: 60 SECONDS

When we listen to the statsD port, we don't get any of the metrics.当我们监听 statsD 端口时,我们没有得到任何指标。 Is there anything that we are missing out?我们有什么遗漏的吗? Is there a way to check if some parameter is not getting passed?有没有办法检查某些参数是否没有通过?

As suggested in one of the other answers, we tried giving the IP address of the master also.正如其他答案之一所建议的那样,我们也尝试提供主服务器的 IP 地址。 Does not seem to work.似乎不起作用。

With Flink 1.9, you need to copy the jar file for the reporter into the lib directory of every machine in the cluster.使用 Flink 1.9,您需要将报告者的 jar 文件复制到集群中每台机器的 lib 目录中。 So copy flink-metrics-statsd-1.9.1.jar from opt into lib .因此,将flink-metrics-statsd-1.9.1.jaropt复制到lib中。

If that doesn't fix it, check the logs -- there should be clues there.如果这不能解决问题,请检查日志——那里应该有线索。

Also, statsd normally uses port 8125. Are you sure it's listening on 8130?此外,statsd 通常使用端口 8125。您确定它正在侦听 8130 吗?

Found the issue: This should have been used: metrics.reporter.stsd.class: org.apache.flink.metrics.statsd.StatsDReporter Instead of: metrics.reporter.stsd.factory.class: org.apache.flink.metrics.statsd.StatsDReporter Found the issue: This should have been used: metrics.reporter.stsd.class: org.apache.flink.metrics.statsd.StatsDReporter Instead of: metrics.reporter.stsd.factory.class: org.apache.flink.metrics.statsd.StatsDReporter

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM