I have set up the PrometheusPushGatewayReporter
as explained in the documentation metrics section.
I can see the metrics from the flink jobmanager and the taskmanagers exposed in the push gateway's UI, as well as that they are properly scraped by the Prometheus Cluster.
The issue is that even though I have explicitly set the deleteOnJobShutdown
config option, only the jobmanager's metrics are deleted when the job is cancelled through the flink cli tool.
Is there a way to also delete the stale taskmanager metrics? My configuration is as follows :
metrics.reporter.promgateway.class: org.apache.flink.metrics.prometheus.PrometheusPushGatewayReporter
metrics.reporter.promgateway.host: $PUSH_GATEWAY_HOST
metrics.reporter.promgateway.port: 80
metrics.reporter.promgateway.jobName: foo
metrics.reporter.promgateway.randomJobNameSuffix: true
metrics.reporter.promgateway.deleteOnShutdown: true
metrics.reporter.promgateway.interval: 60 SECONDS
I am using Flink 1.7.1, on Hadoop 2.6.0