{"id":51858589,"url":"https://github.com/stuttgart-things/homerun2-notification-catcher","last_synced_at":"2026-07-24T03:31:08.885Z","repository":{"id":360058450,"uuid":"1246511456","full_name":"stuttgart-things/homerun2-notification-catcher","owner":"stuttgart-things","description":"Notification catcher for homerun2 ","archived":false,"fork":false,"pushed_at":"2026-05-24T20:04:52.000Z","size":90,"stargazers_count":0,"open_issues_count":8,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-05-24T21:14:38.293Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/stuttgart-things.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-05-22T09:07:40.000Z","updated_at":"2026-05-24T19:24:46.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/stuttgart-things/homerun2-notification-catcher","commit_stats":null,"previous_names":["stuttgart-things/homerun2-notification-catcher"],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/stuttgart-things/homerun2-notification-catcher","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fhomerun2-notification-catcher","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fhomerun2-notification-catcher/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fhomerun2-notification-catcher/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fhomerun2-notification-catcher/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/stuttgart-things","download_url":"https://codeload.github.com/stuttgart-things/homerun2-notification-catcher/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/stuttgart-things%2Fhomerun2-notification-catcher/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":35826032,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-24T02:00:07.870Z","response_time":62,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-07-24T03:31:07.443Z","updated_at":"2026-07-24T03:31:08.832Z","avatar_url":"https://github.com/stuttgart-things.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# homerun2-notification-catcher\n\nA Go consumer for the [homerun2](https://github.com/stuttgart-things) pipeline:\nit reads `homerun.Message`s from a Redis Stream (via a consumer group) and\n**dispatches them as notifications** to external channels — Microsoft Teams\nand any generic JSON webhook today; Slack and email to follow.\n\n```\nAlertmanager ─▶ omni-pitcher /pitch/grafana ─▶ Redis stream \"alerts\"\n                                                     │\n                                          notification-catcher\n                                                     │\n                                       ┌─────────────┼─────────────┐\n                                       ▶ MS Teams    ▶ Slack        ▶ email\n```\n\nOutbound counterpart to the existing `*-catcher` consumers: instead of logging\nor storing messages, it sends them on. The Teams Adaptive Card is built in Go\nin this repo — version-controlled and unit-testable — so no third-party proxy\nor GUI-edited Power Automate flow is needed. Routing across outputs is driven\nby a YAML config so the catcher works for *any* message stream, not just\nAlertmanager.\n\n## Docs\n\n| | |\n|---|---|\n| [Configuration](docs/configuration.md) | Env vars, YAML routing config, smoke + dry-run |\n| [Deployment](docs/deployment.md) | KCL manifests, Flux integration, two-layer secret pattern |\n| [Alertmanager integration](docs/alertmanager.md) | Wire kube-prometheus-stack alerts through omni-pitcher into the catcher |\n| [CI/CD](docs/cicd.md) | Workflows, image build, kustomize OCI release |\n| [Preview environments](docs/preview-environments.md) | Per-PR namespaces |\n\n## Try it out\n\n### 1. Smoke locally — no Redis, no cluster\n\n```bash\ngo build .\nTEAMS_WEBHOOK_URL=https://teams.example/hook \\\n  ./homerun2-notification-catcher smoke \\\n    --config notify.example.yaml \\\n    --title \"disk almost full\" \\\n    --severity warning \\\n    --system kubernetes \\\n    --tags infra,storage \\\n    --dry-run\n```\n\nEach output prints one line: `OK`, `SKIPPED (filters did not match)`,\n`DRY-RUN`, or `FAIL: \u003cerror\u003e`. Drop `--dry-run` to actually POST to the\nwebhook.\n\n### 2. Smoke on a cluster — fake Alertmanager payload through the live pipeline\n\nWhen the catcher is deployed and consuming the `alerts` stream, fire a\nsynthetic Alertmanager v4 payload at `omni-pitcher` so the whole chain\nruns end-to-end:\n\n```bash\nkubectl -n homerun2 exec deploy/homerun2-omni-pitcher -- \\\n  wget -qO- --post-data='{\n    \"version\":\"4\",\"status\":\"firing\",\"receiver\":\"msteams\",\n    \"alerts\":[{\n      \"status\":\"firing\",\n      \"labels\":{\"alertname\":\"DryRunSmoke\",\"severity\":\"warning\",\"namespace\":\"platform\"},\n      \"annotations\":{\"summary\":\"end-to-end pipeline smoke\"},\n      \"startsAt\":\"'\"$(date -u +%FT%TZ)\"'\",\n      \"generatorURL\":\"https://grafana.example/d/abc\"\n    }]\n  }' \\\n    --header=\"Authorization: Bearer ${OMNI_PITCHER_AUTH_TOKEN}\" \\\n    --header=\"Content-Type: application/json\" \\\n    http://localhost:8080/pitch/grafana\n```\n\nThen tail the catcher:\n\n```bash\nkubectl -n homerun2 logs deploy/homerun2-notification-catcher --tail=20 | grep -E \"dry-run|notify\"\n```\n\nWith `DRY_RUN=true` (the recommended first-reconciliation mode) you'll see:\n\n```\nINFO dry-run: would send  output=teams-platform-alerts  title=DryRunSmoke  severity=warning  system=msteams\n```\n\n— filter evaluation runs, the dispatcher confirms what *would* fire, but no\nwebhook is invoked. Once you've verified routing in `kubectl logs`, remove the\n`DRY_RUN` patch from the Flux component and reconcile again to flip to live.\n\n### 3. Trip a real Prometheus alert\n\nThe full Phase-1 chain: lower a Prometheus rule threshold so Alertmanager\nfires on the next eval, and watch the same `kubectl logs` line appear within\nseconds — `DRY_RUN=true` still suppresses the actual POST.\n\n## Status\n\nPhase 1 (#5–#9) shipped. Multi-sink routing (msteams + generic webhook),\nYAML-driven filters, env-interp for secrets, dry-run mode, KCL manifests,\nFlux component, Alertmanager wiring all in place.\n\nPhase 2 (#3 — retry/backoff, dead-letter, firing/resolved styling, dedicated\n`/pitch/alertmanager` endpoint) is next. Phase 3 (#4 — Slack / email / per-\nassignee routing) layers on top.\n\n## Built from\n\n`homerun2-core-catcher` is the scaffold reference — consumer group, ko build,\nKCL manifests, Dagger CI, semantic-release, and PR preview environments.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Fhomerun2-notification-catcher","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstuttgart-things%2Fhomerun2-notification-catcher","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstuttgart-things%2Fhomerun2-notification-catcher/lists"}