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

fix(alerting): Add missing support for default-alert on teams-workflows #883

Merged
merged 1 commit into from
Oct 31, 2024

Conversation

liamjones-pw
Copy link
Contributor

@liamjones-pw liamjones-pw commented Oct 29, 2024

Summary

I noticed some weird behaviour where I wasn't getting alert resolved notifications through the new teams-workflows provider, while other alerting providers were working with the same config.

I went spelunking and while doing so, noticed teams-workflows was missing from the configuredProviders list at startup, even though it was sending alerts. This led me on the path to making the changes in the PR, which seem to have resolved the default-alerts issue.

Example config where aws-ses was working, while teams-workflow was not.

alerting:
  teams-workflows:
    webhook-url: "xxx"
    default-alert:
      description: "healthcheck failed 3 times in a row"
      send-on-resolved: true
  aws-ses:
    region: "xxx"
    from: "xxx"
    to: "xxx"
    default-alert:
      description: "healthcheck failed 3 times in a row"
      send-on-resolved: true

app-default: &app-default
  group: "apps"
  interval: "30s"
  conditions:
    - "[STATUS] == 200"
  alerts:
    - type: aws-ses
    - type: teams-workflows

endpoints:
  - name: "teams test"
    <<: *app-default
    url: "https://microsoftzzzzzzz.com"

Checklist

  • Tested and/or added tests to validate that the changes work as intended, if applicable.
  • Updated documentation in README.md, if applicable.

Copy link
Owner

@TwiN TwiN left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch!

@TwiN TwiN added the bug Something isn't working label Oct 31, 2024
@TwiN TwiN changed the title Fix default-alert on teams-workflows fix(alerting): Add missing support for default-alert on teams-workflows Oct 31, 2024
@codecov-commenter
Copy link

⚠️ Please install the 'codecov app svg image' to ensure uploads and comments are reliably processed by Codecov.

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 77.59%. Comparing base (ff4b09d) to head (3b9ba46).
Report is 1 commits behind head on master.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #883      +/-   ##
==========================================
- Coverage   79.35%   77.59%   -1.76%     
==========================================
  Files          72       72              
  Lines        4853     5775     +922     
==========================================
+ Hits         3851     4481     +630     
- Misses        786     1078     +292     
  Partials      216      216              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@TwiN TwiN added the area/alerting Related to alerting label Oct 31, 2024
@TwiN TwiN merged commit 40cbb4b into TwiN:master Oct 31, 2024
1 check passed
@liamjones-pw liamjones-pw deleted the fix/teams-workflows branch November 1, 2024 03:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/alerting Related to alerting bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants