This repository was archived by the owner on May 29, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 441
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
35 changed files
with
1,555 additions
and
279 deletions.
There are no files selected for viewing
File renamed without changes.
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 |
---|---|---|
|
@@ -2,4 +2,5 @@ | |
config.env | ||
/.vscode/ | ||
/.idea | ||
genesis.json | ||
genesis.json | ||
alert-routing.yaml |
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,27 @@ | ||
## This is a template for alert routing configuration. | ||
alertRoutes: | ||
low: | ||
slack: | ||
low_oncall: | ||
url: "" | ||
channel: "" | ||
|
||
medium: | ||
slack: | ||
medium_oncall: | ||
url: "" | ||
channel: "" | ||
medium_oncall: | ||
config: | ||
integration_key: "" | ||
|
||
high: | ||
slack: | ||
high_oncall: | ||
url: "" | ||
channel: "" | ||
pagerduty: | ||
high_oncall: | ||
integration_key: ${MY_INTEGRATION_KEY} | ||
medium_oncall: | ||
integration_key: "" |
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,53 @@ | ||
--- | ||
layout: page | ||
title: Alert Routing | ||
permalink: /alert-routing | ||
--- | ||
|
||
|
||
## Overview | ||
The alert routing feature enables users to define a number of alert destinations and then route alerts to those | ||
destinations based on the alert's severity. For example, a user may want to send all alerts to Slack but only send high | ||
severity alerts to PagerDuty. | ||
|
||
|
||
## How it works | ||
Alerts are routed to destinations based on the severity of the given heuristic. | ||
When a heuristic is deployed, the user must specify the severity of the alert that the heuristic will produce. | ||
When the heuristic is run, the alert is routed to the configured destinations based on the severity of the alert. | ||
For example, if a heuristic is configured to produce a high severity alert, the alert will be routed to all configured | ||
destinations that support high severity alerts. | ||
|
||
Each severity level is configured independently for each alert destination. A user can add any number of alert | ||
configurations per severity. | ||
|
||
Located in the root directory you'll find a file named `alerts-template.yaml`. This file contains a template for | ||
configuring alert routing. The template contains a few examples on how you might want to configure your alert routing. | ||
|
||
## Supported Alert Destinations | ||
Pessimism currently supports the following alert destinations: | ||
|
||
| Name | Description | | ||
|-----------|-------------------------------------| | ||
| slack | Sends alerts to a Slack channel | | ||
| pagerduty | Sends alerts to a PagerDuty service | | ||
|
||
## Alert Severity | ||
Pessimism currently defines the following severities for alerts: | ||
|
||
| Severity | Description | | ||
|----------|-----------------------------------------------------------------------------| | ||
| low | Alerts that may not require immediate attention | | ||
| medium | Alerts that could be hazardous, but may not be completely destructive | | ||
| high | Alerts that require immediate attention and could result in a loss of funds | | ||
|
||
|
||
## PagerDuty Severity Mapping | ||
PagerDuty supports the following severities: `critical`, `error`, `warning`, and `info`. | ||
Pessimism maps the Pessimism severities to [PagerDuty severities](https://developer.pagerduty.com/docs/ZG9jOjExMDI5NTgx-send-an-alert-event) as follows ([ref](../internal/core/alert.go)): | ||
|
||
| Pessimism | PagerDuty | | ||
|-----------|-----------| | ||
| low | warning | | ||
| medium | error | | ||
| high | 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,30 @@ | ||
alertRoutes: | ||
low: | ||
slack: | ||
config: | ||
url: "http://127.0.0.1:7100" | ||
channel: "#test-low" | ||
|
||
medium: | ||
slack: | ||
config: | ||
url: "http://127.0.0.1:7100" | ||
channel: "#test-medium" | ||
pagerduty: | ||
config: | ||
integration_key: "test-medium" | ||
|
||
high: | ||
slack: | ||
config: | ||
url: "http://127.0.0.1:7100" | ||
channel: "#test-high" | ||
config_2: | ||
url: "http://127.0.0.1:7100" | ||
channel: "#test-high-2" | ||
|
||
pagerduty: | ||
config: | ||
integration_key: "test-high-1" | ||
config_2: | ||
integration_key: "test-high-2" |
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
Oops, something went wrong.