From 70b1ccb4584120dc23a123f19e7efa6cde44928a Mon Sep 17 00:00:00 2001 From: czarly <379651+czarly@users.noreply.github.com> Date: Mon, 14 Mar 2022 17:59:30 +0400 Subject: [PATCH] fix the monitoring to come up --- prometheus/prometheus-autodiscover.yml | 34 ++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 prometheus/prometheus-autodiscover.yml diff --git a/prometheus/prometheus-autodiscover.yml b/prometheus/prometheus-autodiscover.yml new file mode 100644 index 00000000..8b8e828a --- /dev/null +++ b/prometheus/prometheus-autodiscover.yml @@ -0,0 +1,34 @@ +global: + scrape_interval: 15s + evaluation_interval: 15s + + # Attach these labels to any time series or alerts when communicating with + # external systems (federation, remote storage, Alertmanager). + external_labels: + monitor: 'docker-host-alpha' + +# Load and evaluate rules in this file every 'evaluation_interval' seconds. +rule_files: + - "alert.rules" + +# A scrape configuration containing exactly one endpoint to scrape. +scrape_configs: + - job_name: 'nodeexporter' + scrape_interval: 5s + static_configs: + - targets: ['nodeexporter:9100'] + + - job_name: 'cadvisor' + scrape_interval: 5s + static_configs: + - targets: ['cadvisor:8080'] + + - job_name: 'prometheus' + scrape_interval: 10s + static_configs: + - targets: ['localhost:9090'] + + - job_name: 'service_discovery' + file_sd_configs: + - files: + - '/prometheus-docker-sd/docker-targets.json'