Merge branch 'main' of git.hamburg.ccc.de:CCCHH/ansible-infra
Some checks failed
/ Ansible Lint (push) Failing after 2m5s

This commit is contained in:
Stefan Bethke 2025-06-02 21:12:10 +02:00
commit 15e200d96d
12 changed files with 449 additions and 6 deletions

View file

@ -3,13 +3,15 @@
# - https://github.com/prometheus/alertmanager/blob/48a99764a1fc9279fc828de83e7a03ae2219abc7/doc/examples/simple.yml
route:
group_by: ["alertname", "site", "type", "hypervisor"]
receiver: 'ccchh-infrastructure-alerts'
group_by: [ "alertname", "site", "type", "hypervisor" ]
group_wait: 30s
group_interval: 5m
repeat_interval: 3h
receiver: ccchh-infrastructure-alerts
routes:
- matchers:
- org="ccchh"
receiver: 'ccchh-infrastructure-alerts'
{# Disable these for now, but might be interesting in the future.

View file

@ -22,7 +22,7 @@ Links & Resources
{{ define "alert-message.telegram.ccchh" }}
{{- if .Alerts.Firing }}
<u>🔥{{ len .Alerts.Firing }} Alert(/s) Firing 🔥</u>
{{- if le (len .Alerts.Firing) 6 }}
{{- if le (len .Alerts.Firing) 5 }}
{{- range .Alerts.Firing }}
{{ template "alert-item.telegram.ccchh.internal" . }}
{{- end }}
@ -33,7 +33,7 @@ Links & Resources
{{- if .Alerts.Resolved }}
<u>✅{{ len .Alerts.Resolved }} Alert(/s) Resolved ✅</u>
{{- if le (len .Alerts.Resolved) 6 }}
{{- if le (len .Alerts.Resolved) 5 }}
{{- range .Alerts.Resolved }}
{{ template "alert-item.telegram.ccchh.internal" . }}
{{- end }}

View file

@ -22,6 +22,8 @@ scrape_configs:
static_configs:
- targets:
- localhost:9090
labels:
org: ccchh
- job_name: alertmanager
honor_timestamps: true
metrics_path: /metrics
@ -29,6 +31,8 @@ scrape_configs:
static_configs:
- targets:
- alertmanager:9093
labels:
org: ccchh
- job_name: mumble
honor_timestamps: true
scrape_interval: 5s
@ -38,6 +42,8 @@ scrape_configs:
static_configs:
- targets:
- mumble.hamburg.ccc.de:443
labels:
org: ccchh
- job_name: opnsense-ccchh
honor_timestamps: true
metrics_path: /metrics
@ -45,6 +51,8 @@ scrape_configs:
static_configs:
- targets:
- 185.161.129.132:9100
labels:
org: ccchh
- job_name: jitsi
honor_timestamps: true
scrape_interval: 5s
@ -54,10 +62,14 @@ scrape_configs:
static_configs:
- targets:
- jitsi.hamburg.ccc.de:9888 # Jitsi Video Bridge
labels:
org: ccchh
- job_name: 'pve'
static_configs:
- targets:
- 212.12.48.126 # chaosknoten
labels:
org: ccchh
metrics_path: /pve
params:
module: [ default ]
@ -74,6 +86,7 @@ scrape_configs:
static_configs:
# Wieske Chaosknoten VMs
- labels:
org: ccchh
site: wieske
type: virtual_machine
hypervisor: chaosknoten
@ -98,6 +111,7 @@ scrape_configs:
- zammad-intern.hamburg.ccc.de:9100
- pretalx-intern.hamburg.ccc.de:9100
- labels:
org: ccchh
site: wieske
type: physical_machine
targets:

View file

@ -0,0 +1,23 @@
---
services:
ntfy:
image: binwiederhier/ntfy
container_name: ntfy
command:
- serve
volumes:
- ntfy_cache:/var/cache/ntfy
- ntfy_var:/var/lib/ntfy
- ./configs/server.yml:/etc/ntfy/server.yml
ports:
- 2586:2586
healthcheck: # optional: remember to adapt the host:port to your environment
test: ["CMD-SHELL", "wget -q --tries=1 http://localhost:2586/v1/health -O - | grep -Eo '\"healthy\"\\s*:\\s*true' || exit 1"]
interval: 60s
timeout: 10s
retries: 3
start_period: 40s
restart: unless-stopped
volumes:
ntfy_cache: {}
ntfy_var: {}

View file

@ -0,0 +1,9 @@
base-url: "https://ntfy.hamburg.ccc.de"
default-host: "https://ntfy.hamburg.ccc.de"
listen-http: ":2586"
behind-proxy: true
keepalive-interval: "45s"
cache-file: "/var/cache/ntfy/cache.db"
attachment-cache-dir: "/var/cache/ntfy/attachments"
auth-default-access: "deny-all"
auth-file: "/var/lib/ntfy/user.db"

View file

@ -0,0 +1,43 @@
# partly generated 2022-01-08, Mozilla Guideline v5.6, nginx 1.17.7, OpenSSL 1.1.1k, intermediate configuration
# https://ssl-config.mozilla.org/#server=nginx&version=1.17.7&config=intermediate&openssl=1.1.1k&guideline=5.6
server {
# Listen on a custom port for the proxy protocol.
listen 8443 ssl proxy_protocol;
http2 on;
# Make use of the ngx_http_realip_module to set the $remote_addr and
# $remote_port to the client address and client port, when using proxy
# protocol.
# First set our proxy protocol proxy as trusted.
set_real_ip_from 172.31.17.140;
# Then tell the realip_module to get the addreses from the proxy protocol
# header.
real_ip_header proxy_protocol;
server_name ntfy.hamburg.ccc.de;
ssl_certificate /etc/letsencrypt/live/ntfy.hamburg.ccc.de/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/ntfy.hamburg.ccc.de/privkey.pem;
# verify chain of trust of OCSP response using Root CA and Intermediate certs
ssl_trusted_certificate /etc/letsencrypt/live/ntfy.hamburg.ccc.de/chain.pem;
# HSTS (ngx_http_headers_module is required) (63072000 seconds)
add_header Strict-Transport-Security "max-age=63072000" always;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Port 443;
# This is https in any case.
proxy_set_header X-Forwarded-Proto https;
proxy_set_header Upgrade $http_upgrade;
location / {
proxy_pass http://127.0.0.1:2586;
proxy_buffering off;
proxy_request_buffering off;
proxy_redirect off;
client_max_body_size 0; # Stream request body to backend
}
}

View file

@ -70,6 +70,7 @@ map $host $upstream_acme_challenge_host {
design.hamburg.ccc.de 172.31.17.162:31820;
hydra.hamburg.ccc.de 172.31.17.163:31820;
cfp.eh22.easterhegg.eu 172.31.17.157:31820;
ntfy.hamburg.ccc.de 172.31.17.149:31820;
default "";
}

View file

@ -88,6 +88,7 @@ stream {
design.hamburg.ccc.de 172.31.17.162:8443;
hydra.hamburg.ccc.de 172.31.17.163:8443;
cfp.eh22.easterhegg.eu pretalx-intern.hamburg.ccc.de:8443;
ntfy.hamburg.ccc.de 172.31.17.149:8443;
}
server {