diff --git a/.env b/.env index e3c935e..9742ddf 100644 --- a/.env +++ b/.env @@ -2,4 +2,9 @@ DB_ROOT_PW=340985asdfklweo20350~ REDIS_PW=230skdfjl~23409 NEXTCLOUD_ADMIN_USER=chris -NEXTCLOUD_ADMIN_PW=lmaa,dw. \ No newline at end of file +NEXTCLOUD_ADMIN_PW=lmaa,dw. + +# InfluxDB options +INFLUXDB_DB=influx +INFLUXDB_ADMIN_USER=admin +INFLUXDB_ADMIN_PASSWORD=admin diff --git a/monitoring/docker-compose.yaml b/monitoring/docker-compose.yaml index 02f441e..2b12730 100644 --- a/monitoring/docker-compose.yaml +++ b/monitoring/docker-compose.yaml @@ -15,6 +15,10 @@ volumes: name: netdatacache apc: name: apc + telegraf: + name: telegraf + influxdb: + name: influxdb services: netdata: @@ -24,6 +28,10 @@ services: restart: unless-stopped cap_add: - SYS_PTRACE + environment: + - NETDATA_CLAIM_TOKEN=whnDRS4-Z0fJH9P2Y01jHXeBKb6cpzIxsRsFFiuCbE0u_QhDciI4V8NrftAmu8YnWDd9KRX5-bGlU8G_s7F-Ux6lYVkVtdqdjXRPfiTMm4JN8wpJGnm2CedKAP7FiFIp8spaLx4 + - NETDATA_CLAIM_URL=https://app.netdata.cloud + - NETDATA_CLAIM_ROOMS=a427cb5f-a572-4bbf-90d8-ad97144960c1 security_opt: - apparmor:unconfined volumes: @@ -68,5 +76,51 @@ services: - "traefik.http.routers.apc.service=apc" - "traefik.http.services.apc.loadbalancer.server.port=80" - "com.centurylinklabs.watchtower.enable=false" + ports: + - "3551:3551/tcp" + - "3551:3551/udp" + + telegraf: + image: telegraf:alpine + container_name: telegraf + networks: + - internal + volumes: + - telegraf:/etc/telegraf/ + depends_on: + - influxdb + + influxdb: + image: influxdb:alpine + container_name: influxdb + env_file: ../.env + volumes: + - influxdb:/var/lib/influxdb + networks: + - proxy + - internal + labels: + - "traefik.enable=true" + - "traefik.http.routers.influx.rule=Host(`influx.lan`)" + - "traefik.http.routers.influx.entrypoints=web" + - "traefik.http.routers.influx.service=influx" + - "traefik.http.services.influx.loadbalancer.server.port=8086" + + grafana: + image: grafana/grafana-oss + container_name: grafana + hostname: grafana.lan + restart: unless-stopped + depends_on: + - influxdb + networks: + - proxy + - internal + labels: + - "traefik.enable=true" + - "traefik.http.routers.grafana.rule=Host(`grafana.lan`)" + - "traefik.http.routers.grafana.entrypoints=web" + - "traefik.http.routers.grafana.service=grafana" + - "traefik.http.services.grafana.loadbalancer.server.port=3000"