Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
85 changes: 85 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,7 @@ Have any feedback or questions? [Create a discussion](https://github.com/TwiN/ga
- [Tunneling](#tunneling)
- [Alerting](#alerting)
- [Configuring AWS SES alerts](#configuring-aws-ses-alerts)
- [Configuring ClickUp alerts](#configuring-clickup-alerts)
- [Configuring Datadog alerts](#configuring-datadog-alerts)
- [Configuring Discord alerts](#configuring-discord-alerts)
- [Configuring Email alerts](#configuring-email-alerts)
Expand Down Expand Up @@ -827,6 +828,7 @@ endpoints:
| Parameter | Description | Default |
|:---------------------------|:----------------------------------------------------------------------------------------------------------------------------------------|:--------|
| `alerting.awsses` | Configuration for alerts of type `awsses`. <br />See [Configuring AWS SES alerts](#configuring-aws-ses-alerts). | `{}` |
| `alerting.clickup` | Configuration for alerts of type `clickup`. <br />See [Configuring ClickUp alerts](#configuring-clickup-alerts). | `{}` |
| `alerting.custom` | Configuration for custom actions on failure or alerts. <br />See [Configuring Custom alerts](#configuring-custom-alerts). | `{}` |
| `alerting.datadog` | Configuration for alerts of type `datadog`. <br />See [Configuring Datadog alerts](#configuring-datadog-alerts). | `{}` |
| `alerting.discord` | Configuration for alerts of type `discord`. <br />See [Configuring Discord alerts](#configuring-discord-alerts). | `{}` |
Expand Down Expand Up @@ -908,6 +910,89 @@ If the `access-key-id` and `secret-access-key` are not defined Gatus will fall b
Make sure you have the ability to use `ses:SendEmail`.


#### Configuring ClickUp alerts

| Parameter | Description | Default |
| :--------------------------------- | :----------------------------------------------------------------------------------------- | :------------ |
| `alerting.clickup` | Configuration for alerts of type `clickup` | `{}` |
| `alerting.clickup.list-id` | ClickUp List ID where tasks will be created | Required `""` |
| `alerting.clickup.token` | ClickUp API token | Required `""` |
| `alerting.clickup.api-url` | Custom API URL | `https://api.clickup.com/api/v2` |
| `alerting.clickup.assignees` | List of user IDs to assign tasks to | `[]` |
| `alerting.clickup.status` | Initial status for created tasks | `""` |
| `alerting.clickup.priority` | Priority level for created tasks (1-4) | `0` |
| `alerting.clickup.name` | Custom task name template (supports placeholders) | `Health Check: [ENDPOINT_GROUP]:[ENDPOINT_NAME]` |
| `alerting.clickup.content` | Custom task content template (supports placeholders) | `Triggered: [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION] - [RESULT_ERRORS]` |
| `alerting.clickup.default-alert` | Default alert configuration. <br />See [Setting a default alert](#setting-a-default-alert) | N/A |
| `alerting.clickup.overrides` | List of overrides that may be prioritized over the default configuration | `[]` |
| `alerting.clickup.overrides[].group` | Endpoint group for which the configuration will be overridden by this configuration | `""` |
| `alerting.clickup.overrides[].*` | See `alerting.clickup.*` parameters | `{}` |

The ClickUp alerting provider creates tasks in a ClickUp list when alerts are triggered. If `send-on-resolved` is set to `true` on the endpoint alert, the task will be automatically closed when the alert is resolved.

The following placeholders are supported in `name` and `content`:

- `[ENDPOINT_GROUP]` - Resolved from `endpoints[].group`
- `[ENDPOINT_NAME]` - Resolved from `endpoints[].name`
- `[ALERT_DESCRIPTION]` - Resolved from `endpoints[].alerts[].description`
- `[RESULT_ERRORS]` - Resolved from the health evaluation errors

```yaml
alerting:
clickup:
list-id: "123456789"
token: "pk_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"
assignees:
- "12345"
- "67890"
status: "in progress"
priority: 2
name: "Health Check Alert: [ENDPOINT_GROUP] - [ENDPOINT_NAME]"
content: "Alert triggered for [ENDPOINT_GROUP] - [ENDPOINT_NAME] - [ALERT_DESCRIPTION] - [RESULT_ERRORS]"
# You can also add group-specific configurations, which will
# override the default configuration for the specified groups
overrides:
- group: "core"
list-id: "987654321"
priority: 1

endpoints:
- name: website
url: "https://twin.sh/health"
interval: 5m
conditions:
- "[STATUS] == 200"
- "[BODY].status == UP"
- "[RESPONSE_TIME] < 300"
alerts:
- type: clickup
failure-threshold: 2
success-threshold: 3
send-on-resolved: true
description: "healthcheck failed"

- name: back-end
group: core
url: "https://example.org/"
interval: 5m
conditions:
- "[STATUS] == 200"
- "[CERTIFICATE_EXPIRATION] > 48h"
alerts:
- type: clickup
failure-threshold: 2
success-threshold: 3
send-on-resolved: true
description: "healthcheck failed"
```

To get your ClickUp API token follow: [Generate or regenerate a Personal API Token](https://developer.clickup.com/docs/authentication#:~:text=the%20API%20docs.-,Generate%20or%20regenerate%20a%20Personal%20API%20Token,-Log%20in%20to)

To find your List ID:

1. Open the ClickUp list where you want tasks to be created
2. The List ID is in the URL: `https://app.clickup.com/{workspace_id}/v/l/li/{list_id}`

#### Configuring Datadog alerts

> ⚠️ **WARNING**: This alerting provider has not been tested yet. If you've tested it and confirmed that it works, please remove this warning and create a pull request, or comment on [#1223](https://github.com/TwiN/gatus/discussions/1223) with whether the provider works as intended. Thank you for your cooperation.
Expand Down
3 changes: 3 additions & 0 deletions alerting/alert/type.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ const (
// TypeAWSSES is the Type for the awsses alerting provider
TypeAWSSES Type = "aws-ses"

// TypeClickUp is the Type for the clickup alerting provider
TypeClickUp Type = "clickup"

// TypeCustom is the Type for the custom alerting provider
TypeCustom Type = "custom"

Expand Down
4 changes: 4 additions & 0 deletions alerting/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/TwiN/gatus/v5/alerting/alert"
"github.com/TwiN/gatus/v5/alerting/provider"
"github.com/TwiN/gatus/v5/alerting/provider/awsses"
"github.com/TwiN/gatus/v5/alerting/provider/clickup"
"github.com/TwiN/gatus/v5/alerting/provider/custom"
"github.com/TwiN/gatus/v5/alerting/provider/datadog"
"github.com/TwiN/gatus/v5/alerting/provider/discord"
Expand Down Expand Up @@ -54,6 +55,9 @@ type Config struct {
// AWSSimpleEmailService is the configuration for the aws-ses alerting provider
AWSSimpleEmailService *awsses.AlertProvider `yaml:"aws-ses,omitempty"`

// ClickUp is the configuration for the clickup alerting provider
ClickUp *clickup.AlertProvider `yaml:"clickup,omitempty"`

// Custom is the configuration for the custom alerting provider
Custom *custom.AlertProvider `yaml:"custom,omitempty"`

Expand Down
Loading