Config is very usual. global: resolve_timeout: 5m
# The smarthost and SMTP sender used for mail notifications. smtp_smarthost: 'smtphost:25' smtp_from: '[email protected]' smtp_auth_username: '[email protected]' smtp_auth_password: '' smtp_require_tls: false # The directory from which notification templates are read. templates: - 'C:\AlertManager\templates\email.tmpl' # The root route on which each incoming alert enters. route: group_by: ['job_name'] group_wait: 1m group_interval: 5m repeat_interval: 15m receiver: EMails receivers: - name: 'EMails' email_configs: - to: '[email protected]' from: '[email protected]' send_resolved: false четверг, 4 июня 2020 г. в 18:16:15 UTC+3, Stuart Clark: > You want to look at the group options. > > On 4 June 2020 16:09:48 BST, "[email protected]" <[email protected]> > wrote: >> >> Hi, colleagues! >> I setup and configured Alertmanager for getting email notifications, but >> all of my alerts about different environments are gathered in one email and >> sorted by alphabetical order by job_name. In test environment there are >> approx. 250 alerts in one email. It doesn't work for urgents reaction. >> Prometheus rules have 3 rules per 1 env. Now I'm testing 7 envs. >> >> Prometheus config: >> rule_files: >> - "ft4rules.yml" >> >> Alertmanager config: >> receivers: >> - name: 'EMails' >> email_configs: >> - to: '[email protected] >> from: '[email protected]' >> >> Rules.yml: >> groups: >> - name: FT4 >> rules: >> - alert: Instance Code 0 Alert >> expr: probe_http_status_code {job="FT4"} < 200 >> for: 1m >> labels: >> severity: "critical" >> annotations: >> title: "Instance Status" >> description: "Store {{ $labels.instance }} is down. Error Code is >> {{ $value }}" >> >> # Alert for instances http code less 200 >> - alert: Instance Health Down Alert >> expr: probe_http_status_code {job="FT4"} > 399 >> for: 1m >> labels: >> severity: "critical" >> annotations: >> title: "Instance Status" >> description: "Store {{ $labels.instance }} is down. Error Code is >> {{ $value }}" >> >> Could you help me to split it? >> Thank you in advance! >> >> > -- > Sent from my Android device with K-9 Mail. Please excuse my brevity. > -- 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/b4b8fc0f-ceb0-48fd-9c6b-8724ea9a4265n%40googlegroups.com.

