-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
patch - adding MoreThanUsual to promql alert condition (#76)
- Loading branch information
Showing
7 changed files
with
131 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
apiVersion: coralogix.com/v1alpha1 | ||
kind: Alert | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: alert | ||
app.kubernetes.io/instance: alert-sample | ||
app.kubernetes.io/part-of: coralogix-operator | ||
app.kuberentes.io/managed-by: kustomize | ||
app.kubernetes.io/created-by: coralogix-operator | ||
name: promql-alert-example-2 | ||
status: | ||
active: true | ||
alertType: | ||
metric: | ||
promql: | ||
conditions: | ||
alertWhen: MoreThanUsual | ||
minNonNullValuesPercentage: 10 | ||
sampleThresholdPercentage: 50 | ||
threshold: "3" | ||
timeWindow: TwelveHours | ||
searchQuery: http_requests_total{status!~\"4..\"} | ||
description: alert from k8s operator | ||
name: promql alert example | ||
labels: | ||
managed-by: coralogix-operator | ||
# notificationGroups: | ||
# - notifications: | ||
# - notifyOn: TriggeredOnly | ||
# integrationName: WebhookAlerts | ||
# retriggeringPeriodMinutes: 1 | ||
# - notifyOn: TriggeredAndResolved | ||
# emailRecipients: [ "[email protected]" ] | ||
# retriggeringPeriodMinutes: 1440 | ||
# - groupByFields: [ "coralogix.metadata.sdkId" ] | ||
# notifications: | ||
# - notifyOn: TriggeredOnly | ||
# integrationName: WebhookAlerts | ||
# retriggeringPeriodMinutes: 1 | ||
# - notifyOn: TriggeredAndResolved | ||
# emailRecipients: [ "[email protected]" ] | ||
# retriggeringPeriodMinutes: 1440 | ||
scheduling: | ||
daysEnabled: | ||
- Wednesday | ||
- Thursday | ||
endTime: "20:30" | ||
startTime: "08:30" | ||
timeZone: UTC+02 | ||
severity: Critical |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
apiVersion: coralogix.com/v1alpha1 | ||
kind: Alert | ||
metadata: | ||
labels: | ||
app.kubernetes.io/name: alert | ||
app.kubernetes.io/instance: alert-sample | ||
app.kubernetes.io/part-of: coralogix-operator | ||
app.kuberentes.io/managed-by: kustomize | ||
app.kubernetes.io/created-by: coralogix-operator | ||
name: promql-alert-example-2 | ||
spec: | ||
name: promql alert example | ||
description: alert from k8s operator | ||
severity: Critical | ||
notificationGroups: | ||
- notifications: | ||
- notifyOn: TriggeredOnly | ||
integrationName: WebhookAlerts | ||
retriggeringPeriodMinutes: 1 | ||
- notifyOn: TriggeredAndResolved | ||
emailRecipients: [ "[email protected]" ] | ||
retriggeringPeriodMinutes: 1440 | ||
- groupByFields: [ "coralogix.metadata.sdkId" ] | ||
notifications: | ||
- notifyOn: TriggeredOnly | ||
integrationName: WebhookAlerts | ||
retriggeringPeriodMinutes: 1 | ||
- notifyOn: TriggeredAndResolved | ||
emailRecipients: [ "[email protected]" ] | ||
retriggeringPeriodMinutes: 1440 | ||
scheduling: | ||
daysEnabled: ["Wednesday", "Thursday"] | ||
timeZone: UTC+02 | ||
startTime: 08:30 | ||
endTime: 20:30 | ||
alertType: | ||
metric: | ||
promql: | ||
searchQuery: http_requests_total{status!~\"4..\"} | ||
conditions: | ||
alertWhen: MoreThanUsual | ||
threshold: 3 | ||
sampleThresholdPercentage: 50 | ||
timeWindow: TwelveHours | ||
minNonNullValuesPercentage: 10 |