From 1459bbcbae9e88cef6a80e27f6d3794ba1db8377 Mon Sep 17 00:00:00 2001 From: BBaoVanC Date: Mon, 2 Aug 2021 03:07:59 -0500 Subject: [PATCH] Add prometheus.yml --- conf/prometheus.yml | 65 +++++++++++++++++++++++++++++++++++++++++++++ docker-compose.yml | 2 +- 2 files changed, 66 insertions(+), 1 deletion(-) create mode 100644 conf/prometheus.yml diff --git a/conf/prometheus.yml b/conf/prometheus.yml new file mode 100644 index 0000000..71214ec --- /dev/null +++ b/conf/prometheus.yml @@ -0,0 +1,65 @@ +scrape_configs: + - job_name: "caddy" + scrape_interval: 15s + static_configs: + - targets: ["host.docker.internal:2020"] + labels: + instance: "boba.best" + + - job_name: "synapse" + scrape_interval: 15s + metrics_path: "/_synapse/metrics" + static_configs: + - targets: ["synapse_synapse:8008"] + labels: + instance: "matrix.boba.best" + job: "master" + index: 1 + + - targets: ["synapse_generic1:8008"] + labels: + instance: "matrix.boba.best" + job: "generic_worker" + index: 1 + - targets: ["synapse_generic2:8008"] + labels: + instance: "matrix.boba.best" + job: "generic_worker" + index: 2 + - targets: ["synapse_generic3:8008"] + labels: + instance: "matrix.boba.best" + job: "generic_worker" + index: 3 + - targets: ["synapse_generic4:8008"] + labels: + instance: "matrix.boba.best" + job: "generic_worker" + index: 4 + + - targets: ["synapse_sender1:8008"] + labels: + instance: "matrix.boba.best" + job: "federation_sender" + index: 1 + - targets: ["synapse_sender2:8008"] + labels: + instance: "matrix.boba.best" + job: "federation_sender" + index: 2 + - targets: ["synapse_sender3:8008"] + labels: + instance: "matrix.boba.best" + job: "federation_sender" + index: 3 + - targets: ["synapse_sender4:8008"] + labels: + instance: "matrix.boba.best" + job: "federation_sender" + index: 4 + + - targets: ["synapse_media:8008"] + labels: + instance: "matrix.boba.best" + job: "media_repository" + index: 1 diff --git a/docker-compose.yml b/docker-compose.yml index 0bdf413..2bc8012 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -40,7 +40,7 @@ services: command: - --config.file=/etc/prometheus/prometheus.yml volumes: - - ./data/prometheus.yml:/etc/prometheus/prometheus.yml + - ./conf/prometheus.yml:/etc/prometheus/prometheus.yml - ./data/prometheus:/prometheus extra_hosts: - "host.docker.internal:host-gateway"