Skip to content

Commit

Permalink
Doc updates: v4 address and alerting rule.
Browse files Browse the repository at this point in the history
1. Allocate an IPv4 address in the fly.io app.
   We thought GitHub could deliver webhooks to a
   v6-only destination, but it looks like it cannot.
2. Add an example alerting rule for Grafana if
   the bot has not checked any repos in 12 hours.

Signed-off-by: Denton Gentry <dgentry@tailscale.com>
  • Loading branch information
DentonGentry committed Aug 10, 2022
1 parent 2daad4e commit 87ad647
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,9 @@ only be accessible via a private tailnet connection.

A metric of interest for monitoring is `tbrbot_repos_checked`, which counts the number of times
the bot has checked a repository for submitted PRs. This is expected to increment at least once
per hour. An alert when `tbrbot_repos_checked` goes N hours with no change is a reasonable way
to monitor TBR-bot's operation.
per hour. An alert when `tbrbot_repos_checked` goes N hours with no change is a reasonable way
to monitor TBR-bot's operation. An example alerting rule for Grafana in a panel for the
`tbrbot_repos_checked` metric is: `WHEN diff_abs() OF query (A, 12h, now) IS BELOW 1`


### Hosting
Expand All @@ -84,6 +85,7 @@ $ flyctl secrets set TS_AUTHKEY=... TBRBOT_APP_ID=... TBRBOT_APP_INSTALL=...
$ flyctl secrets set TBRBOT_WEBHOOK_SECRET=...
$ flyctl secrets set TBRBOT_APP_PRIVATE_KEY=- < pem
$ flyctl ips allocate-v6
$ flyctl ips allocate-v4
```

We recommend using a [one-time authkey with Tags set](https://tailscale.com/blog/acl-tags-ga/) to
Expand Down
1 change: 1 addition & 0 deletions fly.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
# $ flyctl secrets set TBRBOT_WEBHOOK_SECRET=...
# $ flyctl secrets set TBRBOT_APP_PRIVATE_KEY=- < pem
# $ flyctl ips allocate-v6
# $ flyctl ips allocate-v4

app = "example-tbrbot"
kill_signal = "SIGINT"
Expand Down

0 comments on commit 87ad647

Please sign in to comment.