Hi,

I'm setting up Flink 1.7.0 on a Kubernetes cluster and am seeing some
unexpected behavior when using the Prometheus Reporter.

With the following setup in flink-conf.yaml:
    metrics.reporters: prometheus
    metrics.reporter.prometheus.class:
org.apache.flink.metrics.prometheus.PrometheusReporter

I am able to make a request to the job manager at the default port (9249)
and retrieve metrics that look like this:
# HELP flink_jobmanager_Status_JVM_GarbageCollector_Copy_Time Time (scope:
jobmanager_Status_JVM_GarbageCollector_Copy)
# TYPE flink_jobmanager_Status_JVM_GarbageCollector_Copy_Time gauge
flink_jobmanager_Status_JVM_GarbageCollector_Copy_Time{host="localhost",}
0.0
# HELP flink_jobmanager_taskSlotsTotal taskSlotsTotal (scope: jobmanager)
# TYPE flink_jobmanager_taskSlotsTotal gauge
flink_jobmanager_taskSlotsTotal{host="localhost",} 0.0

What I would like to do is change the format of these metrics using the
scope overrides. I've defined the following overrides, in flink-conf.yaml,
as a test and they are not taking effect. Is there some other configuration
I need to have in place for these overrides to work?
    metrics.scope.jm: flink.testcluster.jobmanager.dev.<host>
    metrics.scope.jm.job: flink.testjob.jobmanager.<job_name>

When I put these overrides in, the job manager logs from
org.apache.flink.configuration.GlobalConfiguration show that my overrides
are being seen by Flink.

Thanks for your help!
-Kaustubh

Reply via email to