mirror of
https://github.com/plausible/analytics.git
synced 2024-09-11 18:07:33 +03:00
Add webhook alert from Checkly -> Instatus (#2840)
* Add webhook alert from Checkly -> Instatus * `terraform fmt` * Send api healthcheck failures to TF --------- Co-authored-by: Cenk Kücük <cenk@plausible.io>
This commit is contained in:
parent
6fa558b651
commit
c550a87e01
@ -26,6 +26,10 @@ variable "checkly_alert_channel_pagerduty_service_key" {
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "checkly_alert_channel_instatus_webhook_url" {
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
provider "checkly" {
|
||||
api_key = var.checkly_api_key
|
||||
account_id = var.checkly_account_id
|
||||
@ -40,6 +44,11 @@ resource "checkly_check" "plausible-io-api-health" {
|
||||
|
||||
group_id = checkly_check_group.reachability.id
|
||||
|
||||
alert_channel_subscription {
|
||||
channel_id = checkly_alert_channel.instatus.id
|
||||
activated = true
|
||||
}
|
||||
|
||||
request {
|
||||
url = "https://plausible.io/api/health"
|
||||
follow_redirects = false
|
||||
@ -230,3 +239,14 @@ resource "checkly_alert_channel" "pagerduty" {
|
||||
service_name = "Plausible application"
|
||||
}
|
||||
}
|
||||
|
||||
resource "checkly_alert_channel" "instatus" {
|
||||
webhook {
|
||||
name = "Instatus integration"
|
||||
method = "POST"
|
||||
template = <<EOT
|
||||
{"alert": "{{ALERT_TYPE}}"}
|
||||
EOT
|
||||
url = var.checkly_alert_channel_instatus_webhook_url
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user