diff --git a/inventories/chaosknoten/host_vars/ntfy.yaml b/inventories/chaosknoten/host_vars/ntfy.yaml index 9dc1b2b..cab4e76 100644 --- a/inventories/chaosknoten/host_vars/ntfy.yaml +++ b/inventories/chaosknoten/host_vars/ntfy.yaml @@ -93,7 +93,12 @@ alloy_config: | } } - prometheus.scrape "scrape_metrics" { + prometheus.scrape "unix_metrics" { targets = prometheus.exporter.unix.local_system.targets forward_to = [prometheus.relabel.default.receiver] } + + prometheus.scrape "ntfy_metrics" { + targets = [{"__address__" = "localhost:9586", job = "ntfy", instance = "ntfy", __scrape_interval__ = "120s"}] + forward_to = [prometheus.relabel.default.receiver] + } diff --git a/resources/chaosknoten/ntfy/docker_compose/compose.yaml.j2 b/resources/chaosknoten/ntfy/docker_compose/compose.yaml.j2 index 818e17d..625e02f 100644 --- a/resources/chaosknoten/ntfy/docker_compose/compose.yaml.j2 +++ b/resources/chaosknoten/ntfy/docker_compose/compose.yaml.j2 @@ -11,6 +11,7 @@ services: - ./configs/server.yml:/etc/ntfy/server.yml ports: - 2586:2586 + - 9586:9586 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 diff --git a/resources/chaosknoten/ntfy/docker_compose/server.yaml.j2 b/resources/chaosknoten/ntfy/docker_compose/server.yaml.j2 index 35b03ff..0a28f4f 100644 --- a/resources/chaosknoten/ntfy/docker_compose/server.yaml.j2 +++ b/resources/chaosknoten/ntfy/docker_compose/server.yaml.j2 @@ -2,12 +2,20 @@ 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" +log-format: json + +enable-metrics: true +metrics-listen-http: ":9586" + auth-default-access: "deny-all" auth-file: "/var/lib/ntfy/user.db" + +attachment-cache-dir: "/var/cache/ntfy/attachments" + web-push-public-key: "BCx7PqDiVNlOiAHHfSxjbTle_LN4hetwHYi58GJhQxiY33AQ663IaJVro7B28j-1KOqwdzKco3dMMwzBJl9OQ90" web-push-private-key: {{ secret__ntfy_web_push_private_key }} web-push-file: "/var/cache/ntfy/webpush.db" web-push-email-address: "mailto:noc@lists.hamburg.ccc.de" + +upstream-base-url: "https://ntfy.sh"