Hi,
I'm having trouble configuring Graphite DB for exporting metrics. Flink
version 1.20 .
As you can see in the error log, the hostname is correct but the port
configuration is not working and appears to be *-1*.
-----
2024-12-18 13:52:40,863 ERROR
org.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
org.apache.flink.metrics.graphite.GraphiteReporter.getReporter(GraphiteReporter.java:51)
~[?:?]
at
org.apache.flink.dropwizard.ScheduledDropwizardReporter.open(ScheduledDropwizardReporter.java:113)
~[?:?]
-----
But during startup, I can see that both parameters are read correctly:
----
INFO [] - Loading configuration property: *metrics.reporter.grph.port,
2001*
INFO [] - Loading configuration property: metrics.scope.task,
<job_name>.<task_name>
INFO [] - Loading configuration property: *metrics.reporter.grph.host,
localhost3*
INFO [] - Loading configuration property:
metrics.reporter.prom.scope.operator, <job_name>.<operator_name>
----
Below you can see my metrics configuration in config.yaml. Any help is
appreciated.
metrics:
scope:
operator: <job_name>.<operator_name>
task: <job_name>.<task_name>
reporters: grph,prom
reporter:
grph:
factory:
class: org.apache.flink.metrics.graphite.GraphiteReporterFactory
host: localhost3
port: 2001
protocol: TCP
interval: 10 SECONDS
prom:
factory:
class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory
port: 9249-9251
scope:
operator: <job_name>.<operator_name>
task: <job_name>.<task_name>