Hardstop is intentionally local-first, but it plays well with the rest of your product stack. Use this guide to connect Hardstop runs to collaboration, code, and automation tools so alerts stay in sync with how your team works.
- The
hardstop sources healthtable emitsscore,health_budget_state(HEALTHY,WATCH,BLOCKED), andsuppression_pctcolumns so schedulers or monitors can react to degraded sources. - The sources API (
src/hardstop/api/sources_api.py) returnshealth_budget_statefor each source; downstream consumers can mirror the CLI gating logic in dashboards or alerting rules. - To audit noisy rules, run
hardstop sources health --explain-suppress <source_id>and capture the reason counts + samples as an attachment in your observability tool. - Newly added sources with no
SourceRunhistory intentionally render asBLOCKED(score ≈30) placeholders until their first successful fetch; surface this as “pending first run” in dashboards and prompt operators to runhardstop sources test <source_id>instead of flagging it as a failure.
Use Slack to broadcast risk alerts and daily briefs.
- Recommended flow:
- Create an Incoming Webhook in Slack and pick a channel for alerts.
- Run
hardstop brief --today --format json > /tmp/brief.jsonafter each pipeline run. - Post highlights to Slack with a small script:
- Render a short summary (counts, top impacts) from
/tmp/brief.json. - Send it to the webhook URL as a JSON payload.
- Render a short summary (counts, top impacts) from
- Add the script to your scheduler (cron, systemd timer, GitHub Action) so Slack stays current.
- Threading: Use the alert
correlation.keyas a thread root to keep updates grouped. - Rate limiting: Batch multiple updates into one post per run to avoid noisy channels.
Automate Hardstop alongside your CI so code changes and risk signals stay paired.
- Run on a schedule: Trigger
hardstop run --since 24hin a scheduled workflow to fetch and ingest events. - Attach artifacts: Save
hardstop brief --today --format mdas a build artifact for reviewers. - Status visibility: Fail the job on exit code
2(broken) and mark it as warning for exit code1so maintainers see data quality issues. - Config versioning: Keep
config/under version control and require review for changes to suppression rules or source definitions.
If you use AI agents or automation runners, treat Hardstop as the deterministic layer and let the agent handle outreach.
- Use the brief JSON output as the agent's context window and have it decide who to notify.
- Allow agents to call
hardstop sources test <id>for diagnostics, but gate database writes behind human approval. - Cache agent prompts with the Hardstop version and config commit so responses are reproducible.
Hardstop itself avoids SaaS lock-in, so choose the right connector for your stack:
- Notifications: Slack, Microsoft Teams, email (SMTP).
- Work management: Linear, Jira, Asana — create issues from high-impact alerts.
- Data sync: Airflow/Prefect or GitHub Actions to orchestrate
hardstop runandhardstop briefon a schedule. - Storage: Keep SQLite on local disk; mirror to cloud storage only if your policies allow it.
To mirror high-impact alerts into Linear:
- Create a Linear API key with access to the target team.
- Map Hardstop classifications to Linear priority (e.g., class 2 → P1, class 1 → P2).
- Script a small bridge:
- Query
hardstop brief --today --format json. - For each
topalert, upsert a Linear issue keyed bycorrelation.key. - Add facilities/lanes/shipments to the issue description for context.
- Query
- Run the bridge after each successful
hardstop run.
Linear’s GitHub integration and API both accept a repository hint so downstream automation knows where the issue originated. Make sure Hardstop is the default:
- Connect the repo once: Linear → Settings → Integrations → GitHub →
select the
hardstoprepository so link-backs resolve automatically. - Pass the repo in your bridge: When you call the Linear GraphQL API, include metadata so future tooling can filter issues:
{
"query": "mutation IssueCreate($input: IssueCreateInput!) { issueCreate(input: $input) { issue { id } } }",
"variables": {
"input": {
"teamId": "<team-id>",
"title": "[hardstop] {{ alert.title }}",
"description": "{{ alert.summary }}",
"metadata": {
"repo": "hardstop",
"source": "hardstop-brief"
}
}
}
}
If you rely on Linear’s built-in GitHub sync, the metadata step is still useful
because it stays visible even when a human edits the issue later—everything
originating from Hardstop shares the same repo: hardstop tag.
- Decide where alerts live (Slack channel, Linear team, GitHub PR comment, etc.).
- Schedule
hardstop run+hardstop briefat the cadence your team needs. - Post summaries, not raw logs — keep channels signal-rich.
- Track runs with exit codes:
0healthy,1warning,2broken. - Version-control your configs so integrations stay reproducible.