之前使用Influxdb储存Metrics经常会出现数据写不进去的问题,当Influxdb重启之后又能写进去,遂将数据存储部分换成Promethues,因为Flink采用PutGateway的方式,需要先将PutGateway安装好

flink1.10.0使用prometheus版本是0.3.0,我们在这里使用0.9.1的版本,如果使用最新版1.2.0会出现不兼容的问题

第一步:安装PutGateway

cd /usr/local/

wget https://github.com/prometheus/pushgateway/releases/download/v0.9.1/pushgateway-0.9.1.linux-amd64.tar.gz

tar -zxvf pushgateway-0.9.1.linux-amd64.tar.gz

nohup ./pushgateway &

第二步:配置prometheus

vi /usr/local/prometheus-2.1.0.linux-amd64/prometheus.yml  增加以下配置

  - job_name: 'flink'
scrape_interval: 10s
scrape_timeout: 10s
static_configs:
- targets: ['localhost:9091']
labels:
instance: 'pushgateway'

第三步:配置Flink

nohup /usr/local/prometheus-2.1.0.linux-amd64/prometheus --config.file=/usr/local/prometheus-2.1.0.linux-amd64/prometheus.yml &  启动prometheus

metrics.reporter.promgateway.class: org.apache.flink.metrics.prometheus.PrometheusPushGatewayReporter
metrics.reporter.promgateway.host: xx.xx.xx.xx
metrics.reporter.promgateway.port: 9091
metrics.reporter.promgateway.jobName: flink
metrics.reporter.promgateway.randomJobNameSuffix: true
metrics.reporter.promgateway.deleteOnShutdown: true

cd flink

cp opt/flink-metrics-prometheus-1.10.0.jar lib/

第四步:配置Grafana

配置grafana过程比较痛苦,根据需要监控的指标进行配置,最后展示的页面和之前配置的一样

参考

https://ci.apache.org/projects/flink/flink-docs-release-1.8/monitoring/metrics.html#prometheus-orgapacheflinkmetricsprometheusprometheusreporter

https://github.com/prometheus/pushgateway/releases

https://www.cnblogs.com/huandada/p/10932953.html

使用Promethues和Grafana监控Flink的更多相关文章

  1. promethues exporter+ grafana 监控pg+mysql

    这篇文章本来是打算使用pmm 进行数据库监控的,但是居然参考官方文档使用docker 运行起来有点问题,所以直接改用 exporter 进行处理,但是比pmm 弱好多 pmm 的参考架构 说明,以上图 ...

  2. 部署Prometheus+Grafana监控

    Prometheus 1.不是很友好,各种配置都手写 2.对docker和k8s监控有成熟解决方案 Prometheus(普罗米修斯) 是一个最初在SoudCloud上构建的监控系统,开源项目,拥有非 ...

  3. Docker部署Zabbix+Grafana监控

    Docker部署Zabbix+Grafana监控 环境 centos 7 ; Docker 17.12.0-ce ; docker-compose version 1.20.1 2018-4-1 当前 ...

  4. cAdvisor+Prometheus+Grafana监控docker

    cAdvisor+Prometheus+Grafana监控docker 一.cAdvisor(需要监控的主机都要安装) 官方地址:https://github.com/google/cadvisor ...

  5. [转帖]Prometheus+Grafana监控Kubernetes

    原博客的位置: https://blog.csdn.net/shenhonglei1234/article/details/80503353 感谢原作者 这里记录一下自己试验过程中遇到的问题: . 自 ...

  6. 使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况

    使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况 前言 本文在Debian9下采用Docker的方式安装Telegraf + Influxdb + ...

  7. 快速接入业务监控体系,grafana监控的艺术

    做一个系统,如果不做监控,是不完善的. 如果为做一个快速系统,花力气去做监控,是不值得的. 因为,我们有必要具备一个能够快速建立监控体系的能力.即使你只是一个普通开发人员! 个人觉得,做监控有三个核心 ...

  8. prometheus+grafana监控redis

    prometheus+grafana监控redis redis安装配置 https://www.cnblogs.com/autohome7390/p/6433956.html redis_export ...

  9. prometheus+grafana监控mysql

    prometheus+grafana监控mysql 1.安装配置MySQL官方的 Yum Repository(有mysql只需设置监控账号即可) [root@localhost ~]# wget - ...

  10. [转帖]安装prometheus+grafana监控mysql redis kubernetes等

    安装prometheus+grafana监控mysql redis kubernetes等 https://www.cnblogs.com/sfnz/p/6566951.html plug 的模式进行 ...

随机推荐

  1. 淘宝数据采集之js采集

    搜索页面采集,数据在控制台哦!!! 搜索页面采集,数据在控制台哦!!! 搜索页面采集,数据在控制台哦!!! 既然能打到控制台,当然也能传到系统!!! 既然能打到控制台,当然也能传到系统!!! 既然能打 ...

  2. Lodop打印小票

    使用Lodop打印小票 1.html页面 <head> <meta http-equiv="Content-Type" content="text/ht ...

  3. ECharts 饼图指定颜色显示

    一.通过setOption的color属性分配颜色范围 先介绍这里提到的color属性 color:调色盘颜色列表.如果系列没有设置颜色,则会依次循环从该列表中取颜色作为系列颜色. 默认为: ['#5 ...

  4. H3C MS4300V2配置mac地址与接口绑定

    配置mac地址与接口绑定 例: <h3c>system-view     //进入系统视图 [h3c]int g 1/0/45 //进入45接口 [h3c-GigabitEthernet1 ...

  5. 什么是整体设备效率(OEE)?

    整体设备效率 (OEE) 用于监控制造效率.得到的OEE百分比是通用的,可以跨不同行业和流程进行比较. OEE可用性 OEE可用性=实际运行时间/生产时间 OEE可用性是实际运行时间和计划生产时间之间 ...

  6. Lucky Tree

    题目:http://codeforces.com/problemset/problem/109/C 题意:一棵树n个节点,组成一个图,每条边都有权值,对于i.j.k三个数,计算所有的 i 到 j 和 ...

  7. Shell命令-常用操作

    Shell基础 1 Shell命令的基本格式 基本格式 command [选项] [参数] []表示可选的,也就是可有可无.有些命令不写选项和参数也能执行,有些命令在必要的时候可以附带选项和参数. 短 ...

  8. vue弹窗后如何禁止滚动条滚动

    toggleBody(isPin){ if(isPin){ document.body.style.height = '100vh' document.body.style['overflow-y'] ...

  9. python (),[], {}的含义

    1.python ()表示元组,元组是一种不可变序列 1)创建如:tuple = (1,2,3) 取数据 tuple[0]...... tuple[0,2].....tuple[1,2]...... ...

  10. Postgresql WAL日志浅析

    一.预写日志(WAL) 预写式日志(Write Ahead Log,WAL)是保证数据完整性的一种标准方法.简单来说,WAL的中心概念是数据文件(存储着表和索引)的修改必须在这些动作被日志记录之后才被 ...