Loading...
Loading...
Threshold-based alerting on Scrapfly account metrics. Wire up rules like "alert me when scrape success rate drops below 95% for 10 minutes" and receive notifications via email, webhook, or in-app. Use when the user asks to "set up an alert", "monitor my scrape success rate", "tell me when my scrapes start failing", "alert on unblocker block rate", "alert on ASP block rate", "watch a specific domain", or any task involving the Scrapfly alerting product. Covers the three call paths: REST API, MCP `alert_*` tools, and the `scrapfly alert` CLI subcommand. Enterprise plan feature.
npx skill4agent add scrapfly/skills scrapfly-alertingapi.scrapfly.ioalert_*scrapfly alertlistgetcount-activescp-live-...--project-uuidproject_uuidmetric_idallowed_dimensionsscrape.unblocker_errors_per_minscrape.asp_errors_per_minconfirm=truefired_count: 0confirm=true| Tool | Mode | Purpose |
|---|---|---|
| read | Per-product aggregates: pick |
| read | Per-domain breakdown for one site. |
| read | Discover legal |
| read | List the alerts of the api-key's project with optional filters ( |
| read | Full alert row including the per-alert HMAC signing key for webhook channels. |
| read | Replay an unsaved rule against history. Use to validate the threshold before |
| write (confirm) | Persist a new alert in the api-key's project. Leave |
| write (confirm) | Patch fields. Server auto-snoozes for |
| write (confirm) | Permanent. |
| write (confirm) | Mute notifications. Pass |
| write (confirm) | Clear active snooze. |
| write (confirm) | Fire a synthetic notification on every configured channel without touching state. |
// Step 1 — baseline
{"tool":"monitoring_get_metrics","parameters":{"product":"scrape","period":"last7d","aggregation":["account"]}}
// Step 2 — discover the registry
{"tool":"alert_metric_families","parameters":{}}
// Step 3 — preview the chosen threshold against last-24h history
{"tool":"alert_preview","parameters":{
"metric_id":"scrape.success_rate",
"comparator":"lt","threshold":55,
"sustained_minutes":5,"range_minutes":1440
}}
// Step 4 — dry-run create (no confirm)
{"tool":"alert_create","parameters":{
"name":"Scrape Success Rate Low",
"metric_id":"scrape.success_rate",
"comparator":"lt","threshold":55,
"sustained_minutes":5,
"notify_channels":[{"kind":"email","target":"ops@example.com"}]
}}
// Step 5 — commit
{"tool":"alert_create","parameters":{ ...same..., "confirm":true }}info_account.account.account_idproject_uuidERR::ALERT::PROJECT_NOT_FOUNDproject_uuidproject_namealert_previewDRY RUN — POST /alert would be invoked with: { ... }scrapflyscrapfly alert ...{success, product, data|error}jq# Discover what's available
scrapfly alert metric-families
# Tune the threshold against history
scrapfly alert preview \
--metric scrape.success_rate \
--comparator lt \
--threshold 95 \
--sustained-minutes 10 \
--range-minutes 1440
# Create the alert (channels are repeatable)
scrapfly alert create \
--name "Scrape Success Rate Low" \
--metric scrape.success_rate \
--comparator lt \
--threshold 95 \
--sustained-minutes 10 \
--channel email:ops@example.com \
--channel webhook:https://hooks.example.com/scrapfly
# Or from a version-controlled file (IaC-style)
scrapfly alert create --file ./alerts/success_rate.json
# Manage existing alerts
scrapfly alert list --state triggered
scrapfly alert get <alert-uuid>
scrapfly alert series <alert-uuid> --range-minutes 1440
scrapfly alert update <alert-uuid> --threshold 90
scrapfly alert snooze <alert-uuid> --minutes 30
scrapfly alert snooze <alert-uuid> --until-resolved
scrapfly alert unsnooze <alert-uuid>
scrapfly alert test <alert-uuid>
scrapfly alert delete <alert-uuid>scrapfly alert create --help--helpPOST /alert?key=scp-live-...
Content-Type: application/json
{
"name": "Scrape Success Rate Low",
"metric_id": "scrape.success_rate",
"comparator": "lt",
"threshold": 95,
"sustained_minutes": 10,
"notify_channels": [
{"kind": "email", "target": "ops@example.com"},
{"kind": "webhook", "target": "https://hooks.example.com/scrapfly"}
]
}eval_cadence_secondssustained_minutesevaluation_window_msustained_minutesno_data_policyignorerenotify_minutesrecovery_minutesGET /alertGET /alert/:uuidGET /alert/metric-familiesGET /alert/count-activeGET /alert/:uuid/seriesPOST /alert/previewPUT /alert/:uuidDELETE /alert/:uuidPOST /alert/:uuid/snoozePOST /alert/:uuid/unsnoozePOST /alert/:uuid/testkindtarget| Kind | Target | Notes |
|---|---|---|
| RFC 5322 address | Delivered via the Scrapfly mailer. Subject carries the alert name and the breach value. |
| HTTPS URL | POST with HMAC-SHA256 signature in |
| empty string | Surfaces in the dashboard's bell-icon notification panel. |
renotify_minutesalert_liststateokpendingsustained_minutestriggeredrecoveringrecovery_minutesno_datano_data_policysnoozedalert_snoozeuntil_resolvedcount-activetriggered + pending + recoveringsnoozedno_dataERR::ALERT::UNKNOWN_METRICmetric_idalert_metric_familiesERR::ALERT::INVALID_DIMENSIONSallowed_dimensionsERR::ALERT::INVALID_THRESHOLDgt|lt|gte|lte|eq|neqERR::ALERT::INVALID_SUSTAINED_WINDOWsustained_minutesERR::ALERT::CHANNEL_UNREACHABLEemail|webhook|inapptestERR::ALERT::PROJECT_NOT_FOUNDproject_uuidaccount_idERR::ALERT::NOT_FOUNDERR::ALERT::EVAL_TIMEOUTrange_minutesERR::ALERT::INTERNALdetailsscrapfly-cliscrapfly alertscrapfly-agent-rulesscrapfly-scraperscrape.success_rate