Skip to content

Commit

Permalink
Remove prom cadvisor (#448)
Browse files Browse the repository at this point in the history
* Return removed staging CA for letsenrypt

* Fix missing $

* Remove PAYMENTS_AUTORECHARGE_DEFAULT_MIN_BALANCE

* Remove cadvisor
  • Loading branch information
YuryHrytsuk authored Nov 21, 2023
1 parent e7e47a5 commit 45199b1
Show file tree
Hide file tree
Showing 8 changed files with 36 additions and 211 deletions.
26 changes: 8 additions & 18 deletions services/monitoring/docker-compose.aws.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,13 @@
version: "3.7"
services:
cadvisor-exporter:
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro

prometheuscatchall:
dns: 8.8.8.8
deploy:
Expand All @@ -11,17 +19,6 @@ services:
memory: 24576M
reservations:
memory: 24576M
prometheuscadvisor:
dns: 8.8.8.8
deploy:
placement:
constraints:
- node.labels.prometheuscadvisor==true
resources:
limits:
memory: 4096M
reservations:
memory: 4096M
prometheusfederation:
dns: 8.8.8.8
deploy:
Expand All @@ -39,10 +36,3 @@ services:
placement:
constraints:
- node.labels.grafana==true
cadvisor-exporter:
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro
8 changes: 3 additions & 5 deletions services/monitoring/docker-compose.dalco.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
version: '3.7'
services:

cadvisor-exporter:
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro

grafana:
dns: 8.8.8.8
deploy:
Expand All @@ -19,11 +21,7 @@ services:
placement:
constraints:
- node.labels.prometheus==true
prometheuscadvisor:
deploy:
placement:
constraints:
- node.labels.prometheus==true

prometheusfederation:
deploy:
placement:
Expand Down
4 changes: 0 additions & 4 deletions services/monitoring/docker-compose.letsencrypt.dns.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,3 @@ services:
deploy:
labels:
- traefik.http.routers.prometheusfederation.tls.certresolver=myresolver
# prometheuscadvisor:
# deploy:
# labels:
# - traefik.http.routers.prometheus.tls.certresolver=myresolver
5 changes: 0 additions & 5 deletions services/monitoring/docker-compose.letsencrypt.http.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,3 @@ services:
deploy:
labels:
- traefik.http.routers.prometheusfederation.tls.certresolver=lehttpchallenge
# prometheuscadvisor:
# deploy:
# placement:
# constraints:
# - traefik.http.routers.prometheus.tls.certresolver=lehttpchallenge
6 changes: 0 additions & 6 deletions services/monitoring/docker-compose.master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ services:
deploy:
placement:
constraints:
- node.labels.prometheus==true
prometheuscadvisor:
deploy:
placement:
constraints:
- node.labels.prometheus==true
prometheusfederation:
deploy:
placement:
Expand Down
7 changes: 2 additions & 5 deletions services/monitoring/docker-compose.public.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ services:
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
- /dev/disk/:/dev/disk:ro

grafana:
dns: 8.8.8.8
deploy:
Expand All @@ -19,11 +20,7 @@ services:
placement:
constraints:
- node.labels.prometheus==true
prometheuscadvisor:
deploy:
placement:
constraints:
- node.labels.prometheus==true

prometheusfederation:
deploy:
placement:
Expand Down
99 changes: 23 additions & 76 deletions services/monitoring/docker-compose.yml.j2
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ volumes:
prometheus_data: {}
grafana_data: {}
alertmanager_data: {}
prometheus_data_cadvisor: {}
prometheus_data_federation: {}

networks:
Expand All @@ -25,8 +24,6 @@ configs:
file: ./node-exporter/docker-entrypoint.sh
prometheus_config:
file: ./prometheus/prometheus.yml
prometheus_config_cadvisor:
file: ./prometheus/prometheus-cadvisor.yml
prometheus_config_federation:
file: ./prometheus/prometheus-federation.yml
prometheus_rules:
Expand All @@ -38,6 +35,29 @@ configs:
smokeping_prober_config:
file: ./smokeping_prober_config.yaml
services:
cadvisor-exporter:
image: gcr.io/cadvisor/cadvisor:v0.47.2
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
networks:
- internal
- monitored
command: --logtostderr --docker_only --allow_dynamic_housekeeping=true
deploy:
labels:
- prometheus-job=cadvisor
- prometheus-port=8080
mode: global
resources:
limits:
memory: 256M
cpus: "0.5"
reservations:
memory: 128M
cpus: "0.1"
prometheuscatchall:
hostname: "{% raw %}{{.Service.Name}}{% endraw %}"
image: prom/prometheus:v2.47.2
Expand Down Expand Up @@ -132,55 +152,6 @@ services:
reservations:
memory: 2048M
cpus: "0.2"
prometheuscadvisor:
hostname: "{% raw %}{{.Service.Name}}{% endraw %}"
image: prom/prometheus:v2.47.2
volumes:
- prometheus_data_cadvisor:/prometheus
- /var/run/docker.sock:/var/run/docker.sock:ro
user: root # only user root can use the docker socket
configs:
- source: prometheus_config_cadvisor
target: /etc/prometheus/prometheus.yml
- source: prometheus_rules
target: /etc/prometheus/prometheus.rules.yml
command:
- "--config.file=/etc/prometheus/prometheus.yml"
- "--storage.tsdb.path=/prometheus"
- "--storage.tsdb.retention=30d"
- "--web.console.libraries=/usr/share/prometheus/console_libraries"
- "--web.console.templates=/usr/share/prometheus/consoles"
- "--web.external-url=https://${MONITORING_DOMAIN}/prometheuscadvisor/"
- "--web.route-prefix=/"
- "--storage.tsdb.allow-overlapping-blocks" # via https://jessicagreben.medium.com/prometheus-fill-in-data-for-new-recording-rules-30a14ccb8467
#- "--web.enable-admin-api" This allows messing with prometheus using its API from the CLI. Disabled for security reasons by default.
networks:
- internal
- monitored
- public
extra_hosts: []
deploy:
replicas: 0
labels:
- traefik.enable=true
- traefik.docker.network=${PUBLIC_NETWORK}
# direct access through port
- traefik.http.services.prometheuscadvisor.loadbalancer.server.port=${MONITORING_PROMETHEUS_PORT}
- traefik.http.routers.prometheuscadvisor.rule=Host(`${MONITORING_DOMAIN}`) && PathPrefix(`/prometheuscadvisor`)
- traefik.http.routers.prometheuscadvisor.entrypoints=https
- traefik.http.routers.prometheuscadvisor.tls=true
- traefik.http.middlewares.prometheuscadvisor_stripprefixregex.stripprefixregex.regex=^/prometheuscadvisor
- traefik.http.routers.prometheuscadvisor.middlewares=ops_whitelist_ips@docker, ops_auth@docker, ops_gzip@docker, prometheuscadvisor_stripprefixregex
- prometheus-job=prometheuscadvisor
- prometheus-port=${MONITORING_PROMETHEUS_PORT}
resources:
limits:
memory: 4096M
cpus: "1"
reservations:
memory: 2048M
cpus: "0.2"

node-exporter:
image: prom/node-exporter:v1.6.1
volumes:
Expand Down Expand Up @@ -265,30 +236,6 @@ services:
memory: 16M
cpus: "0.1"

cadvisor-exporter:
image: gcr.io/cadvisor/cadvisor:v0.47.2
volumes:
- /:/rootfs:ro
- /var/run:/var/run:ro
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
networks:
- internal
- monitored
command: --logtostderr --docker_only --allow_dynamic_housekeeping=true
deploy:
labels:
- prometheus-job=cadvisor
- prometheus-port=8080
mode: global
resources:
limits:
memory: 256M
cpus: "0.5"
reservations:
memory: 128M
cpus: "0.1"

docker-events-exporter:
image: itisfoundation/docker-events-exporter:latest
volumes:
Expand Down
92 changes: 0 additions & 92 deletions services/monitoring/prometheus/prometheus-cadvisor.yml

This file was deleted.

0 comments on commit 45199b1

Please sign in to comment.