-
Notifications
You must be signed in to change notification settings - Fork 263
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'master' into kubectl-job
- Loading branch information
Showing
21 changed files
with
522 additions
and
367 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
|
@@ -3,7 +3,16 @@ name: Test robusta with pytest | |
on: [push, pull_request, workflow_dispatch] | ||
|
||
jobs: | ||
check: | ||
name: Pre-commit checks | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-python@v5 | ||
- uses: pre-commit/[email protected] | ||
|
||
run_tests: | ||
needs: check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
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
36 changes: 36 additions & 0 deletions
36
docs/notification-routing/implementing-monitoring-shifts.rst
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,36 @@ | ||
Route By Time of Day | ||
#################### | ||
|
||
In this example we'll route alerts to different support teams based on the time of day: | ||
|
||
* Between 12AM and 12PM, #shift-1 will receive alerts. | ||
* The rest of the time, #payment-support-2 will recieve notifications. | ||
|
||
.. code-block:: yaml | ||
sinksConfig: | ||
- slack_sink: | ||
name: shift_1_sink | ||
slack_channel: shift-1 | ||
api_key: secret-key | ||
activity: | ||
timezone: UTC | ||
intervals: | ||
- days: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] | ||
hours: | ||
- start: 00:00 # 12 AM | ||
end: 12:00 # 12 PM | ||
- slack_sink: | ||
name: shift_2_sink | ||
slack_channel: shift-2 | ||
api_key: secret-key | ||
activity: | ||
timezone: UTC | ||
intervals: | ||
- days: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] | ||
hours: | ||
- start: 12:00 # 12 PM | ||
end: 23:59 # 11:59 PM | ||
For more information on time-based routing, view :ref:`Route by Time`. |
106 changes: 10 additions & 96 deletions
106
docs/notification-routing/notification-routing-examples.rst
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 |
---|---|---|
@@ -1,100 +1,14 @@ | ||
Common Examples | ||
Routing Cookbook | ||
=================================== | ||
|
||
Here are examples of common routing patterns that teams use with Robusta. The goal is to send each team only the most relevant alerts. | ||
.. toctree:: | ||
:maxdepth: 1 | ||
:hidden: | ||
|
||
Use Case 1: Route Specific Alerts to Seperate Teams and Slack Channels | ||
********************************************************************************** | ||
In this example we are going to consider two teams, with #frontend and #backend channels. The Frontend team should only receive alerts that are from the Frontend namespace. All the alerts from backend namespace should go to the #backend channel | ||
routing-by-namespace | ||
routing-by-type | ||
implementing-monitoring-shifts | ||
routing-to-multiple-slack-channels | ||
routing-exclusion | ||
|
||
|
||
.. code-block:: yaml | ||
sinksConfig: | ||
- slack_sink: | ||
name: frontend_sink | ||
slack_channel: frontend-notifications | ||
api_key: secret-key | ||
scope: | ||
include: | ||
- namespace: [frontend] | ||
- slack_sink: | ||
name: backend_sink | ||
slack_channel: backend-notifications | ||
api_key: secret-key | ||
scope: | ||
include: | ||
- namespace: [backend] | ||
For a complete list of filters, view the :ref:`Scopes documentation <sink-scope-matching>`. | ||
|
||
Use Case 2: Route Alerts To Different Support Teams Based On Time Of The Day | ||
********************************************************************************** | ||
|
||
Let's see how we can route alerts between two teams with different Slack channels. Between 12AM to 12 PM #payments-support-1 should receive alerts. The rest of the time #payment-support-2 should recieve notifications. | ||
|
||
.. code-block:: yaml | ||
sinksConfig: | ||
- slack_sink: | ||
name: payments_support_1_sink | ||
slack_channel: payments-support-1 | ||
api_key: secret-key | ||
activity: | ||
timezone: UTC | ||
intervals: | ||
- days: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] | ||
hours: | ||
- start: 00:00 # 12 AM | ||
end: 12:00 # 12 PM | ||
- slack_sink: | ||
name: payments_support_2_sink | ||
slack_channel: payments-support-2 | ||
api_key: secret-key | ||
activity: | ||
timezone: UTC | ||
intervals: | ||
- days: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] | ||
hours: | ||
- start: 12:00 # 12 PM | ||
end: 23:59 # 11:59 PM | ||
For more information on time-based routing, :ref:`view <Route by Time>` | ||
|
||
If you want to selectively apply time-based-routing to certain alerts only, then this method can be combined with :ref:`Scopes <sink-scope-matching>`. For example: | ||
|
||
.. code-block:: yaml | ||
sinksConfig: | ||
- slack_sink: | ||
name: payments_support_1_sink | ||
slack_channel: payments-support-1 | ||
api_key: secret-key | ||
activity: | ||
timezone: UTC | ||
intervals: | ||
- days: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] | ||
hours: | ||
- start: 00:00 # 12 AM | ||
end: 12:00 # 12 PM | ||
scope: | ||
include: | ||
- namespace: [payment, renewal] | ||
- slack_sink: | ||
name: payments_support_2_sink | ||
slack_channel: payments-support-2 | ||
api_key: secret-key | ||
activity: | ||
timezone: UTC | ||
intervals: | ||
- days: ['mon', 'tue', 'wed', 'thu', 'fri', 'sat', 'sun'] | ||
hours: | ||
- start: 12:00 # 12 PM | ||
end: 23:59 # 11:59 PM | ||
scope: | ||
include: | ||
- namespace: [payment, renewal] | ||
In this section you'll find example configurations for common routing patterns. |
Oops, something went wrong.