From 186153bcac8c1ccc51ad39e1127c27ca766acba3 Mon Sep 17 00:00:00 2001 From: ziggy <zig@riseup.net> Date: Sat, 20 Apr 2019 15:10:11 -0400 Subject: [PATCH] add prometheus to docker-compose * include basic configuration file --- docker-compose.yml | 9 +++++++++ prometheus.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 37 insertions(+) create mode 100644 prometheus.yml diff --git a/docker-compose.yml b/docker-compose.yml index 10e332e..f49b779 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -78,3 +78,12 @@ services: - proxy-tier depends_on: - proxy + + prometheus: + image: prom/prometheus + container_name: prometheus + ports: + - 127.0.0.1:9090:9090 + volumes: + - ./prometheus.yml:/etc/prometheus/prometheus.yml + diff --git a/prometheus.yml b/prometheus.yml new file mode 100644 index 0000000..bfe4d04 --- /dev/null +++ b/prometheus.yml @@ -0,0 +1,28 @@ +# my global config +global: + scrape_interval: 15s + evaluation_interval: 15s + +# 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'] -- GitLab