大家好:
我发下问题了, 在此回复下,防止有遇到同样问题的同学。

通过对比数据和看源码。发现flink 在push metrics 到 promgateway 的时候,
没有按照规范,给出“instance”值,可能导致 Prometheus  存储出现问题。
我调整了代码,每个实例,给了Java UUID 字符串后,发现数据恢复正常。

PR: https://github.com/apache/flink/pull/7820

On Wed, Feb 20, 2019 at 6:27 PM Yaoting Gong <fall.for.you....@gmail.com>
wrote:

> 大家好:
>
>   我这边采用Flink on Yarn 模式部署。Metrics
> 收集用的PrometheusPushGateway。发现metric不连续,有的很久都没有给出数据。
> 我的配置如下:
>
>
> #==============================================================================
> ## Metrics Configuration
>
> #==============================================================================
>
> metrics.reporter.promgateway.class:
> org.apache.flink.metrics.prometheus.PrometheusPushGatewayReporter
> metrics.reporter.promgateway.host: 10.201.3.156
> metrics.reporter.promgateway.port: 9091
> metrics.reporter.promgateway.jobName: FlinkJob
> metrics.reporter.promgateway.randomJobNameSuffix: true
> metrics.reporter.promgateway.deleteOnShutdown: true
> # metrics.reporter.promgateway.interval: 5 SECONDS
>
> 如果有知道的,麻烦告知一下。
>

回复