首页 > 其他分享 >prometheus-主配置文件详解

prometheus-主配置文件详解

时间:2022-12-05 14:13:50浏览次数:43  
标签:interval 配置文件 global job scrape prometheus 详解

1. prometheus-主配置文件详解

  • 主机配置文件详解

    [root@iZj6cbgktk3zjpge312vq2Z prometheus]# cat prometheus.yml
    # my global config
    # 全局配置
    global:
      scrape_interval:     15s  # 采集数据时间间隔
      evaluation_interval: 15s  # 每15秒评估规则。默认为1分钟。
      scrape_timeout: 5s  # 采集数据超时时间,默认10秒
      # scrape_timeout is set to the global default (10s).
    
    # Alertmanager configuration   告警配置
    alerting:
      alertmanagers:
      - static_configs:
        - targets:
          # - alertmanager:9093
    
    # Load rules once and periodically evaluate them according to the global 'evaluation_interval'.
    rule_files:
      # - "first_rules.yml"
      # - "second_rules.yml"
    
    # A scrape configuration containing exactly one endpoint to scrape:
    # Here it's Prometheus itself.
    scrape_configs:
      # The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.
      - job_name: 'prometheus'
    
        # metrics_path defaults to '/metrics'
        # scheme defaults to 'http'.
    
        static_configs:
        - targets: ['localhost:9090']
    
    
    global:全局配置
    	scrape_interval: 15s # 采集数据时间间隔
    	evaluation_interval: 15s # 评估告警规则时间间隔,默认1分钟
    	scrape_timeout:5s # 采集数据超时时间,默认10秒
    
    rule_files:告警规则
    scrape_configs:配置被监控端,称为target,每个target用job_name分组管理,又分为静态配置和服务发现
    alerting:告警配置
    remote_write/remote_read:从远程数据库读写
    
  • 配置文件
    image

标签:interval,配置文件,global,job,scrape,prometheus,详解
From: https://www.cnblogs.com/scajy/p/16952115.html

相关文章

  • MySQL优化详解
    1.MySQL简介MySQL是一个关系型数据库管理系统,由瑞典MySQLAB公司开发,目前属于Oracle公司。Mysql是开源的,可以定制的,采用了GPL协议,你可以修改源码来开发自己的Mysql系......
  • 类项目中的配置文件app.config在打包安装后的信息获取的问题
    在一个项目中碰到这样的一个问题,做一个WORD插件,功能在类库项目中实现了,配置信息存在类库项目的配置文件app.config中,在进行打包后,获取的配置文件中的DocType节点信息时,使用......
  • 苹果app开发流程详解​
    ​苹果AppStore上传应用流程详解,在向AppStore提交应用之前,开发者首先要成为苹果iOS开发者项目的成员,每年向苹果缴纳99美元或199美元的费用(具体申请方法后期更新)。​免688......
  • 扒一扒使用boostrap-fileinput上传插件遇到的坑,Bootstrap-fileinput上传插件的使用详
    扒一扒使用boostrap-fileinput上传插件遇到的坑,Bootstrap-fileinput上传插件的使用详解,「建议收藏」发布于2022-06-2611:56:21阅读 3970 由于公司项目的需求,......
  • spring-boot-@Valid和@Validated详解
    ----------------------------------------------------------------------------------------在实际的项目开发中,经常会遇到对参数进行校验的场景,最常见的就是后端需要对......
  • 详解 Redis 中 big keys 发现和解决
    在使用Redis时,可能会出现请求响应慢、网络卡顿、数据丢失的情况。排查问题的时候,发现是bigkeys的问题。什么是bigkeys在Redis中,一个字符串类型最大可以达到512......
  • line height详解
    lineheightlineheight是由行与行之间的基线表现出来的lineheight设置的越小,基线距离就越小,lineheight设置的越大,基线距离就设置的越大line-height:30px;行距=l......
  • C++中STL容器详解
    STL是提高C++编写效率的一个利器。——闫学灿一.string参考文章C语言中文网文章:C++string详解,C++字符串详解介绍C语言中,字符串是以\0结尾的一些字符的集合,为了操......
  • React中的函数组件详解
    转载来自(47条消息)React中的函数组件详解_『荼』的博客-CSDN博客_react函数组件1.创建方式//写法一constHello=(props)=>{return<div>{props......
  • 转 Vue生命周期函数详解
     https://blog.csdn.net/wen110898/article/details/120520844?spm=1001.2101.3001.6650.1&utm_medium=distribute.pc_relevant.none-task-blog-2~default~CTRLIST~Rate-......