Skip to content

armgit / macro

Public Imported from GitHub
0

Macro is a unified workspace for teams: email, chat, docs, tasks, agents, calls, and CRM — @-linked together with shared AI memory.

feat(observability): let GoAlert post to the goalert-bot worker (#9228)

Wolf Mermelstein68bf48272d2c
diff --git a/infra/stacks/observability/Pulumi.prod.yaml b/infra/stacks/observability/Pulumi.prod.yaml
index bfe5cb8108..77dda814c5 100644
--- a/infra/stacks/observability/Pulumi.prod.yaml
+++ b/infra/stacks/observability/Pulumi.prod.yaml
@@ -2,5 +2,5 @@ config:
aws:region: us-east-2
observability:ciIngestSecretArn: arn:aws:secretsmanager:us-east-1:569036502058:secret:observability/dev-ingest-7UhJbL
observability:alarmTopicArn: arn:aws:sns:us-east-2:569036502058:observability-prod-alerts
- observability:amiId: ami-0339a8c2151661daa
+ observability:amiId: ami-0fb8313d13dd19d0a
observability:secretArn: arn:aws:secretsmanager:us-east-2:569036502058:secret:observability/prod-TwQpBJ
diff --git a/infra/stacks/observability/README.md b/infra/stacks/observability/README.md
index 391a44bdf9..d6d8375ae6 100644
--- a/infra/stacks/observability/README.md
+++ b/infra/stacks/observability/README.md
@@ -512,6 +512,11 @@ server; see [MCP servers](../../../docs/development/mcp-servers.md#goalert).
- A nightly timer dumps the database to `s3://<logs bucket>/goalert/`, one object
per weekday. The dump goes to a file first, so a failed dump never replaces a
good backup.
+- GoAlert's escalation steps post to `services/bots/goalert-bot`, a Cloudflare
+ Worker that posts each alert to Macro Alerts and threads acknowledgements,
+ closes and reminders under it. GoAlert's webhook allow-list
+ (`goalert.nix`) permits its URL; the secret path segment lives only in the
+ escalation step. The loopback relay below stays allowed as a fallback target.
- `macro-alerts-relay` on `127.0.0.1:8090` turns GoAlert webhooks into Macro
channel posts and adds the channel's bot token; GoAlert webhooks cannot set
headers. Each post starts with `---`, then the page or notify marker and the
diff --git a/infra/stacks/observability/nixos/goalert.nix b/infra/stacks/observability/nixos/goalert.nix
index 1c6cea2bcd..2bc2b13fe2 100644
--- a/infra/stacks/observability/nixos/goalert.nix
+++ b/infra/stacks/observability/nixos/goalert.nix
@@ -18,6 +18,9 @@ let
partOf = [ "observability-secrets.service" ];
};
relayUrl = "http://127.0.0.1:8090/goalert";
+ # services/bots/goalert-bot: posts alerts to Macro Alerts with thread replies and
+ # mentions. The webhook secret follows this prefix in the escalation step URL.
+ goalertBotUrl = "https://goalert-bot.macroverse.workers.dev/goalert/";
# GoAlert's config.Config, applied with `goalert set-config` before every
# start. `@name@` strings are replaced with the credential of that name.
goalertConfig = {
@@ -38,7 +41,10 @@ let
};
Webhook = {
Enable = true;
- AllowedURLs = [ relayUrl ];
+ AllowedURLs = [
+ relayUrl
+ goalertBotUrl
+ ];
};
Maintenance = {
AlertCleanupDays = 180;