Basic notification template like this one is not working:
{{ define "default.message3" }}
Hello, this is a test notification!
{{ end }}
My main aim is to create a notification template without values and labels:
{{ define "default.message" }}
{{ if gt (len .Alerts.Firing) 0 }}
**Firing Alerts:**
{{ range .Alerts.Firing }}
- **Alert Name**: {{ .Labels.alertname }}
- **Summary**: {{ if .Annotations.summary }}{{ .Annotations.summary }}{{ else }}No summary available{{ end }}
- **Description**: {{ if .Annotations.description }}{{ .Annotations.description }}{{ else }}No description available{{ end }}
- **apdut Value**: {{ if .Labels.apdut }}{{ .Labels.apdut }}{{ else }}No apdut value available{{ end }}
- **Status**: Firing
{{ end }}
{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
**Resolved Alerts:**
{{ range .Alerts.Resolved }}
- **Alert Name**: {{ .Labels.alertname }}
- **Summary**: {{ if .Annotations.summary }}{{ .Annotations.summary }}{{ else }}No summary available{{ end }}
- **Description**: {{ if .Annotations.description }}{{ .Annotations.description }}{{ else }}No description available{{ end }}
- **apdut Value**: {{ if .Labels.apdut }}{{ .Labels.apdut }}{{ else }}No apdut value available{{ end }}
- **Status**: Resolved
{{ end }}
{{ end }}
{{ end }}