Email Alarm

Overview

This article mainly introduces how to configure Alertmanager to send messages to email alerts.

For cluster monitoring and alarm deployment, please refer to Cluster Monitoring and Alarm Deployment

Prerequisites

  • Users who use email alarms need to have sending email and receiving email account information;

Steps

  1. You need to modify the Alertmanager configuration file, click Edit in Environment Configuration –> Configuration File Configuration
  1. The following is the template file, after the modification is completed, you can overwrite the original configuration file and update the component.
global:
 resolve_timeout: 5m
 # Mailbox smtp server proxy
 smtp_smarthost: 'smtp.gmail.com:587'
 # Send mailbox name
 smtp_from: 'XXXXXX@gmail.com' 
 # Mailbox name
 smtp_auth_username: 'XXXXX@gmail.com'
 # Email password or authorization code
 smtp_auth_password: 'XXXXXXXX'
 smtp_require_tls: false
route:
 group_by: ['alertname']
 group_wait: 20s
 group_interval: 5m
 repeat_interval: 5m
 receiver: 'webhook'
receivers:
- name: 'webhook'
  email_configs:
   # Email configuration for receiving alerts
  - to: 'XXXXX@gmail.com'
   # Subject of incoming mail
    headers: {Subject: "[WARN] Kato alarm email"}

This completes the deployment of email alarms.