דלג לתוכן הראשי

Alerts

Lumen tells you about your flows in two places: the notifications bell, which works now, and alert policies, which say who should hear about what. This page shows both, and is plain about which parts are ready.

  • Console, YAML and CLI
  • Policies are read-only in the console

What is live​

State
Notifications bell in the consoleLive. Workspace admins get a notification when a run fails and when the workspace passes 80% and 100% of its monthly budget. Approvals, problem reports and a few system events arrive there too.
Alert policies (the AlertPolicy resource)The resource is stored and shown on the Alerts page. Nothing turns a policy into a message, so do not rely on one as your only way to hear about a failure.

The notifications bell​

The bell is at the top of the console's left column and shows how many notifications are unread. Click it to open the list.

The Notifications drawer. Tabs All and Unread (3), and an All kinds filter. The first item, with a red icon, reads A run of Handle invoices that arrive by email failed, with the reason The scan is blank, there is no text to read, 3 hours ago. The second, with a coin icon, reads You have used 80% of this month's credits, About 1,000 credits are left until the 1st. Below are a member joining, a fixed problem report, a message from a flow and a weekly summary.The Notifications drawer. Tabs All and Unread (3), and an All kinds filter. The first item, with a red icon, reads A run of Handle invoices that arrive by email failed, with the reason The scan is blank, there is no text to read, 3 hours ago. The second, with a coin icon, reads You have used 80% of this month's credits, About 1,000 credits are left until the 1st. Below are a member joining, a fixed problem report, a message from a flow and a weekly summary.
The bell. Unread items have a blue dot; the filter narrows by kind.
  • Click a notification to open what it is about: the run, the flow, billing or your files.
  • The ... menu on an item marks it read or unread, or deletes it. Mark all read is in the drawer's menu.
  • All kinds filters by Failed runs, Approvals, Budget, Problem reports, Workspace, From your flows, Waiting for a worker and Paused flows.
  • Notifications are kept for 90 days.

A flow can also send its own in-app notification with a step, which appears under From your flows.

The Alerts page​

Open Alerts under Monitor in the console. It lists your workspace's alert policies, one row each:

The Alerts page. A table titled Alerts with columns When, Notifies and Status. One row reads A run fails, notifies dana@acme.test via slack-finance. A second reads Spend goes over a limit, per 24h, notifies dana@acme.test. Both have a green dot and the status True. Below the table a panel reads Sent alerts will be listed here. Coming soon.The Alerts page. A table titled Alerts with columns When, Notifies and Status. One row reads A run fails, notifies dana@acme.test via slack-finance. A second reads Spend goes over a limit, per 24h, notifies dana@acme.test. Both have a green dot and the status True. Below the table a panel reads Sent alerts will be listed here. Coming soon.
Each policy says when it applies and who it notifies. The history panel is not built yet.
ColumnMeaning
WhenA run fails, Spend goes over a limit (with its window, such as per 24h) or A run looks unusual, which also shows its sensitivity.
NotifiesThe addresses and connections the policy names. A connection shows as via and its name.
StatusThe policy's Ready condition. Waiting means nothing has reported on it yet.

The page only reads. A policy is configuration, so you create and change it as a resource, not in a form.

Write an alert policy​

An AlertPolicy has three parts: which flows it covers, the condition, and where to notify.

invoice-failures.yaml
apiVersion: lumen.ai/v1alpha1
kind: AlertPolicy
metadata:
name: invoice-failures
namespace: tenant-acme
spec:
flows:
matchLabels: {lumen.ai/owner: git}
when:
type: RunFailed
notify:
- email: ops@acme.example
FieldWhat it does
spec.flowsA label selector. Empty means every flow in the workspace.
spec.when.typeRunFailed, CostOver or Anomaly.
spec.when.costOverRequired with CostOver: amountUSD and a window such as 1h or 1d.
spec.when.anomalyUsed with Anomaly: sensitivity of low, medium (the default) or high.
spec.notifyAt least one target. Each is either an email or a connectorRef to a connection that can notify, never both.

A spend alert looks like this:

spend-spike.yaml
apiVersion: lumen.ai/v1alpha1
kind: AlertPolicy
metadata:
name: spend-spike
namespace: tenant-acme
spec:
when:
type: CostOver
costOver:
amountUSD: "25"
window: 1d
notify:
- email: dana@acme.example
Budgets are separate

A policy watches for spend. To stop spend, set a budget, which holds new runs when it is reached. See Billing and usage.

Next steps​