Skip to content

Metric alerts

A metric alert watches a number on an artifact and notifies you when it crosses a threshold — “tell me when revenue drops below 100k” — delivered to Slack, email, Discord, or a webhook. It checks the artifact’s stored data on a schedule, so the dashboard and the alert always agree.

  1. Expose a followable metric on the artifact (a manager does this once).
  2. Subscribe to it with a condition, a schedule, and a destination.

The evaluator reads stored data, never the rendered page — so write the displayed KPI to your JSON store (or a table), then point the metric at it.

Terminal window
curl -X PUT https://shareout.site/v1/metric-alerts/definitions \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{
"artifact_id": "art_abc123",
"metric_id": "revenue",
"label": "Revenue",
"format": "currency:USD",
"source": { "type": "json_path", "key": "metrics", "path": "$.revenue" }
}'
SourceReads
json_pathA value inside a JSON-store key (e.g. $.revenue)
table_countRow count of a table (optional where filter)
table_aggregatesum / avg / min / max of a numeric field
Terminal window
curl -X POST https://shareout.site/v1/metric-alerts \
-H "Authorization: Bearer $TOKEN" -H 'Content-Type: application/json' \
-d '{
"artifact_id": "art_abc123",
"metric_id": "revenue",
"name": "Revenue below target",
"condition": { "op": "lt", "value": 100000 },
"schedule": "0 9 * * 1-5",
"destination": {
"kind": "slack",
"config": { "connection": "team", "targetType": "channel", "channelId": "C0123456789", "mode": "message" }
}
}'
OperatorFires when the value…
gt / gterises above / at or above the threshold
lt / ltedrops below / at or below
eqequals it
change_pct_gt / change_pct_ltmoves up / down more than N% since the last check

schedule is a cron expression (how often to check). A cooldown (default 1 day) stops a metric that stays past its threshold from alerting on every check.

  • Managers (artifact owner/editor, or a workspace owner/admin) define metrics and send alerts anywhere — team Slack channels, webhooks, any email.
  • Viewers can subscribe to themselves only — a Slack DM or an email to their own address. On a published page they can do this from the Follow metric button in the toolbar.
ActionEndpoint
Check nowPOST /v1/metric-alerts/{id}/run
PausePATCH /v1/metric-alerts/{id}{ "enabled": false }
HistoryGET /v1/metric-alerts/{id}/events

Related: Scheduling jobs for recurring delivery without a threshold.