alertmanager
feishu.integrations.alertmanager
¶
AlertmanagerMessageStore
¶
Bases: EventMessageStore, Protocol
Store Feishu message IDs and per-alert lifecycle revisions.
源代码位于: feishu/integrations/alertmanager.py
InMemoryAlertmanagerStore
¶
Bases: InMemoryEventMessageStore
Process-local Alertmanager message and alert lifecycle state.
源代码位于: feishu/integrations/alertmanager.py
JsonFileAlertmanagerStore
¶
Bases: JsonFileEventMessageStore
Single-process JSON-file Alertmanager message and lifecycle state.
源代码位于: feishu/integrations/alertmanager.py
AlertmanagerIntegration
dataclass
¶
Mount Alertmanager webhooks on a Feishu gateway.
源代码位于: feishu/integrations/alertmanager.py
create_alertmanager_route
¶
create_alertmanager_route(config: GatewayConfig, client: Any, receive_id: str, *, receive_id_type: str = 'chat_id', path: str = '/alerts/alertmanager', store: AlertmanagerMessageStore | None = None, card_builder: AlertmanagerCardBuilder | None = None) -> Route
Create a service-authenticated Alertmanager webhook route.
The route converts the standard Alertmanager webhook payload into a Feishu
interactive card. Repeated notifications for one incident update the
original card, while a single-alert incident with a new startsAt posts
a new card so operators receive a fresh notification. The built-in stores
serialize delivery within one process; multi-worker deployments require a
gateway-level distributed delivery lock.
源代码位于: feishu/integrations/alertmanager.py
build_alertmanager_card
¶
Render an Alertmanager webhook payload as a Feishu alert card.
源代码位于: feishu/integrations/alertmanager.py
alertmanager_event_id
¶
Return the stable event ID for an Alertmanager webhook payload.
源代码位于: feishu/integrations/alertmanager.py
alertmanager_display_id
¶
Return a user-readable Alertmanager identifier for cards.