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:从远程数据库读写
-
配置文件
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· .NET Core 中如何实现缓存的预热?
· 三行代码完成国际化适配,妙~啊~
· 阿里巴巴 QwQ-32B真的超越了 DeepSeek R-1吗?