当前位置:网站首页>[metric]使用Prometheus监控flink1.13org.apache.flink.metrics
[metric]使用Prometheus监控flink1.13org.apache.flink.metrics
2022-07-23 05:38:00 【bigdata王一】
1 Prometheus安装使用
prometheus下载地址:
https://prometheus.io/download/
打开http://localhost:9090/就可以访问使用
2 pushgateway安装使用
解压后直接运⾏ ./prometheus 就可以启动 prometheus
prometheus pushgateway下载地址:
https://prometheus.io/download/
编辑Prometheus中的prometheus.yaml文件
- job_name: 'pushgateway'
scrape_interval: 10s
honor_labels: true #加上此配置exporter节点上传数据中的⼀些标签将不会被pushgateway节点的相同标签覆盖
static_configs:
- targets: ['192.168.xx.xxx:9095']
labels:
instance: pushgateway
因为prometheus配置pushgateway 的时候,也会指定job和instance,但是它只表示
pushgateway实例,不能真正表达收集数据的含义。所以配置pushgateway需要添加
honor_labels:true,避免收集数据本身的job和instance被覆盖
启动 pushgaterway
./pushgaterway --web.listen-address=192.168.xx.xxx:9095
3 flink配置
vi flink-conf.yaml
底部添加
metrics.reporter.promgateway.class: org.apache.flink.metrics.prometheus.PrometheusPushGatewayReporter
metrics.reporter.promgateway.host: 192.168.xx.xxx
metrics.reporter.promgateway.port: 9095
metrics.reporter.promgateway.jobName: wyJob
metrics.reporter.promgateway.randomJobNameSuffix: true
metrics.reporter.promgateway.deleteOnShutdown: false
启动 Flink,可以看到启动日志有端口号
Prometheus查看到如下指标


边栏推荐
猜你喜欢
随机推荐
USCD行人异常数据集使用指南 | 快速下载
项目部署(简版)
给图片人脸部分加上马赛克
cuda10.0配置pytorch1.7.0+monai0.9.0
十年架构五年生活-01毕业之初
Updated again, idea 2022.2 officially released
Xssgame games (XSS learning) level1-15
2.启动函数返回值的剖析
MySQL-8.0.28 用户操作 or 用户权限操作
Compare the advantages and disadvantages of RDB and AOF modes of redis
Spark常见面试问题整理
【无标题】
【文献调研】在Pubmed上搜索特定影响因子期刊上的论文
Usage of countdownlatch
Flask blueprint
视图的使用
Déploiement du projet (version abrégée)
Shardingsphere sub database and table scheme
PyGame realizes the airplane war game
Hyperlink de underlined code









