박진원 (Sagan)
08/14/2024, 10:34 AMstatus.hostIP
to use with metric reporters.
• run as flink operator on eks
• setup the k8s environment variables
- name: HOST_IP
valueFrom:
fieldRef:
fieldPath: status.hostIP
• write it in FlinkDeployment's spec.flinkConfiguration
flinkConfiguration
metrics.reporters: stsd
metrics.reporter.stsd.factory.class: org.apache.flink.metrics.statsd.StatsDReporterFactory
metrics.reporter.stsd.host: $HOST_IP
metrics.reporter.stsd.port: '8125'
metrics.reporter.stsd.interval: '60 SECONDS'
When actually executed, it is written as metrics.reporter.stsd.host: $HOST_IP
under flink-conf.yaml
and does not work properly.
Do you give me advices for me?D. Draco O'Brien
08/14/2024, 12:32 PM박진원 (Sagan)
08/16/2024, 2:27 AMLike this;
metrics.reporter.stsd.host: ${HOST_IP}
However, this does not actually work, and the error log that occurs is as follows:
WARN org.apache.flink.runtime.metrics.MetricRegistryImpl [] - Error while reporting metrics
java.lang.IllegalArgumentException: unresolved address
박진원 (Sagan)
08/16/2024, 2:31 AM/opt/flink/conf# cat flink-conf.yaml | grep metrics.
metrics.reporter.stsd.interval: 60 SECONDS
metrics.scope.task: flink.task
<http://metrics.scope.tm|metrics.scope.tm>: flink.taskmanager
metrics.reporter.stsd.host: ${HOST_IP}
metrics.reporters: stsd
metrics.reporter.stsd.port: 8125
metrics.scope.operator: flink.operator
metrics.reporter.stsd.factory.class: org.apache.flink.metrics.statsd.StatsDReporterFactory
metrics.scope.jm.job: flink.jobmanager.job
<http://metrics.scope.jm|metrics.scope.jm>: flink.jobmanager
metrics.scope.tm.job: flink.taskmanager.job