init
This commit is contained in:
1 parent
1a04756647
commit
d8f857ab9e
3 files changed
+113
-1
No files matched your search
@@ -0,0 +1,36 @@
|
||||
# /data/PROMETHEUS/config/prometheus.yml
|
||||
global:
|
||||
scrape_interval: 15s
|
||||
|
||||
scrape_configs:
|
||||
- job_name: 'prometheus'
|
||||
static_configs:
|
||||
- targets: ['localhost:9090']
|
||||
|
||||
# Webserver
|
||||
- job_name: 'node_exporter_webserver'
|
||||
static_configs:
|
||||
- targets: ['152.53.159.169:8008']
|
||||
|
||||
- job_name: 'cadvisor_exporter_webserver'
|
||||
static_configs:
|
||||
- targets: ['152.53.159.169:8009']
|
||||
|
||||
# Mail Server
|
||||
- job_name: 'node_exporter_mailu'
|
||||
static_configs:
|
||||
- targets: ['159.195.49.220:8008']
|
||||
|
||||
- job_name: 'cadvisor_exporter_mailu'
|
||||
static_configs:
|
||||
- targets: ['159.195.49.220:8009']
|
||||
|
||||
# Game Server
|
||||
- job_name: 'node_exporter_minecraft'
|
||||
static_configs:
|
||||
- targets: ['152.53.162.220:8008']
|
||||
|
||||
- job_name: 'cadvisor_exporter_minecraft'
|
||||
static_configs:
|
||||
- targets: ['152.53.162.220:8009']
|
||||
|
||||
+7
-1
@@ -37,7 +37,7 @@ frontend https
|
||||
acl valid_method method PUT DELETE GET POST HEAD PATCH
|
||||
http-request deny if !valid_method
|
||||
|
||||
acl is_trusted src 178.19.224.210 80.153.174.251 153.92.79.159
|
||||
acl is_trusted src 178.19.224.210 80.153.174.251 153.92.79.159 152.53.159.169 159.195.49.220 152.53.162.220
|
||||
|
||||
stick-table type ip size 100k expire 30s store http_req_rate(60s)
|
||||
|
||||
@@ -54,10 +54,12 @@ frontend https
|
||||
acl is_portainer hdr(host) -i portainer.mrhossa.de
|
||||
acl is_homarr hdr(host) -i homarr.mrhossa.de
|
||||
acl is_vaultwarden hdr(host) -i vaultwarden.mrhossa.de
|
||||
acl is_grafana hdr(host) -i grafana.mrhossa.de
|
||||
|
||||
http-request deny if is_jenkins !is_trusted
|
||||
http-request deny if is_portainer !is_trusted
|
||||
http-request deny if is_homarr !is_trusted
|
||||
http-request deny if is_grafana !is_trusted
|
||||
|
||||
use_backend web_public if is_public
|
||||
use_backend web_backend if is_backend
|
||||
@@ -67,6 +69,7 @@ frontend https
|
||||
use_backend web_vaultwarden if is_vaultwarden
|
||||
use_backend web_portainer if is_portainer
|
||||
use_backend web_homarr if is_homarr
|
||||
use_backend web_grafana if is_grafana
|
||||
use_backend stats if is_stats
|
||||
|
||||
default_backend web_public
|
||||
@@ -97,6 +100,9 @@ backend web_portainer
|
||||
backend web_homarr
|
||||
server homarr 152.53.159.169:8006 check
|
||||
|
||||
backend web_grafana
|
||||
server grafana 152.53.159.169:8007 check
|
||||
|
||||
backend stats
|
||||
stats enable
|
||||
stats uri /
|
||||
|
||||
@@ -180,6 +180,76 @@ services:
|
||||
- "50000:50000"
|
||||
restart: always
|
||||
|
||||
prometheus:
|
||||
image: prom/prometheus:latest
|
||||
container_name: prometheus
|
||||
volumes:
|
||||
- ./CONFIGS/PROMETHEUS/:/etc/prometheus
|
||||
- ./PROMETHEUS/:/prometheus
|
||||
command:
|
||||
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||
- '--storage.tsdb.path=/prometheus'
|
||||
- '--storage.tsdb.retention.time=30d'
|
||||
networks:
|
||||
docker-net:
|
||||
ipv4_address: 172.30.0.20
|
||||
ports:
|
||||
- "127.0.0.1:9090:9090"
|
||||
restart: always
|
||||
|
||||
node-exporter:
|
||||
image: prom/node-exporter:latest
|
||||
container_name: node_exporter
|
||||
volumes:
|
||||
- /proc:/host/proc:ro
|
||||
- /sys:/host/sys:ro
|
||||
- /:/rootfs:ro
|
||||
command:
|
||||
- '--path.procfs=/host/proc'
|
||||
- '--path.sysfs=/host/sys'
|
||||
- '--path.rootfs=/rootfs'
|
||||
- '--collector.filesystem.mount-points-exclude=^/(sys|proc|dev|host|etc)($$|/)'
|
||||
networks:
|
||||
docker-net:
|
||||
ipv4_address: 172.30.0.21
|
||||
ports:
|
||||
- "8008:9100"
|
||||
restart: always
|
||||
|
||||
cadvisor:
|
||||
image: gcr.io/cadvisor/cadvisor:latest
|
||||
container_name: cadvisor
|
||||
volumes:
|
||||
- /:/rootfs:ro
|
||||
- /var/run:/var/run:ro
|
||||
- /sys:/sys:ro
|
||||
- /var/lib/docker/:/var/lib/docker:ro
|
||||
- /dev/disk/:/dev/disk:ro
|
||||
networks:
|
||||
docker-net:
|
||||
ipv4_address: 172.30.0.22
|
||||
ports:
|
||||
- "8009:8080"
|
||||
restart: always
|
||||
# Falls auf dem Host cgroup v2 läuft und Metriken fehlen/leer sind,
|
||||
# zusätzlich privileged: true setzen und /dev/kmsg:/dev/kmsg mounten.
|
||||
|
||||
grafana:
|
||||
image: grafana/grafana:latest
|
||||
container_name: grafana
|
||||
environment:
|
||||
- GF_SECURITY_ADMIN_USER=bruno
|
||||
- GF_SECURITY_ADMIN_PASSWORD=svHBaMujp0c7ZE5065
|
||||
- GF_USERS_ALLOW_SIGN_UP=false
|
||||
volumes:
|
||||
- ./GRAFANA/data:/var/lib/grafana
|
||||
ports:
|
||||
- "8007:3000"
|
||||
networks:
|
||||
docker-net:
|
||||
ipv4_address: 172.30.0.23
|
||||
restart: always
|
||||
|
||||
networks:
|
||||
docker-net:
|
||||
driver: bridge
|
||||
|
||||
Reference in new issue
Block a user