-
-
Notifications
You must be signed in to change notification settings - Fork 611
Open
Labels
area/alertingRelated to alertingRelated to alertingbugSomething isn't workingSomething isn't working
Description
Describe the bug
Custom alerts defined for endpoints within suites do not respect alerting.custom.default-alert settings, namely failure-threshold: 1, and uses default value of 3. Also alerting.custom.default-alert.success-threshold: 1 and alerting.custom.default-alert.send-on-resolved: true have no effect at all and resolve alerts are not sent.
If failure-threshold and others are defined at suites.endpoints.alerts instead of alerting.custom.default-alert then everything works as expected and resolve alerts are sent also.
What do you see?
Alerts sent after 3 failures. Resolve alerts are not sent.
What do you expect to see?
Alerts sent after 1 failures. Resolve alerts are sent after 1 success.
List the steps that must be taken to reproduce this issue
#cat alerting.yml
alerting:
custom:
url: "https://some-url"
method: "POST"
headers:
Authorization: "Bearer blah"
Content-Type: "application/json"
body: |
{
"group_chat_id": "blah", "notification": {"body": "[ALERT_TRIGGERED_OR_RESOLVED] [ENDPOINT_NAME]! -> [RESULT_CONDITIONS]"}
}
default-alert:
send-on-resolved: true
failure-threshold: 1
success-threshold: 1
# head -n30 suites.yaml
suites:
- name: some.host
group: "some.host"
interval: 1m
endpoints:
- name: some.host-icmp
url: "icmp://some.host"
conditions:
- "[CONNECTED] == true"
- name: some.host-http
url: http://some.host
conditions:
- "[STATUS] == 200"
alerts:
- type: custom
Version
v5.31.0
Additional information
No response
Metadata
Metadata
Assignees
Labels
area/alertingRelated to alertingRelated to alertingbugSomething isn't workingSomething isn't working