-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* bookmark * bookmark * initial commit * adding OwnerReferences to webhooks * adding deletion logic * adding e2e tests * changing tests folder names * fixing tests * fixing test * refactoring * adding support for RepeatInterval * adding support for group-by, and seperating routes to different notification-groups * skipping alert and webhooks in a case of an error * fixing tests
- Loading branch information
Showing
36 changed files
with
1,717 additions
and
75 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
apiVersion: monitoring.coreos.com/v1alpha1 | ||
kind: AlertmanagerConfig | ||
metadata: | ||
name: config-example | ||
labels: | ||
alertmanagerConfig: example | ||
app.coralogix.com/track-alertmanger-config: "true" | ||
spec: | ||
route: | ||
groupBy: | ||
- alertname | ||
- cluster | ||
- alert_group | ||
- job | ||
- namespace | ||
- severity | ||
- priority | ||
receiver: slack-default | ||
repeatInterval: 3h | ||
routes: | ||
- receiver: slack-general | ||
matchers: | ||
- matchType: "=~" | ||
name: slack_channel | ||
value: ".+" | ||
continue: true | ||
- receiver: opsgenie-general | ||
groupBy: | ||
- alertname | ||
matchers: | ||
- matchType: "=~" | ||
name: opsgenie_team | ||
value: ".+" | ||
repeatInterval: 4m | ||
receivers: | ||
- name: slack-general | ||
slackConfigs: | ||
- apiURL: | ||
name: "slack-webhook-secret" # Name of the Kubernetes Secret | ||
key: "webhook-url" # Key in the Kubernetes Secret | ||
- name: opsgenie-general | ||
opsgenieConfigs: | ||
- apiURL: https://api.opsgenie.com/v2/alerts | ||
- name: slack-default | ||
slackConfigs: | ||
- apiURL: | ||
name: "slack-webhook-secret" # Name of the Kubernetes Secret | ||
key: "webhook-url" # Key in the Kubernetes Secret |
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,8 @@ | ||
apiVersion: v1 | ||
kind: Secret | ||
metadata: | ||
name: slack-webhook-secret # Name of the secret | ||
namespace: default # Namespace where the secret is created | ||
type: Opaque | ||
data: | ||
webhook-url: aHR0cHM6Ly9zbGFjay5jb20vYXBpL2NoYXQucG9zdE1lc3NhZ2U= # Base64 encoded API URL |
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
Oops, something went wrong.