i have configured the alert rules in prometheus.yaml
rules.yaml part
- name: pod alert
rules:- alert: pod_status
expr: min_over_time(sum by (deployment,namespace,pod) (kube_pod_status_phase{phase=“Failed”})[10m:1m]) > 0
for: 1m
labels:
severity: critical
annotations:
summary: active state
- alert: pod_status
and i am to create alerts which i am passing the email configuraion in alertmanager.yaml but i am unable to get alerts
alertmanager.yaml
global:
resolve_timeout: 5m
receivers:
- name: ‘default-receiver’
email_configs:- to: ‘to-mail’
from: ‘from-mail’
smarthost: smtphost
auth_username: ‘to-mail’
route:
group_by: [‘pod_status’]
group_interval: 5m
group_wait: 10s
receiver: ‘default-receiver’
repeat_interval: 3h
- to: ‘to-mail’
even though some of pods are in failed state one of my support team said username and password are not required for smtp.
can anyone twll what is the issue is?