Alertmanager

81 views
Skip to first unread message

Bhupendra kumar

unread,
Jul 2, 2020, 3:04:53 AM7/2/20
to Prometheus Users
Hi All,

I am facing this error but I don't know about this error so please help me out.

Checking /etc/prometheus/alertmanager.yml
  FAILED: parsing YAML file /etc/prometheus/alertmanager.yml: yaml: unmarshal errors:
  line 4: field smtp_smarthost not found in type config.plain
  line 6: field smtp_require_tls not found in type config.plain
  line 8: field smtp_from not found in type config.plain
  line 13: field route not found in type config.plain
  line 29: field receivers not found in type config.plain

My alertmanager.yml configuration file.

# create new
global:
  # SMTP server to use
  smtp_smarthost: 'prometh:25'
  # require TLS or not
  smtp_require_tls: false
  # notification sender's Email address
  smtp_from: 'Alertmanager <root@prometh>'
  # if set SMTP Auth on SMTP server, set below, too
  # smtp_auth_username: 'alertmanager'
  # smtp_auth_password: 'password'

route:
  # Receiver name for notification
  receiver: 'email-notice'
  routes:
  - match:
     job_name: "node_exporter"
    receiver: 'Infra Team'
  - match:
     job_name: "Physical Server"
    receiver: 'Infra1 Team'
  # grouping definition
  group_by: ['alertname', 'Service', 'Stage', 'Role']
  group_wait:      30s
  group_interval:  5m
  repeat_interval: 4h

receivers:
# any name of Receiver
- name: 'email-notice'
  email_configs:
  # destination Email address
  - to: "sunil.kumar5@******.com"
  
# any name of Receiver
- name: 'Infra Team'
  email_configs:
  # destination Email address
  - to: "sunil.kumar5@*****.com,sunil.kumar@***.com"
  
# any name of Receiver
- name: 'Infra1 Team'
  email_configs:
  # destination Email address
  - to: "sunil.kumar5@******.com,mon@*****.com"


Regards
Bhupendra

Matthias Rampke

unread,
Jul 2, 2020, 3:11:37 AM7/2/20
to Bhupendra kumar, Prometheus Users
What command are you using to check the configuration?

/MR

--
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 prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/970f3cdd-4f1b-4b71-ae02-54030785af9co%40googlegroups.com.

Bhupendra kumar

unread,
Jul 2, 2020, 3:22:57 AM7/2/20
to Prometheus Users
promtool check config.
To unsubscribe from this group and stop receiving emails from it, send an email to promethe...@googlegroups.com.

Julien Pivotto

unread,
Jul 2, 2020, 3:35:51 AM7/2/20
to Bhupendra kumar, Prometheus Users
Promtool validates the prometheus server configuration.

To validate an Alertmanager config file, please use amtool. It is distributed with the Alertmanager tarball.


To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/fa2f64c0-2f14-46e8-b7f7-09cf3ddcfcd2o%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages