You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Webhook templates must render valid JSON. Email templates may render text or HTML.
163
+
Webhook templates must render valid JSON. Email templates may render text or HTML. When `--public-url` is configured, templates can use `.App.PublicURL`, `.App.CheckInURL`, and `.App.StatusURL`.
162
164
163
165
See [docs/templates.md](docs/templates.md) for built-in templates, template data, and helper functions.
164
166
@@ -187,3 +189,5 @@ See [docs/api.md](docs/api.md) for response examples and route prefix details.
187
189
## License
188
190
189
191
This project is licensed under the Apache 2.0 License. See the [LICENSE](LICENSE) file for details.
|`--listen-address`|`OVERDUE__LISTEN_ADDRESS`|`:8080`| HTTP server listen address. |
40
41
|`--route-prefix`|`OVERDUE__ROUTE_PREFIX`| empty | Path prefix to mount the service under. |
42
+
|`--public-url`|`OVERDUE__PUBLIC_URL`| empty | Externally reachable base URL used in notification templates. |
41
43
|`--check-in-name`|`OVERDUE__CHECK_IN_NAME`|`default`| Name of the check-in monitor used in notifications. |
42
44
|`--check-in-path`|`OVERDUE__CHECK_IN_PATH`|`/check-in`| Route used to receive check-ins. |
43
45
|`--expected-every`|`OVERDUE__EXPECTED_EVERY`| required | Maximum time between check-ins. |
@@ -132,6 +134,34 @@ This becomes:
132
134
/overdue
133
135
```
134
136
137
+
## Public URL
138
+
139
+
Use `--public-url` to expose externally reachable links to notification templates. The value may include an ingress or reverse-proxy path prefix. It is not derived from `--listen-address`, because listen addresses such as `:8080` or `0.0.0.0:8080` are usually not public URLs.
Copy file name to clipboardExpand all lines: docs/notifications.md
+4Lines changed: 4 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,6 +23,8 @@ And this creates an email target named `primary`:
23
23
24
24
If no notification targets are configured, Overdue still runs and records status, but sends no notifications.
25
25
26
+
Set `--public-url` when notification templates should include externally reachable Overdue links. The value is exposed as `.App.PublicURL`; `.App.CheckInURL` and `.App.StatusURL` are derived from it.
27
+
26
28
## Environment variables
27
29
28
30
Dynamic notification flags include the target name.
@@ -269,3 +271,5 @@ For fan-out delivery, successful targets are not called again on the next retry.
269
271
Retry backoff starts at `1s` and is capped at `1m`.
270
272
271
273
Both alerting and resolved notifications keep their `.NotificationID` across retries.
|`.Resolved`| bool |`true` for resolved notifications. |
64
64
|`.Title`| string | Rendered notification title. Available in body and subject templates. |
65
65
|`.Text`| string | Rendered notification text. Available in body templates. |
66
+
|`.App`| struct | Application link data derived from `--public-url`. Empty when no public URL is configured. |
66
67
|`.CustomData`| map[string]string | Target-local custom data from `--webhook.<name>.custom-data` or `--email.<name>.custom-data`. |
67
68
69
+
`.App` contains `.App.PublicURL`, `.App.CheckInURL`, and `.App.StatusURL`. `--public-url` is the externally reachable base URL and may include a path prefix. `.App.CheckInURL` appends the configured check-in path, and `.App.StatusURL` appends `/status`.
70
+
68
71
Custom data keys that are valid Go template identifiers can be read with dot notation, such as `.CustomData.channel`. Other keys can be read with `index`, such as `{{ index .CustomData "team-name" }}`.
0 commit comments