mirror of
https://github.com/outbackdingo/cozystack.git
synced 2026-01-27 18:18:41 +00:00
[monitoring] add settings alert for slack (#1545)
**What this PR does** This PR adds configuration for sending alerts from Alerta to Slack. **Key changes** Added Slack integration configuration in Alerta settings.
This commit is contained in:
@@ -72,6 +72,8 @@
|
||||
| `alerta.alerts.telegram.token` | Telegram token for your bot | `string` | `""` |
|
||||
| `alerta.alerts.telegram.chatID` | Specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot | `string` | `""` |
|
||||
| `alerta.alerts.telegram.disabledSeverity` | List of severity without alerts, separated by comma like: "informational,warning" | `string` | `""` |
|
||||
| `alerta.alerts.slack` | Configuration for Slack alerts | `*object` | `null` |
|
||||
| `alerta.alerts.slack.url` | Configuration uri for Slack alerts | `*string` | `""` |
|
||||
|
||||
|
||||
### Grafana configuration
|
||||
|
||||
@@ -109,9 +109,20 @@ spec:
|
||||
- name: AUTH_REQUIRED
|
||||
value: "True"
|
||||
|
||||
{{- $plugins := list }}
|
||||
{{- if and .Values.alerta.alerts.telegram.chatID .Values.alerta.alerts.telegram.token }}
|
||||
{{- $plugins = append $plugins "telegram" }}
|
||||
{{- end }}
|
||||
{{- if .Values.alerta.alerts.slack.url }}
|
||||
{{- $plugins = append $plugins "slack" }}
|
||||
{{- end }}
|
||||
|
||||
{{- if gt (len $plugins) 0 }}
|
||||
- name: "PLUGINS"
|
||||
value: "telegram"
|
||||
value: "{{ default "" (join "," $plugins) }}"
|
||||
{{- end }}
|
||||
|
||||
{{- if and .Values.alerta.alerts.telegram.chatID .Values.alerta.alerts.telegram.token }}
|
||||
- name: TELEGRAM_CHAT_ID
|
||||
value: "{{ .Values.alerta.alerts.telegram.chatID }}"
|
||||
- name: TELEGRAM_TOKEN
|
||||
@@ -122,6 +133,11 @@ spec:
|
||||
value: "{{ .Values.alerta.alerts.telegram.disabledSeverity }}"
|
||||
{{- end }}
|
||||
|
||||
{{- if .Values.alerta.alerts.slack.url }}
|
||||
- name: "SLACK_WEBHOOK_URL"
|
||||
value: "{{ .Values.alerta.alerts.slack.url }}"
|
||||
{{- end }}
|
||||
|
||||
ports:
|
||||
- name: http
|
||||
containerPort: 8080
|
||||
|
||||
@@ -12,6 +12,17 @@
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"properties": {
|
||||
"slack": {
|
||||
"description": "Configuration for Slack alerts",
|
||||
"type": "object",
|
||||
"default": {},
|
||||
"properties": {
|
||||
"url": {
|
||||
"description": "Configuration uri for Slack alerts",
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
},
|
||||
"telegram": {
|
||||
"description": "Configuration for Telegram alerts",
|
||||
"type": "object",
|
||||
|
||||
@@ -90,6 +90,8 @@ logsStorages:
|
||||
## @field telegramAlerts.token {string} Telegram token for your bot
|
||||
## @field telegramAlerts.chatID {string} Specify multiple ID's separated by comma. Get yours in https://t.me/chatid_echo_bot
|
||||
## @field telegramAlerts.disabledSeverity {string} List of severity without alerts, separated by comma like: "informational,warning"
|
||||
## @field alerts.slack {*slackAlerts} Configuration for Slack alerts
|
||||
## @field slackAlerts.url {*string} Configuration uri for Slack alerts
|
||||
alerta:
|
||||
storage: 10Gi
|
||||
storageClassName: ""
|
||||
@@ -112,6 +114,9 @@ alerta:
|
||||
chatID: ""
|
||||
disabledSeverity: ""
|
||||
|
||||
slack:
|
||||
url: ""
|
||||
|
||||
## @section Grafana configuration
|
||||
|
||||
## @param grafana {grafana} Configuration for Grafana
|
||||
|
||||
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user