From fa3149cb89cb7d37f3502f9670dbe44d73330454 Mon Sep 17 00:00:00 2001 From: pashko Date: Mon, 23 Dec 2024 13:30:28 +0800 Subject: [PATCH] Add configs/prometheus-configs/prometheus.yaml --- configs/prometheus-configs/prometheus.yaml | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+) create mode 100644 configs/prometheus-configs/prometheus.yaml diff --git a/configs/prometheus-configs/prometheus.yaml b/configs/prometheus-configs/prometheus.yaml new file mode 100644 index 0000000..eee5033 --- /dev/null +++ b/configs/prometheus-configs/prometheus.yaml @@ -0,0 +1,42 @@ +# my global config +global: + scrape_interval: 15s # By default, scrape targets every 15 seconds. + evaluation_interval: 15s # By default, scrape targets every 15 seconds. + # scrape_timeout is set to the global default (10s). + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: 'dev-project' + +# Load and evaluate rules in this file every 'evaluation_interval' seconds. +# rule_files: +# - 'alert.rules' + # - "first.rules" + # - "second.rules" + +# alert +# alerting: +# alertmanagers: +# - scheme: http +# static_configs: +# - targets: +# - "alertmanager:9093" + +# 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=` to any timeseries scraped from this config. + - job_name: 'prometheus' + # Override the global default and scrape targets from this job every 5 seconds. + scrape_interval: 15s + static_configs: + - targets: ['localhost:9090'] + + - job_name: 'node-exporter-hosts' + scrape_interval: 5s + static_configs: + - targets: + - srv01:9100 + - srv02:9100 + - srv03:9100