Prometheus 配置采集目标

1、根据配置的任务(job)以http/s周期性的收刮(scrape/pull)
2、指定目标(target)上的指标(metric)。目标(target)
3、可以以静态方式或者自动发现方式指定。Prometheus将收刮(scrape)的指标(metric)保存在本地或者远程存储上。

使用scrape_configs定义采集目标
配置一系列的目标,以及如何抓取它们的参数。一般情况下,每个scrape_config对应单个Job。
目标可以在scrape_config中静态的配置,也可以使用某种服务发现机制动态发现。

# 任务名称,自动作为抓取到的指标的一个标签
job_name: <job_name> # 抓取周期
[ scrape_interval: <duration> | default = <global_config.scrape_interval> ]
# 每次抓取的超时
[ scrape_timeout: <duration> | default = <global_config.scrape_timeout> ]
# 从目标抓取指标的URL路径
[ metrics_path: <path> | default = /metrics ]
# 当添加标签发现指标已经有同名标签时,是否保留原有标签不覆盖
[ honor_labels: <boolean> | default = false ]
# 抓取协议
[ scheme: <scheme> | default = http ]
# HTTP请求参数
params:
[ <string>: [<string>, ...] ] # 身份验证信息
basic_auth:
[ username: <string> ]
[ password: <secret> ]
[ password_file: <string> ]
# Authorization请求头取值
[ bearer_token: <secret> ]
# 从文件读取Authorization请求头
[ bearer_token_file: /path/to/bearer/token/file ] # TLS配置
tls_config:
[ <tls_config> ] # 代理配置
[ proxy_url: <string> ] # DNS服务发现配置
dns_sd_configs:
[ - <dns_sd_config> ... ]
# 文件服务发现配置
file_sd_configs:
[ - <file_sd_config> ... ]
# K8S服务发现配置
kubernetes_sd_configs:
[ - <kubernetes_sd_config> ... ] # 此Job的静态配置的目标列表
static_configs:
[ - <static_config> ... ] # 目标重打标签配置
relabel_configs:
[ - <relabel_config> ... ]
# 指标重打标签配置
metric_relabel_configs:
[ - <relabel_config> ... ] # 每次抓取允许的最大样本数量,如果在指标重打标签后,样本数量仍然超过限制,则整个抓取认为失败
# 0表示不限制
[ sample_limit: <int> | default = 0

Prometheus 配置采集目标的更多相关文章

  1. Prometheus指标采集常用配置

    一.node-exporter配置textfile收集器 textfile收集器作用: 运行暴露自定义指标.例如,需要在某个被监控节点上添加一个地理位置的指标. node-exporter会自动启动t ...

  2. prometheus配置

    本文主要记录下测试环境积累的prometheus配置信息,主要是k8s基本节点的配置和cadvisor的配置,方便以后使用做为参考 global: scrape_interval: 30s scrap ...

  3. 实用干货丨如何使用Prometheus配置自定义告警规则

    前 言 Prometheus是一个用于监控和告警的开源系统.一开始由Soundcloud开发,后来在2016年,它迁移到CNCF并且称为Kubernetes之后最流行的项目之一.从整个Linux服务器 ...

  4. prometheus 配置介绍

    prometheus 配置介绍 prometheus 配置分global.alerting.rule_files.scrape_configs 1.global(全局配置) scrape_interv ...

  5. prometheus配置pushgateway功能测试

    一.环境: 1.prometheus服务器ip:192.168.0.208 2.node-exporter客户机ip:192.168.0.202 二.测试设计考虑: pushgateway类似一台信息 ...

  6. prometheus 配置容器 cadvisor监控节点

    安装cadvisor docker run \ --volume=/:/roofs:ro \ --volume=/var/run:/var/run:rw \ --volume=/sys:/sys:ro ...

  7. prometheus配置简介

    参考网页:https://my.oschina.net/wangyunlong/blog/3060776 global: scrape_interval:             15s evalua ...

  8. prometheus配置详情

    https://prometheus.io/docs/prometheus/latest/configuration/configuration/ 下面监控宿主机和容器的内存,CPU,磁盘等状态 gr ...

  9. Prometheus样本采集器汇总

    系统基本信息 Linux Servers: Exporter https://github.com/prometheus/node_exporter Dashboard https://grafana ...

随机推荐

  1. c# 读取数据库得到dateset

    public DataSet GetCraftInformation(string connectionString, string opName, string productType)       ...

  2. 完整且易读的最新版小程序登录态和检验注册过没的app.js写法

    目录 0.可参考的官方页面 1.流程 2.app.js代码 3.java后台怎么通过code获取openId 0.可参考的官方页面 获取登录凭证:https://developers.weixin.q ...

  3. 在ubuntu更新时,出现错误E: Some index files failed to download, they have been ignored, or old ones used inst

    原文:https://blog.csdn.net/tian_ciomp/article/details/51339635 在ubuntu更新时,出现错误E: Some index files fail ...

  4. 使用vnc远程操控Centos7.6

    安装vncserver [root@elegant-snap-3 ~]# yum install tigervnc-server -y Loaded plugins: fastestmirror De ...

  5. Odoo form视图详解

    转载请注明原文地址:https://www.cnblogs.com/ygj0930/p/10826350.html 一:Header头部 header区域一般用于展示文档流转的阶段和生命周期,以及动作 ...

  6. The Preliminary Contest for ICPC Asia Shenyang 2019 F. Honk's pool

    题目链接:https://nanti.jisuanke.com/t/41406 思路:如果k的天数足够大,那么所有水池一定会趋于两种情况: ① 所有水池都是一样的水位,即平均水位 ② 最高水位的水池和 ...

  7. 爱奇艺 登录 加密字段 passwd 破解

    这是一个rsa加密,并且每次加密候的数据固定不变. 第一步:查看加密字段 第二步:搜索加密参数 第三步:打断点调试 1 2 3. 第四部:js调试工具调试 第五步:源码 function c(a) { ...

  8. Linux 命令 mv

    mv 命令 --no-target-directory 参数确保对目录进行重命名而不是移动 https://www.gnu.org/software/coreutils/manual/html_nod ...

  9. 云服务器使用: 为域名申请SSl证书

    注:咱们平时访问网站 有的是http  有的是 https https就是说使用了SSL访问 然后就是等着..... 假设可以了 然后就会有各个软件使用的证书,然后根据自己安装的软件下载证书

  10. Python——IO多路复用之select模块select方法

    Python——IO多路复用之select模块select方法 使用select模块的select方法实现Python——IO多路复用 实现同时将终端输入的文本以及客户端传输的文本写入文本文件中: w ...