I'm testing to trigger alert manager to send email but It doesnt work logs
that I got from the pod of alert manager
*ts=2023-04-18T17:35:15.453Z caller=dispatch.go:352 level=error
component=dispatcher msg="Notify for alerts failed" num_alerts=1
err="monitoring/main-rules-alert-config/email/email[0]: notify retry
canceled after 4 attempts: establish connection to server: dial tcp
74.125.206.108:587: i/o timeout" *
and here is the content of my alertmanagerconfig
apiVersion: monitoring.coreos.com/v1alpha1
kind: AlertmanagerConfig
metadata:
name: main-rules-alert-config
namespace: monitoring
spec:
route:
receiver: 'email'
repeatInterval: 30m
routes:
- matchers:
- name: alertname
value: HostHighCPULoad
- matchers:
- name: alertname
value: KuberenetesPodCrashLooping
repeatInterval: 30m
receivers:
- name: 'email'
emailConfigs:
- to: "[email protected]"
from: "[email protected]"
smarthost: 'smtp.gmail.com:587'
authIdentity: "[email protected]"
authUsername: "[email protected]"
authPassword:
name: gmail-auth
key: password
I created a secret named gmail-auth (in the same namespace as alert) before
apply the alert config the secret contain password of my gmail but since
2FA is enabled I put app password in the secret base64 of course but I dont
know where is the issue why I dont receive any mail
--
You received this message because you are subscribed to the Google Groups
"Prometheus Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/prometheus-users/d1728e51-35fa-4dbf-b7c7-887fffca3bd4n%40googlegroups.com.