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

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

@ -2,6 +2,9 @@
hosts: lotus-land-story
vars_files:
- vars.yml
vars:
prometheus_version: v2.43.0
cadvisor_version: v0.49.1
tasks:
- name: Install host exporters
@ -54,10 +57,8 @@
- name: Run Prometheus
community.docker.docker_container:
# recreate: true
# restart: true
name: prometheus
image: prom/prometheus:v2.43.0
image: prom/prometheus:{{ prometheus_version }}
command:
- --config.file=/etc/prometheus/prometheus.yml
- --storage.tsdb.retention.size=5GB
@ -74,4 +75,18 @@
etc_hosts:
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

@ -133,10 +133,6 @@ docs.kejadlen.dev {
}
}
logs.kejadlen.dev
reverse_proxy parseable:8000
}
hey.kejadlen.dev
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

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

Loading…
Cancel
Save