ADD Prometheus, grafana config (non working lol)
This commit is contained in:
parent
cba188f8ea
commit
8243addc8d
@ -6,8 +6,8 @@ services:
|
|||||||
image: "traefik:latest"
|
image: "traefik:latest"
|
||||||
container_name: "traefik"
|
container_name: "traefik"
|
||||||
command:
|
command:
|
||||||
# - "--log.level=DEBUG"
|
# - "--log.level=DEBUG" # disable in prod
|
||||||
- "--api.insecure=true"
|
- "--api.insecure=true" # disable in prod
|
||||||
- "--providers.docker=true"
|
- "--providers.docker=true"
|
||||||
- "--providers.docker.exposedbydefault=false"
|
- "--providers.docker.exposedbydefault=false"
|
||||||
- "--providers.file.directory=/etc/traefik/dynamic_conf.d"
|
- "--providers.file.directory=/etc/traefik/dynamic_conf.d"
|
||||||
@ -38,8 +38,31 @@ services:
|
|||||||
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
- "traefik.http.services.grafana.loadbalancer.server.port=3000"
|
||||||
depends_on:
|
depends_on:
|
||||||
- traefik
|
- traefik
|
||||||
#networks:
|
restart: unless-stopped
|
||||||
# - traefik-net
|
environment:
|
||||||
|
- GF_SECURITY_ADMIN_USER=admin
|
||||||
|
- GF_SECURITY_ADMIN_PASSWORD=grafana
|
||||||
|
volumes:
|
||||||
|
- ./grafana:/etc/grafana/provisioning/datasources
|
||||||
|
|
||||||
|
prometheus:
|
||||||
|
image: "prom/prometheus:latest"
|
||||||
|
container_name: "prometheus"
|
||||||
|
command:
|
||||||
|
- '--config.file=/etc/prometheus/prometheus.yml'
|
||||||
|
restart: unless-stopped
|
||||||
|
volumes:
|
||||||
|
- ./prometheus:/etc/prometheus
|
||||||
|
- prom_data:/prometheus
|
||||||
|
#labels: # We might want to reserve this interface to a closed network
|
||||||
|
# - "traefik.enable=true"
|
||||||
|
# - "traefik.http.routers.prometheus.rule=Host(`prom.clps.ch`)"
|
||||||
|
# - "traefik.http.routers.prometheus.entrypoints=https"
|
||||||
|
# - "traefik.http.routers.prometheus.tls.certresolver=letsencrypt"
|
||||||
|
# - "traefik.http.routers.prometheus.tls=true"
|
||||||
|
# - "traefik.http.services.prometheus.loadbalancer.server.port=9090"
|
||||||
|
depends_on:
|
||||||
|
- traefik
|
||||||
|
|
||||||
nextcloud:
|
nextcloud:
|
||||||
image: "nextcloud/all-in-one:latest"
|
image: "nextcloud/all-in-one:latest"
|
||||||
@ -49,8 +72,8 @@ services:
|
|||||||
- "APACHE_PORT=11000"
|
- "APACHE_PORT=11000"
|
||||||
- "APACHE_IP_BINDING=0.0.0.0"
|
- "APACHE_IP_BINDING=0.0.0.0"
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "8080:8080" # disable in prod
|
||||||
- "8443:8443"
|
- "8443:8443" # disable in prod
|
||||||
volumes:
|
volumes:
|
||||||
- "nextcloud_aio_mastercontainer:/mnt/docker-aio-config"
|
- "nextcloud_aio_mastercontainer:/mnt/docker-aio-config"
|
||||||
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
- "/var/run/docker.sock:/var/run/docker.sock:ro"
|
||||||
@ -60,4 +83,4 @@ services:
|
|||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
nextcloud_aio_mastercontainer:
|
nextcloud_aio_mastercontainer:
|
||||||
|
prom_data:
|
||||||
|
21
grafana/datasource.yml
Normal file
21
grafana/datasource.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
evaluation_interval: 15s
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- static_configs:
|
||||||
|
- targets: []
|
||||||
|
scheme: http
|
||||||
|
timeout: 10s
|
||||||
|
api_version: v1
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: prometheus
|
||||||
|
honor_timestamps: true
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
metrics_path: /metrics
|
||||||
|
scheme: http
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- prometheus:9090
|
21
prometheus/prometheus.yml
Normal file
21
prometheus/prometheus.yml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
global:
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
evaluation_interval: 15s
|
||||||
|
alerting:
|
||||||
|
alertmanagers:
|
||||||
|
- static_configs:
|
||||||
|
- targets: []
|
||||||
|
scheme: http
|
||||||
|
timeout: 10s
|
||||||
|
api_version: v2
|
||||||
|
scrape_configs:
|
||||||
|
- job_name: prometheus
|
||||||
|
honor_timestamps: true
|
||||||
|
scrape_interval: 15s
|
||||||
|
scrape_timeout: 10s
|
||||||
|
metrics_path: /metrics
|
||||||
|
scheme: http
|
||||||
|
static_configs:
|
||||||
|
- targets:
|
||||||
|
- localhost:9090
|
Loading…
Reference in New Issue
Block a user