main
Alpha Chen 2 months ago
parent 56b40374f1
commit c2df59b2e9
Signed by: alpha
SSH Key Fingerprint: SHA256:3fOT8fiYQG/aK9ntivV3Bqtg8AYQ7q4nV6ZgihOA20g

@ -2,6 +2,8 @@
hosts: lotus-land-story hosts: lotus-land-story
vars_files: vars_files:
- vars.yml - vars.yml
vars:
version: 9.2.15
tasks: tasks:
- name: Create Grafana dir - name: Create Grafana dir
@ -68,7 +70,7 @@
# recreate: true # recreate: true
# restart: true # restart: true
name: grafana name: grafana
image: grafana/grafana-oss:9.2.15 image: grafana/grafana-oss:{{ version }}
# ports: # ports:
# - "3000:3000" # - "3000:3000"
volumes: volumes:

@ -2,6 +2,9 @@
hosts: lotus-land-story hosts: lotus-land-story
vars_files: vars_files:
- vars.yml - vars.yml
vars:
prometheus_version: v2.43.0
cadvisor_version: v0.49.1
tasks: tasks:
- name: Install host exporters - name: Install host exporters
@ -54,10 +57,8 @@
- name: Run Prometheus - name: Run Prometheus
community.docker.docker_container: community.docker.docker_container:
# recreate: true
# restart: true
name: prometheus name: prometheus
image: prom/prometheus:v2.43.0 image: prom/prometheus:{{ prometheus_version }}
command: command:
- --config.file=/etc/prometheus/prometheus.yml - --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.size=5GB - --storage.tsdb.retention.size=5GB
@ -74,4 +75,18 @@
etc_hosts: etc_hosts:
host.docker.internal: host-gateway host.docker.internal: host-gateway
- name: Run cAdvisor
community.docker.docker_container:
name: cadvisor
image: gcr.io/cadvisor/cadvisor:{{ cadvisor_version }}
restart: true
volumes:
- /:/rootfs:ro
- /var/run:/var/run:rw
- /sys:/sys:ro
- /var/lib/docker/:/var/lib/docker:ro
restart_policy: unless-stopped
networks:
- name: lotus_land_story
# vim: ft=yaml.ansible # vim: ft=yaml.ansible

@ -133,10 +133,6 @@ docs.kejadlen.dev {
} }
} }
logs.kejadlen.dev
reverse_proxy parseable:8000
}
hey.kejadlen.dev hey.kejadlen.dev
reverse_proxy gotosocial:8080 reverse_proxy gotosocial:8080
@ -145,4 +141,18 @@ hey.kejadlen.dev
} }
} }
cadvisor.kejadlen.dev {
forward_auth authelia:9091 {
uri /api/verify?rd=https://auth.{{ domain }}
copy_headers Remote-User
# This import needs to be included if you're relying on a trusted proxies configuration.
import trusted_proxy_list
}
reverse_proxy cadvisor:8080 {
import trusted_proxy_list
}
}
# vim: ts=4 # vim: ts=4

@ -78,3 +78,9 @@ scrape_configs:
password: {{ prometheus.gotosocial.password }} password: {{ prometheus.gotosocial.password }}
static_configs: static_configs:
- targets: ['gotosocial:8080'] - targets: ['gotosocial:8080']
- job_name: cadvisor
scrape_interval: 5s
static_configs:
- targets:
- cadvisor:8080

Loading…
Cancel
Save