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

Default alert settings not used for external endpoint #768

Closed
JELTAD opened this issue May 19, 2024 · 3 comments
Closed

Default alert settings not used for external endpoint #768

JELTAD opened this issue May 19, 2024 · 3 comments
Labels
area/alerting Related to alerting bug Something isn't working cannot reproduce This doesn't seem right

Comments

@JELTAD
Copy link

JELTAD commented May 19, 2024

Describe the bug

I have setup discord alerts with some default-alert settings. When adding

alerts:
    - type: discord

to a normal endpoint, these default-alert settings are followed, but this is not the case with external endpoints. The other alert settings as title and webhook-url do work as expected.

What do you see?

No response

What do you expect to see?

No response

List the steps that must be taken to reproduce this issue

No response

Version

No response

Additional information

No response

@JELTAD JELTAD added the bug Something isn't working label May 19, 2024
@TwiN TwiN added the area/alerting Related to alerting label May 19, 2024
@TwiN
Copy link
Owner

TwiN commented May 19, 2024

Can you provide a configuration with both a normal endpoint and an external endpoint to reproduce the issue? (you can modify the webhook, I just need something that can let me reproduce the issue locally)

@JELTAD
Copy link
Author

JELTAD commented May 19, 2024

Of course

alerting:
  discord:
    webhook-url: "https://discord.com/api/webhooks/"
    title: "Gatus"
    default-alert:
      enabled: true
      failure-threshold: 2
      success-threshold: 1
      send-on-resolved: true
      description: "Status changed"

endpoint-defaults: &endpoint-defaults
  interval: 60s
  conditions:
    - "[STATUS] == 200"
  alerts:
    - type: discord

endpoints:
  - name: Google
    url: https://www.google.com
    <<: *endpoint-defaults

external-endpoints:
  - name: ext-ep-test
    group: core
    token: potato
    alerts:
      - type: discord

The normal endpoint sends a message after 2 failures and when it succeeds again. The external one sends a message after 3 failures and none when it succeeds again (the default behavior iirc) . The title for all alerts is correct.

TwiN added a commit that referenced this issue May 19, 2024
@TwiN
Copy link
Owner

TwiN commented May 19, 2024

@JELTAD I removed some duplicated code related to external endpoint alerts in fdd00e7, but I don't think it really changed anything. I wasn't able to reproduce your issue.

@TwiN TwiN added the cannot reproduce This doesn't seem right label May 19, 2024
@TwiN TwiN closed this as not planned Won't fix, can't repro, duplicate, stale May 26, 2024
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 cannot reproduce This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants