From 72c2215c1baaf5b4f009da982147ade64fd2e0f5 Mon Sep 17 00:00:00 2001 From: Didier Date: Sat, 4 Mar 2023 19:14:06 +0100 Subject: [PATCH] segregate monitoring --- docker-compose.monitoring.yml | 35 +++++++++++++++++++++++++++++++++++ docker-compose.utils.yml | 33 +-------------------------------- 2 files changed, 36 insertions(+), 32 deletions(-) create mode 100644 docker-compose.monitoring.yml diff --git a/docker-compose.monitoring.yml b/docker-compose.monitoring.yml new file mode 100644 index 0000000..cb1df55 --- /dev/null +++ b/docker-compose.monitoring.yml @@ -0,0 +1,35 @@ +version: '2.2' + +networks: + metrics: + +services: + + prometheus: + build: + context: ./custom/prometheus + networks: + - metrics + extra_hosts: + - "docker.host:host-gateway" + + prom-blackbox: + image: prom/blackbox-exporter:latest + networks: + - metrics + - internal + + ## THIS CONTANIER IS AVAILABLE ON THE HOST ## + node-exporter: + image: quay.io/prometheus/node-exporter:latest + container_name: node-exporter + command: + - '--path.rootfs=/host' + network_mode: host + pid: host + restart: unless-stopped + volumes: + - '/:/host:ro,rslave' + cap_add: + - SYS_TIME + diff --git a/docker-compose.utils.yml b/docker-compose.utils.yml index a5b469a..1e49228 100644 --- a/docker-compose.utils.yml +++ b/docker-compose.utils.yml @@ -110,34 +110,6 @@ services: - metrics - internal - prometheus: - build: - context: ./custom/prometheus - networks: - - metrics - extra_hosts: - - "docker.host:host-gateway" - - prom-blackbox: - image: prom/blackbox-exporter:latest - networks: - - metrics - - internal - - ## THIS CONTANIER IS AVAILABLE ON THE HOST ## - node-exporter: - image: quay.io/prometheus/node-exporter:latest - container_name: node-exporter - command: - - '--path.rootfs=/host' - network_mode: host - pid: host - restart: unless-stopped - volumes: - - '/:/host:ro,rslave' - cap_add: - - SYS_TIME - kasm: image: lscr.io/linuxserver/kasm:latest container_name: kasm @@ -193,7 +165,4 @@ services: volumes: - /srv/shlink/data:/var/lib/mysql networks: - - internal - -networks: - metrics: \ No newline at end of file + - internal \ No newline at end of file