Skip to content

feat(export): add slack, pagerduty, and discord webhook sinks#83

Open
abhinavuser wants to merge 6 commits into
optiqor:mainfrom
abhinavuser:feat/sinks-integrations
Open

feat(export): add slack, pagerduty, and discord webhook sinks#83
abhinavuser wants to merge 6 commits into
optiqor:mainfrom
abhinavuser:feat/sinks-integrations

Conversation

@abhinavuser
Copy link
Copy Markdown

fixes #29

added built-in webhook sinks for kerno doctor findings. wired up the --sink, --severity-floor, and --sink-dedupe flags.
what's included:

  • Sink interface with exponential backoff retries on 5xx errors
  • in-memory deduplicator to prevent flapping rules from spamming on-call
  • slack integration using block kit format for clean readability
  • pagerduty integration via events api v2. handles trigger events and automatically sends a resolve event when a finding clears in continuous mode
  • discord integration utilizing discord's native slack-compat url suffix
  • kerno_sinks_deduped_total and kerno_sinks_failed_total metrics
  • full test suite using httptest.Server
    all env vars like KERNO_SLACK_WEBHOOK_URL are expanded automatically if passed as flag values to keep shell history clean.

Signed-off-by: abhinavuser abhinavkumarv2101@gmail.com

@abhinavuser abhinavuser requested a review from btwshivam as a code owner May 16, 2026 15:53
@github-actions
Copy link
Copy Markdown

🚀 First PR — welcome aboard!

A few things to expect:

  1. CI: every PR runs build + race tests + lint + (eventually) the kernel matrix. If something fails, the log will tell you exactly which gate.
  2. DCO: every commit needs Signed-off-by:git commit -s adds it automatically.
  3. Conventional Commits: PR titles like feat(doctor): add new rule or fix(bpf): handle X. We squash-merge by default.
  4. Review: a maintainer will review within 72 hours. Suggestions are conversations, not orders — push back if something doesn't fit your context.

If you get stuck, reply here or jump to Discussions. We want this PR to land.

@github-actions github-actions Bot added testing Tests and test coverage area/integrations External integrations (sinks, exports, CI) labels May 16, 2026
@btwshivam
Copy link
Copy Markdown
Member

dont spam. first get your past pRs merged

@btwshivam
Copy link
Copy Markdown
Member

fix conflict and rebase with main.. then ill review tag me

fixes optiqor#29

Signed-off-by: abhinavuser <abhinavkumarv2101@gmail.com>
… package)

Signed-off-by: abhinavuser <abhinavkumarv2101@gmail.com>
@abhinavuser abhinavuser force-pushed the feat/sinks-integrations branch from 814d347 to fa6c43c Compare May 31, 2026 12:28
@github-actions github-actions Bot added the level:advanced 200+ lines or 6+ files (auto-applied) label May 31, 2026
Signed-off-by: abhinavuser <abhinavkumarv2101@gmail.com>
…lloc)

Signed-off-by: abhinavuser <abhinavkumarv2101@gmail.com>
Signed-off-by: abhinavuser <abhinavkumarv2101@gmail.com>
@abhinavuser
Copy link
Copy Markdown
Author

hey @btwshivam i was waitin for my first pr to get merged thats why the delay but now the rebase is done and the merge conflict in internal/cli/doctor.go is resolved
i also noticed and fixed a small unused import/missing io package issue in sink.go that is causing the CI linter to fail early
ready for your review when you have a chance

Signed-off-by: abhinavuser <abhinavkumarv2101@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area/integrations External integrations (sinks, exports, CI) level:advanced 200+ lines or 6+ files (auto-applied) testing Tests and test coverage

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Sinks: Slack / PagerDuty / Discord webhook integrations

2 participants