renamed google-chat to gchat
This commit is contained in:
parent
7b1947acd4
commit
ae79eda745
5 changed files with 13 additions and 13 deletions
|
|
@ -20,9 +20,9 @@ module "datasource" {
|
|||
}
|
||||
|
||||
# Alert Receiver / Contact Point
|
||||
module "google-chat-contact-point" {
|
||||
module "gchat-contact-point" {
|
||||
source = "git::https://commerce-platform.git.onstackit.cloud/commerce-platform-public/terraform-modules//grafana/contact-point-gchat?ref=main"
|
||||
google-chat-url = var.google_chat_url
|
||||
gchat-url = var.google_chat_url
|
||||
contact-point-name = "gchat"
|
||||
}
|
||||
|
||||
|
|
@ -45,11 +45,11 @@ module "message-templates" {
|
|||
module "notification-policy" {
|
||||
source = "git::https://commerce-platform.git.onstackit.cloud/commerce-platform-public/terraform-modules//grafana/notification-policy?ref=main"
|
||||
|
||||
default_contact_point_uid = module.google-chat-contact-point.contact_name
|
||||
default_contact_point_uid = module.gchat-contact-point.contact_name
|
||||
group_by = ["alertname"]
|
||||
|
||||
folder_policies = {
|
||||
"Alerts" = module.google-chat-contact-point.contact_name
|
||||
"Alerts" = module.gchat-contact-point.contact_name
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -59,7 +59,7 @@ module "alerting" {
|
|||
|
||||
alerts_dir = "alerts"
|
||||
default_datasource_uid = module.datasource.datasource_uid
|
||||
default_receiver = module.google-chat-contact-point.contact_name
|
||||
default_receiver = module.gchat-contact-point.contact_name
|
||||
default_folder_uid = module.alert-folder.folder_uid
|
||||
default_interval_seconds = 60
|
||||
disable_provenance = true
|
||||
|
|
|
|||
|
|
@ -2,8 +2,8 @@ resource "grafana_contact_point" "this" {
|
|||
name = var.contact-point-name
|
||||
|
||||
googlechat {
|
||||
url = var.google-chat-url
|
||||
message = "{{ template \"google-chat-body-template\" . }}"
|
||||
title = "{{ template \"google-chat-title-template\" . }}"
|
||||
url = var.gchat-url
|
||||
message = "{{ template \"gchat-body-template\" . }}"
|
||||
title = "{{ template \"gchat-title-template\" . }}"
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,11 @@
|
|||
# Grafana contact point
|
||||
variable "google-chat-url" {
|
||||
description = "google-chat-webhook url"
|
||||
variable "gchat-url" {
|
||||
description = "gchat-webhook url"
|
||||
type = string
|
||||
sensitive = true
|
||||
}
|
||||
|
||||
variable "contact-point-name" {
|
||||
description = "google-chat-contact-point-name"
|
||||
description = "gchat-contact-point-name"
|
||||
type = string
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "google-chat-body-template" -}}
|
||||
{{ define "gchat-body-template" -}}
|
||||
{{- $alerts := .Alerts }}
|
||||
{{- if not $alerts }}{{ $alerts = . }}{{ end }}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
{{ define "google-chat-title-template" -}}
|
||||
{{ define "gchat-title-template" -}}
|
||||
{{- if eq .Status "firing" -}}
|
||||
🔥 Firing:
|
||||
{{- else if eq .Status "resolved" -}}
|
||||
|
|
|
|||
Loading…
Reference in a new issue