Skip to content

Commit

Permalink
Making Slack alert documentation consistent (#111)
Browse files Browse the repository at this point in the history
  • Loading branch information
peterthesling authored Dec 23, 2020
1 parent 4ae0c39 commit 6b4fed9
Showing 1 changed file with 17 additions and 5 deletions.
22 changes: 17 additions & 5 deletions docs/features/metrics.md
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,9 @@ A full list of all historical values are saved in `~/.whale/metrics`.


## Slack alerts
{% hint style="warning" %}
We are building out our dedicated 🐳 Slack app, but in the meantime, feel free to join [our community](https://join.slack.com/t/df-whale/shared_invite/zt-k4zmmzw2-mFuBJE1er4AEuW6PF9cpfw) and set up alerts there.
{% endhint %}

Metrics can be enhanced with Slack alerts. These will send a message to you or your channel if a certain condition is met.
The syntax is as follows:
Expand All @@ -109,7 +112,8 @@ metric-name:
alerts:
- condition: "condition"
message: "message"
- slack: ["channel"]
slack:
- "channel"
```

Using the earlier example we could set an alert every time we find a null in column `user_id` like this:
Expand All @@ -125,7 +129,9 @@ null-registrations:
alerts:
- condition: "> 0"
message: "Nulls found in column 'user_id' of mart.user_signups."
channel: ["#data-monitoring", "@bob"]
slack:
- "#data-monitoring"
- "@bob"
```

As you can see, you can send a message on Slack to _individuals_ as well as Slack _channels_.
Expand Down Expand Up @@ -158,10 +164,14 @@ null-registrations:
alerts:
- condition: ">0"
message: "Nulls found in column 'id' of mart.user_signups."
channel: ["#data-monitoring", "@bob"]
slack:
- "#data-monitoring"
- "@bob"
- condition: "> 100"
message: "More than 100 nulls found in column 'id' of mart.user_signups."
channel: ["#incident-room", "@joseph"]
slack:
- "#incident-room"
- "@joseph"
distinct-registrations:
sql: |
Expand All @@ -172,5 +182,7 @@ distinct-registrations:
alerts:
- condition: "<10"
message: "Less than 10 users in mart.user_signups."
channel: ["#data-monitoring", "@bob"]
slack:
- "#data-monitoring"
- "@bob"
```

0 comments on commit 6b4fed9

Please sign in to comment.