Cfn canary

From masharratt/claude-flow-novice · View interactive version

Cfn canary is an AI agent skill from the GitHub repository masharratt/claude-flow-novice. MUST BE USED within 10 minutes of any production deployment. Post-deploy health monitoring: polls a URL for 10 minutes checking errors, performance regressions, availability.

How to use this skill

Skill file

CFN Canary

Purpose: Monitor a deployed application for 10 minutes after deployment, detecting errors and regressions before users are affected.

Usage

Invoke as /canary <url> where url is the production endpoint to monitor.

Optional: pass the key-events list from OPS_<slug>.md ยง3 (event name + the query or command that returns its count since deploy). Without it, the report states Event arrival: NOT CHECKED (no event list), never a silent pass.

Monitoring Protocol

Phase 1: Baseline Capture

Before monitoring begins, capture baseline metrics:

If no baseline exists, the first check becomes the baseline.

Phase 2: Polling Loop (10 minutes, 30-second intervals)

Every 30 seconds, check:

  1. Availability: HTTP status 200? If not, alert.
  2. Response time: >2x baseline? Flag as performance regression.
  3. Response size: Changed significantly (>50% diff)? Flag as content change.
  4. Error indicators: Check response body for common error patterns (500, "Internal Server Error", "503", stack traces).

Phase 2b: Event Arrival (when an event list is given)

A page that loads while tracking records nothing is not healthy. At the end of the window, run each event's count query once:

Report every event by name with its count, so a missing one is visible: match.open=14 checkin=0 session.attend=3.

Phase 3: Alert Logic

Transient tolerance: require 2+ consecutive failures before alerting. Single failures may be network blips.

Alert levels:

Phase 4: Report

Output summary:

## Canary: <url> (10min)

### Status: HEALTHY | DEGRADED | DOWN

### Checks: N/N passed
### Event arrival: <event>=<count> ... | NOT CHECKED (no event list)
### Alerts: N

### Timeline
HH:MM:SS - 200 (Xms) OK
HH:MM:SS - 200 (Xms) OK
HH:MM:SS - 500 (Xms) ALERT: Server error
...

### Recommendation
<action based on findings>

Limitations

Integration

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.