学习 Flink(十):监控

栏目: 数据库 · 发布时间: 5年前

内容简介:TODO首先,执行然后,编辑

指标系统

TODO

Prometheus

配置 Flink

首先,执行 cp opt/flink-metrics-prometheus-1.8.0.jar lib/ ,将依赖的 JAR 文件拷贝到 /lib 目录下。

然后,编辑 conf/flink-conf.yaml 文件,添加配置:

metrics.reporter.prom.class: org.apache.flink.metrics.prometheus.PrometheusReporter

可选配置 metrics.reporter.prom.port ,Prometheus Exporter 监听端口,默认为 9249

可选配置 metrics.reporter.prom.filterLabelValueCharacters ,指定是否过滤不匹配 [a-zA-Z_][a-zA-Z0-9_]* 的 Label,默认为 false

重新启动 Flink 集群,Flink Prometheus 指标地址在 JobManager 所在主机的 9249 端口。

配置 Prometheus

编辑 prometheus.yml 配置文件,添加 Flink 集群指标配置:

scrape_configs:  
  - job_name: 'flink'
    metrics_path: '/'
    static_configs:
    - targets: ['FLINK_MASTER:9249']

启动 Prometheus:

prometheus --config.file=prometheus.yml

Grafana

Grafana 是开源的仪表盘应用,官方支持 Prometheus 作为数据源。

添加 Prometheus 数据源,导入 Flink Metrics


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Release It!

Release It!

Michael T. Nygard / Pragmatic Bookshelf / 2007-03-30 / USD 34.95

“Feature complete” is not the same as “production ready.” Whether it’s in Java, .NET, or Ruby on Rails, getting your application ready to ship is only half the battle. Did you design your system to......一起来看看 《Release It!》 这本书的介绍吧!

URL 编码/解码
URL 编码/解码

URL 编码/解码

Markdown 在线编辑器
Markdown 在线编辑器

Markdown 在线编辑器

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具