-
Bug
-
Resolution: Done-Errata
-
Normal
-
None
-
4.10.0
-
Low
-
No
-
MON Sprint 238, MON Sprint 242
-
2
-
False
-
-
-
Bug Fix
-
Done
Description of problem:
When trying to send the alerting emails with a text template instead of html, the alertmanager would not use the text template and send html emails. once we set alertmanagerMain: enableUserAlertmanagerConfig: false then the emails were showing up with the text template we specified.
Version-Release number of selected component (if applicable):
openshift cluster: 4.10.25
How reproducible:
very reproducible. reproduced this error on an openshift-demo 4.10 cluster
Steps to Reproduce:
1. following this documentation to set up openshift alert manager: https://docs.openshift.com/container-platform/4.10/monitoring/managing-alerts.html 2. confirm that alertmanager receiver email configuration looks like: email_configs: - to: 'someone@email.com' from: something@email.com smarthost: 'email:25' require_tls: false send_resolved: true html: '' text: |- {{ range .Alerts }} *Alert:* {{ .Annotations.summary }} - `{{ .Labels.severity }}` *Description:* {{ .Annotations.description }} *Details:* {{ range .Labels.SortedPairs }} * *{{ .Name }}:* `{{ .Value }}` {{ end }} {{ end }} 3. cluster-monitoring-config Configmap in the openshift-monitoring has the following at the top: data: config.yaml: | enableUserWorkload: true alertmanagerMain: enableUserAlertmanagerConfig: true nodeSelector: node-role.kubernetes.io/infra: "" tolerations: - key: node-role.kubernetes.io/infra operator: Exists effect: NoSchedule volumeClaimTemplate: spec: storageClassName: ocs-storagecluster-ceph-rbd resources: requests: storage: 40Gi 4. trigger an email alert: oc exec alertmanager-main-0 -- amtool alert add --alertmanager.url http://localhost:9093 alertname=justchecking --start="2023-04-03T00:01:18-00:00" severity=info --annotation=summary="summary" --annotation=description="alert desc." 5. check email. The email template is in the default html instead of the defined text template. 6. change "alertmanagerMain: enableUserAlertmanagerConfig: false" in the ecluster-monitoring-config Configmap and re-trigger the email alert, the email template should now be in the specified text template from the email configs.
Actual results:
html template
Expected results:
text template
Additional info:
I can provide screenshots and upload additional configuration files if allowed
- links to
-
RHEA-2023:7198 rpm