prometheus2.0 联邦的配置
参考:https://blog.51cto.com/lee90/2062252
官网对于联邦的介绍:https://prometheus.io/docs/prometheus/latest/federation/
prometheus2.0 在参数上有原先的1.X有较大的变化,很多参数被去掉了。另外优化了CPU占用、存储空间占用等,具体可以看官方文档。
这里贴一下prometheus2.0的联邦(又称Shard)搭建方法,一些理论知识就不贴了,自己去google扒吧:
官网对于联邦的介绍:https://prometheus.io/docs/prometheus/latest/federation/
联邦有不同的用例。它通常用于实现可扩展的prometheus,或者将metrics从一个服务的prometheus拉到另一个Prometheus上用于展示。
分层联邦:
分层联邦允许普罗米修斯扩展到数十个数据中心和数百万个节点的环境。在这种用例中,联邦拓扑类似于一棵树,更高级别的普罗米修斯服务器从大量的从属服务器收集汇总的时间序列数据。
跨服务联邦:
In cross-service federation, a Prometheus server of one service is configured to scrape selected data from another service's Prometheus server to enable alerting and queries against both datasets within a single server.
在跨服务联合中,一个服务的普罗米修斯服务器被配置为从另一个服务的普罗米修斯服务器中刮取选定的数据,以使得能够针对单个服务器内的两个数据集进行警报和查询。
For example, a cluster scheduler running multiple services might expose resource usage information (like memory and CPU usage) about service instances running on the cluster. On the other hand, a service running on that cluster will only expose application-specific service metrics. Often, these two sets of metrics are scraped by separate Prometheus servers. Using federation, the Prometheus server containing service-level metrics may pull in the cluster resource usage metrics about its specific service from the cluster Prometheus, so that both sets of metrics can be used within that server.
例如,运行多个服务的集群调度程序可能会暴露有关在集群上运行的服务实例的资源使用情况信息(如内存和CPU使用情况)。另一方面,在该群集上运行的服务将仅公开特定于应用程序的服务度量标准。通常,这两套指标是由单独的普罗米修斯服务器来抓取的。使用联邦,包含服务级别度量的普罗米修斯服务器可以从集群普罗米修斯拉入有关其特定服务的集群资源使用度量,以便这两组度量可以在该服务器内使用。
【举个例子:我们要监控mysqld的运行状态,可以使用1个主Prometheus+2个分片Prometheus(一个用来采集node_exporter的metrics、一个用来采集mysql_exporter的metrics),然后在主Prometheus上做汇总】
安装prometheus和mysqld_exporter、postgres_exporter的步骤也不写了,很简单的,exporter的部署我们通常用ansible或saltstack之类的工具批量分发。
我这里实验起见,在一台机器上跑了3个shard节点,1个global节点。
Node1: 10.0.20.25 (跑了老版本的prometheus1.7、mysql_exporter、postgres_exporter,这是之前做实验搭建的环境)
Node2: 10.0.20.26 (跑了prometheus2.0、mysql_exporter、postgres_exporter)
以下内容,请参考原文https://blog.51cto.com/lee90/2062252
prometheus2.0 联邦的配置的更多相关文章
- 烂泥:zabbix3.0安装与配置
本文由ilanniweb提供友情赞助,首发于烂泥行天下 想要获得更多的文章,可以关注我的微信ilanniweb 这个月又快过完了,最近也比较忙,没时间写文章,今天挤点时间把zabbix3.0安装与配置 ...
- mysql 5.0.46安装配置
http://os.chinaunix.net/a2008/0801/986/000000986346.shtml RPM包和源码包存放位置 /usr/local/src 源码包编译安装位置(pref ...
- win10+vs2015+opencv3.0 x86/x64配置(debug+release)
最近做一些图像识别的项目,用到了opencv,opencv3.1没有x86版本,所以只能用opencv3.0来完成,下面介绍一下在window10下vs2015 配置opencv3.0的过程(x86和 ...
- Tomcat6.0数据库连接池配置
http://blog.163.com/magicc_love/blog/static/185853662201111101130969/ oracle驱动包Tomcat 6.0配置oracle数据库 ...
- cocos2d-x3.0 windows 环境配置
cocos2d-x3.0 windows 环境配置 参考Oo泡泡糖oO的CSDN博文 :http://blog.csdn.net/u010296979/article/details/24273393 ...
- uWSGI参考资料(1.0版本的配置选项列表)
Reference: http://blog.csdn.net/kevin6216/article/details/15378617 uWSGI参考资料(1.0版本的配置选项列表) 下面的内容包含了大 ...
- CentOS-6.6下Tomcat-7.0安装与配置(Linux)
CentOS-6.6下Tomcat-7.0安装与配置(Linux) 一.认识tomcat Tomcat是一个免费的开源的Serlvet容器,它是Apache基金会的Jakarta项目中的一个核心项目, ...
- Redis4.0.0 安装及配置 (Linux — Centos7)
本文中的两个配置文件可在这里找到 操作系统:Linux Linux发行版:Centos7 安装 下载地址,点这里Redis4.0.0.tar.gz 或者使用命令: wget http://downlo ...
- Caffe + Ubuntu 15.04 + CUDA 7.0 安装以及配置
作为小码农的我,昨天就在装这个东东了,主要参考第一篇博文,但是过程发现很多问题,经过反反复复,千锤百炼,终于柳暗花明,我把这个caffe给搞定了,是故,我发布出来,后之来者,欲将有感于斯文~ 本分分为 ...
随机推荐
- python开发笔记-连接rabbitmq异常问题unacked处理
待补充 思路:捕获程序处理异常,异常情况下,也给队列生产者返回“确认”消息
- Oracle系列十三 视图
视图 :从表中抽出的逻辑上相关的数据集合. 视图是一种虚表. 视图建立在已有表的基础上, 视图赖以建立的这些表称为基表. 向视图提供数据内容的语句为 SELECT 语句, 可以将视图理解为存储起来的 ...
- 【转】CAD 二次开发--属性块 Block和BlockReference
1.属性块的定义 属性块是有构成的实体和附加信息(属性)组成的,属性块中块的定义与简单块中块的定义一样,而属性的定义主要是通过属性的AttributeDefinition类的有关属性和函数来实现的.具 ...
- Spring 内部机制 Spring AOP
https://my.oschina.net/zhangxufeng/blog/2219005 Spring Bean注册解析(一)和Spring Bean注册解析(二) 彻底征服 Spring AO ...
- 【GMT43智能液晶模块】例程十六:LAN_TCPS实验——以太网数据传输
源代码下载链接: 链接:https://pan.baidu.com/s/1e5Qp-xASjlA0pje3S7TdIg提取码:9v37 复制这段内容后打开百度网盘手机App,操作更方便哦 GMT43购 ...
- 使用Python解压zip、rar文件
解压 zip 文件 基本解压操作 import zipfile ''' 基本格式:zipfile.ZipFile(filename[,mode[,compression[,allowZip64]]]) ...
- 《设计模式》读懂UML类图
一.类中的主要关系 继承.实现.组合.聚合.依赖.关联 二.UML类图 三.代码实现 public class H2O { } public class O2 { } public interface ...
- CSS选择子简明参考
Type Selector Example h1 { } Description Selects an HTML tag/element. Universal selector Example * { ...
- Javascript / Nodejs call 和 apply
call: 改变了函数运行的作用域,即改变函数里面this的指向apply:同call,apply第二个参数是数组结构 例如: this.name = 'Ab'var obj = {name: 'BB ...
- Linux磁盘空间不足
Linux磁盘空间不足 描述:zabbix报警磁盘空间不足 1.登录服务器,查看磁盘空间 2.筛选空间占用的文件 层层筛选 3.将没用的文件删除 rm -f /opt/export/log/np_se ...