Documentation / @zerotal/monitor / onAlert
Function: onAlert()
onAlert(
fn): () =>void
Defined in: monitor/src/alerting.ts:156
Register a handler called once whenever a monitor alert fires. Returns an unsubscribe function. Wire it to notifications:
onAlert((a) => Notification.route("slack", SLACK_URL).notify(new MonitorAlert(a)));
Parameters
fn
AlertHandler
Returns
() => void