Skip to content

Conversation

garlic-naan
Copy link

Discord Notifier for Endpoint Monitoring Operator

The Endpoint Monitoring Operator supports sending alerts directly to Discord channels using webhooks. This allows your team to receive real-time, well-formatted notifications for endpoint status changes.

Example Configuration

Add the following to your EndpointMonitor resource:

notify:
  discord:
    enabled: true
    webhookUrl: https://discord.com/api/webhooks/your-webhook-id/your-token
    alertOn:
      - failure
      - success

Example Alert

Discord alerts will look like:
Screenshot 2025-07-22 at 2 39 56 PM
Screenshot 2025-07-22 at 2 40 08 PM

- Introduced DiscordConfig struct and added it to NotifyConfig in the API.
- Implemented DiscordNotifier in internal/notifier/discord.
- Registered Discord notifier in the NotifierFactory for dynamic instantiation.
…test coverage

- Extract common alert decision logic () to internal/notifier/notifier.go for reuse across notifiers.
- Refactor both Discord and Slack notifiers to use the shared ShouldAlert function, reducing code duplication.
- Enhance Discord alert messages with advanced Markdown, emoji, and improved formatting for better readability in Discord channels.
- Update and expand tests in discord_test.go to verify the new message formatting and shared alert logic.
@iam404
Copy link
Member

iam404 commented Jul 24, 2025

Looks good to me. @tarunteja483 can you verify and merge it with the next release.

@tarunteja483
Copy link
Collaborator

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants