Skip to content

Commit 4101aae

Browse files
anhtuank7cclaude
andauthored
docs: mark Teams alerts as not yet tested on a live tenant (#47)
The Adaptive Card is covered by unit tests only; no alert has reached a real Workflows webhook yet. Say so in the setup docs and track the live test as an open item in the changelog. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
1 parent b96f92a commit 4101aae

3 files changed

Lines changed: 5 additions & 0 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616

1717
### Fixed
1818
- [x] **Microsoft Teams alerts work again (Workflows webhooks).** Microsoft has retired the Office 365 connector webhooks, and the Workflows webhook that replaces them ("Send webhook alerts to a channel") reads an Adaptive Card from `attachments`, not the `{"text": ...}` body PAMSignal sent, so Teams alerts were no longer delivered. Teams now gets an Adaptive Card: the pretty message as bold labels and monospace values, or the compact line in monospace. Adaptive Card markdown has no code spans, so wrapping the old markdown in a card would have reopened the link and mention injection fixed in 0.7.1; instead every piece of text is a `TextRun` in a `RichTextBlock`, which Teams never parses as markdown, after the same control-character and invisible-Unicode replacement as the other platforms. Covered by shape tests, a hostile-input test and a 20000-case property test that parses every card as strict JSON and allows only the expected keys and element types. Not yet tried against a live Teams tenant. Setup docs (EN + VI), the example config and `pamsignal.conf(5)` describe the Workflows steps; old connector URLs must be replaced.
19+
- [ ] **Test the Teams Adaptive Card on a live Teams tenant.** Create a Workflows webhook ("Send webhook alerts to a channel"), run `pamsignal --test-alert` with both `message_style` values, and check that the card is delivered and renders as documented. Until then `docs/alerts.md` (EN + VI) marks Teams as not yet tested on a real tenant.
1920
- [x] **Over-long config values were cut off silently.** A value longer than its key allows (511 characters for the URL keys) was truncated, so a long webhook URL lost its signature and every alert failed with nothing in the log. It is now a config error naming the key and the limit. A line longer than 1022 characters, which used to be read as two lines with the second parsed on its own, is now one error too.
2021
- [x] **Grafana demo: every panel counted each event twice, and some titles were wrong.** The synthetic producer pushed each event to Loki directly and through Alloy (`MODE: both`); it now uses only the Alloy path that real hosts use. The Detections stat showed `Value #A`/`Value #B` instead of its names and the two top-N tables headed their count column `Value #A`, because Grafana 11 names instant-query fields per query; both dashboard files now map those names. CI now also checks the detection query, waits for data before rendering the dashboard screenshot, and renders the last 3 minutes at 1600x1920 so the charts are readable. The two line charts have a 15 s minimum interval, so a short time range no longer breaks them into isolated dots. `assets/grafana-dashboard.png` is refreshed from that render.
2122
- [x] **`pamsignal --help` said `--foreground` is required under `Type=simple`.** The shipped unit is `Type=notify` with a watchdog; the help text and `pamsignal(8)` now say so.

‎docs/alerts.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ Sent as the `text` field via [incoming webhook](https://api.slack.com/messaging/
131131

132132
Sent as an [Adaptive Card](https://adaptivecards.io/) to a Teams **Workflows** webhook. Microsoft has retired the Office 365 connector webhooks (`https://<tenant>.webhook.office.com/...`), so a connector URL no longer delivers anything; create a Workflows webhook instead.
133133

134+
> **Not yet tested on a live Teams tenant.** The card format is covered by unit tests, but no alert has been delivered to a real Workflows webhook yet. If you run it, please report the result (works, or the error Teams returns) in an issue.
135+
134136
With `message_style = pretty` the card holds the pretty message (bold headline and labels, monospace values); otherwise it holds the compact line in a monospace font. The request body for a compact alert:
135137

136138
```json

‎docs/vi/alerts.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -131,6 +131,8 @@ Gửi trong trường `text` qua [incoming webhook](https://api.slack.com/messag
131131

132132
Gửi dưới dạng một [Adaptive Card](https://adaptivecards.io/) tới webhook **Workflows** của Teams. Microsoft đã ngừng hỗ trợ các webhook Office 365 connector (`https://<tenant>.webhook.office.com/...`), nên URL connector không còn gửi được gì; hãy tạo một webhook Workflows thay thế.
133133

134+
> **Chưa được kiểm thử trên một Teams tenant thật.** Định dạng card đã có unit test, nhưng chưa có alert nào được gửi tới một webhook Workflows thật. Nếu bạn chạy thử, hãy báo kết quả (chạy được, hoặc lỗi mà Teams trả về) trong một issue.
135+
134136
Với `message_style = pretty`, card chứa tin nhắn pretty (tiêu đề và nhãn in đậm, giá trị dạng monospace); nếu không, card chứa dòng compact bằng font monospace. Request body cho một alert compact:
135137

136138
```json

0 commit comments

Comments
 (0)