使用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 的模式进行 ...
随机推荐
- exgcd & 线性同余方程
前置芝士 裴蜀定理 同余的性质 exgcd exgcd即扩展欧几里得定理,常用来求解\(ax + by = gcd(a,b)\)的可行解问题 推导过程: 考虑我们有: \(ax + by = gc ...
- 车联网安全WEB靶场实测
序言 车联网跟WEB安全相关联的地方不多,车联网更多还是基于IOT安全.但是车联网安全也和WEB安全有密切相关的地方,比如云安全.API安全等.近两年的智能网联汽车从IVI(车载信息娱乐系统).OTA ...
- 真正“搞”懂HTTPS协议17之TLS握手
经过前两章的学习,我们知道了通信安全的定义以及TLS对其的实现~有了这些知识作为基础,我们现在可以正式的开始研究HTTPS和TLS协议了.嗯--现在才真正开始. 我记得之前大概聊过,当你在浏览器的地址 ...
- .NET Core项目部署到Windows系统Docker
1.新建一个ASP.NET Core Web应用(模型-视图-控制器) 2. 项目启动Docker.Docker OS选择Windows 3.系统默认的dockerfile文件如下 #See http ...
- 基于 Hugging Face Datasets 和 Transformers 的图像相似性搜索
基于 HuggingFace Datasets 和 Transformers 的图像相似性搜索 通过本文,你将学习使用 Transformers 构建图像相似性搜索系统.找出查询图像和潜在候选图像之间 ...
- K8s 网络新手教程(Kubernetes Networking Guide for Beginners)
K8s 网络新手教程(Kubernetes Networking Guide for Beginners) 原文链接: Kubernetes Networking Guide for Beginner ...
- 题解 P1627 [CQOI2009] 中位数
傻逼题但是被自己的傻逼操作爆了好几次零(悲愤 .... 没什么好讲的,一眼题... //SIXIANG #include <iostream> #define int long long ...
- pat乙级:模拟链表问题(汇总,包含所有pat中链表题目分析)
更新:优化文章结构,增加了部分内容如(1110区块反转)和自己代码和他人代码分析.看完你就懂了 转载请注明出处和链接地址:(https://www.cnblogs.com/ahappyfool/p/1 ...
- C语言数据结构串的表示与操作的实现
串的堆分配储存表示 typedef struct { char* ch;//若是非空字符串,则按串长分配存储区,否则ch为NULL int length;//串长度 } HString; 生成一个其值 ...
- 剖析flutter_download_manager学习如何做下载管理,暂停和取消
前言 内容类应用中图片或文件下载,一般应用中应用更新和升级,这些都是经典的下载场景.下载是项目中基础且重要的模块. 从代码逻辑复用性和人力成本考虑,一直想实现一个纯Dart实现的下载库,作为技术储备. ...