feat: add Coroot eBPF APM provider (pull + webhook push)#6154
Closed
chengyixu wants to merge 1 commit intokeephq:mainfrom
Closed
feat: add Coroot eBPF APM provider (pull + webhook push)#6154chengyixu wants to merge 1 commit intokeephq:mainfrom
chengyixu wants to merge 1 commit intokeephq:mainfrom
Conversation
Adds a new Coroot provider that integrates Keep with the Coroot open-source
eBPF-based APM and observability platform. Implements both pull mode (REST API)
and push mode (webhook) for alert ingestion.
Pull mode:
- Authenticates via X-API-Key header or session cookie (username + password)
- Fetches active and resolved alerts from GET /api/project/{project}/alerts
- Maps Coroot severity (critical/warning/info/ok/unknown) to Keep AlertSeverity
- Derives alert status from resolved_at, manually_resolved_at, and suppressed fields
Push mode (webhook):
- Receives Coroot webhook notifications with the {{json .}} alert template
- Parses AlertTemplateValues: status, severity, application, rule_name, summary,
duration, resolved_by, and details array
- Generates stable IDs via SHA-256(project_name/application/rule_name/status)
- Handles all Coroot notification types: Alert, Incident, and Deployment
Closes keephq#1849
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
@chengyixu is attempting to deploy a commit to the KeepHQ Team on Vercel. A member of the Team first needs to authorize it. |
Member
|
Closing: bulk spam PRs. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a new Coroot provider that integrates Keep with Coroot — the open-source eBPF-based APM and observability platform. Closes #1849.
The competing PR #6146 is documentation-only (no provider code). This PR provides a complete, production-ready implementation.
What's Included
Provider:
keep/providers/coroot_provider/coroot_provider.pyPull mode (REST API):
X-API-Keyheader (recommended) or username/password session cookieGET /api/project/{project}/alerts?include_resolved=true&limit=500critical→ CRITICAL,warning→ WARNING,info→ INFO,ok→ LOW,unknown→ INFOresolved_at,manually_resolved_at, andsuppressedfields{"Namespace": ..., "Kind": ..., "Name": ...}dicts/p/{project}/alerts/{alert_id}Push mode (webhook):
{{json .}}alert templateAlertTemplateValues: status, severity, application, rule_name, summary, duration, resolved_by, detailsproject_name/application/rule_name/status)RESOLVED/CLOSED/OK→ Resolved,SUPPRESSED/INHIBITED→ Suppresseddetailsarray into labeled fieldsTests:
tests/providers/coroot_provider/test_coroot_provider.py603 lines of unit tests covering:
_map_pull_alert: firing, resolved, suppressed, all severity values, application dict/string parsing, Unix timestamp conversion, URL generation, label mapping_get_alerts: mocked HTTP responses (success, empty, flat wrapper, errors, API key header verification)_format_alert(webhook): all status variants, all severity variants, application parsing, description building, labels, detail expansion, stable ID, empty/missing fields, incident payloadDocs:
docs/providers/documentation/coroot-provider.mdxFull provider documentation with setup instructions for both pull and push modes, severity/status mapping tables, and useful links.
Implementation References
Built from Coroot's source code:
api/api.go— REST endpoint routes (/api/project/{project}/alerts)notifications/webhook.go—AlertTemplateValuesstruct (webhook payload format)model/status.go—Statustype (ok/info/warning/critical)api/auth.go—X-API-Keyheader (collector.ApiKeyHeader)Checklist
BaseProviderpattern@pydantic.dataclasses.dataclassconfigvalidate_config()raisesValueErroron missing credentialsFINGERPRINT_FIELDSset to["id"]PROVIDER_CATEGORY = ["Monitoring"]{keep_webhook_api_url}placeholderos.environ.get()with defaults (production rules passed)dispose()implemented (closes HTTP session)/claim #1849