Hi teams, I faced a issue about `status.hostIP` to...
# troubleshooting
u
Hi teams, I faced a issue about
status.hostIP
to use with metric reporters. • run as flink operator on eks • setup the k8s environment variables
Copy code
- name: HOST_IP
    valueFrom:
      fieldRef:
        fieldPath: status.hostIP
• write it in
FlinkDeployment's spec.flinkConfiguration
Copy code
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
Please advise what “Does not work properly” means? Do you see error messages? Are you missing data you expect to see? What version of Flink are you on?
u
@D. Draco O'Brien I apologize for the lack of information. The flink version I am using is 1.17, and the expected behavior is to inject the metrics.reporter.stsd.host information as an environment variable under flink-conf.yaml.
Copy code
Like this;
metrics.reporter.stsd.host: ${HOST_IP}
However, this does not actually work, and the error log that occurs is as follows:
Copy code
WARN  org.apache.flink.runtime.metrics.MetricRegistryImpl          [] - Error while reporting metrics
java.lang.IllegalArgumentException: unresolved address
When I go into the pod and check flink-conf.yaml, it looks like this:
Copy code
/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