Shumoku Docs

Search documentation

Shared docs and current release

Loading search…

日本語

@shumoku/core · 0.4.0 · function

parseAlertmanagerAlerts

Source

Parse an Alertmanager response into core `Alert[]`, applying the standard active/timeRange and minSeverity filters. - Active alerts are always kept; resolved alerts are dropped when `activeOnly`, otherwise dropped once older than `timeRange` (default 1h). - Unparseable `startsAt` falls back to `now`; missing/unparseable `endsAt` yields `undefined` (no bogus epoch-0 end time).

parseAlertmanagerAlerts(raw: AlertmanagerAlert[], options: ParseAlertmanagerOptions): Alert[]

Parameters

Parameter Type Description Default
raw AlertmanagerAlert[] No additional description.
options ParseAlertmanagerOptions No additional description.

Returns

Alert[]

libs/@shumoku/core/src/plugin-kit/alertmanager.ts:69