Skip to content

[feature] support exporting alerts to Excel - #4332

Open
orangeCatDeveloper wants to merge 1 commit into
apache:masterfrom
orangeCatDeveloper:feat/4212-alert-export
Open

[feature] support exporting alerts to Excel#4332
orangeCatDeveloper wants to merge 1 commit into
apache:masterfrom
orangeCatDeveloper:feat/4212-alert-export

Conversation

@orangeCatDeveloper

@orangeCatDeveloper orangeCatDeveloper commented Aug 18, 2026

Copy link
Copy Markdown
Contributor

Fixes #4212

The alarm center could display alerts but offered no way to export them, so users had no way to pull alert data out for offline statistics.

Add an "Export Alerts" button to the alarm center that downloads the matching alerts as an .xlsx file. The endpoint reuses the alert list's filter logic (status + fuzzy search), extracted into a shared buildSingleAlertSpecification, so the export always matches what the user currently sees. The matching single alerts are flattened for a tabular sheet — labels/annotations maps joined to k=v; ... strings, epoch-millis timestamps formatted to dates — and rendered via easypoi. Default sort is activeAt desc so the ordering column is visible in the sheet.

The export is an unpaged full-result query, same as the existing monitor export — acceptable for typical alert volumes.

Verification

End-to-end, three scenarios (3 seeded alerts: 2 firing + 1 resolved):

default export  -> 3 rows, sorted by activeAt desc:
    firing   e2e-fp-mem  Active At 2024-12-12 20:11:40
    firing   e2e-fp-cpu  Active At 2024-12-12 20:11:17
    resolved e2e-fp-disk Active At 2024-12-12 18:40:00
status=resolved -> 1 row  (e2e-fp-disk)
search=server-02 -> 1 row (e2e-fp-mem)
output file type: Microsoft OOXML (valid .xlsx / XSSF)

UI — the new Export Alerts button in the alarm center:
alert-export-ui

Screenshot 2026-08-17 at 7 37 37 PM

The alarm center could display alerts but offered no way to export them
for offline statistics. Add an export endpoint that reuses the alert list
filters and renders the matching single alerts as an .xlsx via easypoi.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Feature] <title>告警中心无法导出告警信息,不方便统计,建议提供导出功能

1 participant