使用Promethues和Grafana监控Flink
之前使用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的更多相关文章
- promethues exporter+ grafana 监控pg+mysql
这篇文章本来是打算使用pmm 进行数据库监控的,但是居然参考官方文档使用docker 运行起来有点问题,所以直接改用 exporter 进行处理,但是比pmm 弱好多 pmm 的参考架构 说明,以上图 ...
- 部署Prometheus+Grafana监控
Prometheus 1.不是很友好,各种配置都手写 2.对docker和k8s监控有成熟解决方案 Prometheus(普罗米修斯) 是一个最初在SoudCloud上构建的监控系统,开源项目,拥有非 ...
- Docker部署Zabbix+Grafana监控
Docker部署Zabbix+Grafana监控 环境 centos 7 ; Docker 17.12.0-ce ; docker-compose version 1.20.1 2018-4-1 当前 ...
- cAdvisor+Prometheus+Grafana监控docker
cAdvisor+Prometheus+Grafana监控docker 一.cAdvisor(需要监控的主机都要安装) 官方地址:https://github.com/google/cadvisor ...
- [转帖]Prometheus+Grafana监控Kubernetes
原博客的位置: https://blog.csdn.net/shenhonglei1234/article/details/80503353 感谢原作者 这里记录一下自己试验过程中遇到的问题: . 自 ...
- 使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况
使用Telegraf + Influxdb + Grafana 监控SQLserver服务器的运行状况 前言 本文在Debian9下采用Docker的方式安装Telegraf + Influxdb + ...
- 快速接入业务监控体系,grafana监控的艺术
做一个系统,如果不做监控,是不完善的. 如果为做一个快速系统,花力气去做监控,是不值得的. 因为,我们有必要具备一个能够快速建立监控体系的能力.即使你只是一个普通开发人员! 个人觉得,做监控有三个核心 ...
- prometheus+grafana监控redis
prometheus+grafana监控redis redis安装配置 https://www.cnblogs.com/autohome7390/p/6433956.html redis_export ...
- prometheus+grafana监控mysql
prometheus+grafana监控mysql 1.安装配置MySQL官方的 Yum Repository(有mysql只需设置监控账号即可) [root@localhost ~]# wget - ...
- [转帖]安装prometheus+grafana监控mysql redis kubernetes等
安装prometheus+grafana监控mysql redis kubernetes等 https://www.cnblogs.com/sfnz/p/6566951.html plug 的模式进行 ...
随机推荐
- 【随笔记】linux usb gadget ncm wrong ndp sign 问题修复
一.模拟网卡简介 在 Linux 通过 usb 模拟网卡时,有四种方式: 1. 使用 usb gadget rndis 2. 使用 usb gadget ecm 3. 使用 usb gadget nc ...
- 快速上手python的简单web框架flask
目录 简介 web框架的重要组成部分 快速上手flask flask的第一个应用 flask中的路由 不同的http方法 静态文件 使用模板 总结 简介 python可以做很多事情,虽然它的强项在于进 ...
- KingbaseES函数三态
理解函数的三态1 VOLATILE: volatile函数没有限制,可以修改数据(如执行delete,insert,update), 使用同样的参数调用可能返回不同的值. STABLE: 不允许修改数 ...
- Pytest插件pytest-rerunfailures失败重跑
Pytest插件pytest-rerunfailures失败重跑 安装 pip install pytest-rerunfailures doc https://github.com/pytest-d ...
- MySQL-数据库、MySQL
1.存取数据的演变史 1.文本文件: 文件路径不固定(导致代码兼容性下降) 数据格式不统一:(max|123, max_123) 2.软件开发目录规范: 1.规定了数据应该保存在db目录下>&g ...
- 线程基础知识15-StampedLock
1 简介 StampedLock是JDK1.8中新增的一个读写锁,也是对JDK1.5中的读写锁ReentrantReadWriteLock的优化.在原先读写锁的基础上新增了一种叫乐观读(Optimis ...
- 模拟实现strlen的三种方法
一.strlen()的工作原理 二.模拟实现strlen的三种方法 计数器方法 指针-指针 递归的方法 三.库函数实现strlen的思路 四.库函数的strlen同上面模拟实现strlen的区别 一. ...
- ubuntu卸载eigen
1.sudo updatedb 2.locate eigen3 3.手动删除
- 代码随想录算法训练营day24 | leetcode 77. 组合
基础知识 回溯法解决的问题都可以抽象为树形结构,集合的大小就构成了树的宽度,递归的深度构成的树的深度 void backtracking(参数) { if (终止条件) { 存放结果; return; ...
- NSDT可编程3D场景
推荐:将 NSDT场景编辑器 加入你的3D开发工具链. NSDT编辑器简化了WebGL 3D应用的开发,完全兼容Three.JS生态.本文介绍如何在自己的应用中嵌入使用NSDT编辑器搭建的3D场景,并 ...