Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create notifications for metrics alerts #8490

Open
4 tasks
linear bot opened this issue May 7, 2024 · 2 comments
Open
4 tasks

Create notifications for metrics alerts #8490

linear bot opened this issue May 7, 2024 · 2 comments

Comments

@linear
Copy link

linear bot commented May 7, 2024

  • Email
  • Slack
  • Discord
  • Microsoft teams
Copy link
Author

linear bot commented May 7, 2024

Copy link

greptile-apps bot commented May 7, 2024

To implement notifications for metric alerts, follow these steps:

  1. Metric Monitor Job: Utilize backend/jobs/metric-monitor/metric-monitor.go to trigger alerts. Modify processMetricMonitors to include a new case for metric alerts.
  2. Alert Payloads: Define or extend metric alert payloads in /backend/model/model.go, ensuring they include necessary metric data.
  3. Discord Integration: In /backend/alerts/integrations/discord/messages.go, add a new method SendMetricMonitorAlert to format and send the metric alert using newMessageEmbed.
  4. Microsoft Teams Integration: Extend /backend/alerts/integrations/microsoft-teams/bot_messages.go with a method like SendMetricMonitorAlert that constructs and sends an adaptive card for the metric alert.
  5. Webhook Integration: In /backend/alerts/integrations/webhook/webhook.go, implement a new function SendMetricMonitorAlert to serialize the metric alert payload and send it to the specified webhook URL.

These steps provide a comprehensive approach to integrating metric alerts across various notification channels.

References

/backend/alerts/integrations/discord/messages.go
/backend/alerts/integrations/microsoft-teams/bot_messages.go
/backend/alerts/integrations/webhook/webhook.go
/backend/temp-alerts/temp-alerts.go
/backend/jobs/metric-monitor/metric-monitor.go
/backend/model/model.go

Ask Greptile

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

No branches or pull requests

0 participants