global: 此片段指定的是prometheus的全局配置, 比如采集间隔,抓取超时时间等。 rule_files: 此片段指定报警规则文件, prometheus根据这些规则信息,会推送报警信息到alertmanager中。 scrape_configs: 此片段指定抓取配置,prometheus的数据采集通过此片段配置。 alerting: 此片段指定报警配置, 这里主要是指定prometheus将报警规...
1.6<openstack_sd_config> 1.7<file_sd_config> 1.8<dns_sd_config> 1.9<gce_sd_config> 2.0<kubernetes_sd_config> 2.1<marathon_sd_config> 2.2<nerve_sd_config> 2.3<serverset_sd_config> 2.4<triton_sd_config> 2.5<static_config> static_config允许指定目标列表和它们的公共标签集,这是在scrape配置中...
global: 此片段指定的是prometheus的全局配置, 比如采集间隔,抓取超时时间等。 rule_files: 此片段指定报警规则文件, prometheus根据这些规则信息,会推送报警信息到alertmanager中。 scrape_configs: 此片段指定抓取配置,prometheus的数据采集通过此片段配置。 alerting: 此片段指定报警配置, 这里主要是指定prometheus将报警规...
动态注册:动态注册就是在 Prometheus yaml 文件的 scrape_configs 配置下配置服务发现的地址和服务名,Prometheus 会去该地址,根据你提供的服务名动态发现实例列表,在 Prometheus 中,支持 Consul、DNS、文件、Kubernetes 等多种服务发现机制。 基于Consul 的服务发现: - job_name:"node_export_consul" metrics_path: ...
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. ...
第一段代码是放在prometheus.yml的scrape_config内,第二段代码是保存在/opt/prometheus/monitor_config/目录下,名称可以写被监控的机器ip文件为yml文件,如10.172.12.12.yml - job_name: 'zx_host' file_sd_configs: - files: ['/opt/prometheus/monitor_config/*.yml'] refresh_interval: 5s ...
scrape_interval: 1m evaluation_interval: 1m external_labels: environment: production scrape_timeout: 10s alerting: alertmanagers: - static_configs: - targets: ['localhost:9093'] rule_files: - "/opt/bitnami/prometheus/rules/*rule.yml"
scrape_interval:采集被监控服务数据周期,默认1min采集一次; scrape_timeou:采集数据超时时间,默认10s; evaluation_interval:告警评估周期,默认1min; rule_files:监控告警规则 scrape_config:配置被监控指标 alerting alert_relabel_configs:告警重打标签 alertmanagers:告警组件链接地址 ...
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. ...
['alertmanager:9093']#指定alertmanagerrule_files:-"/etc/prometheus/rules/*.rules"#告警规则定义文件scrape_configs:# The job name is added as a label `job=<job_name>` to any timeseries scraped from this config.-job_name:'prometheus'static_configs:-targets:['prometheus:9090']#拉取prometheus...