Overview
OpenSRE queries Prefect to retrieve recent flow runs (including logs for failed runs) and worker health — helping diagnose pipeline failures and identify stalled or crashed orchestration jobs.Prerequisites
- Prefect Cloud account or self-hosted Prefect Server
- API key (Prefect Cloud) or accessible API URL (self-hosted)
Setup
There is no dedicatedopensre integrations setup prefect wizard today. Configure via the persistent store (OpenSRE does not define product PREFECT_* env vars), then verify.
Option 1: Persistent store
Add to~/.opensre/integrations.json:
Credentials
Prefect Cloud
- In Prefect Cloud, go to your profile icon → API Keys
- Click Create API Key
- Copy the key, account ID, and workspace ID from the URL:
https://app.prefect.cloud/account/<account-id>/workspace/<workspace-id>/
Self-hosted Prefect Server
Setapi_url to your server’s API endpoint (no API key required if unauthenticated):
Investigation tools
Verify
api_url set):
api_key set, no api_url):
api_url or api_key is set) — it does not call the Prefect API.
Troubleshooting
Security
- Use a service account API key rather than a personal key.
- For self-hosted, restrict network access to the Prefect API to trusted IPs.
- Store credentials in
~/.opensre/integrations.json, not in source code.