Simplest possible alertmanager config?

2,281 views
Skip to first unread message

Robert Collier

unread,
Apr 13, 2015, 4:46:12 AM4/13/15
to prometheus-developers
I've made a test alert that always fires, and I'm trying to get alertmanager to email me.

I can see the alerts in alertmanager, and my config is:

aggregation_rule: <
  filter: <
    name_re: ".*"
    value_re: ".*"
  >
  repeat_rate_seconds: 3600
  notification_config_name: "rob_gmail"
>
notification_config: <
  name: "rob_gmail"
  email_config: <
    email: "rrco...@gmail.com"
  >
>

But no email sent. What am I missing?

    - Thanks.

--
Robert Collier
r...@ossifrage.net

Johannes Ziemke

unread,
Apr 13, 2015, 5:29:22 AM4/13/15
to Robert Collier, prometheus-developers
Hi Robert,

did you set the smtp server command line flags? This is required to use the email alerting. Does the log say anything?

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Robert Collier

unread,
Apr 13, 2015, 5:51:23 AM4/13/15
to Johannes Ziemke, prometheus-developers
Aha I made the mistake of assuming the port number would default to 25 and didn't specify it. Working nicely now, thanks.
--
Robert Collier
r...@ossifrage.net

Julius Volz

unread,
Apr 13, 2015, 11:22:06 AM4/13/15
to Robert Collier, prometheus-developers
On Mon, Apr 13, 2015 at 10:46 AM, Robert Collier <r...@ossifrage.net> wrote:
I've made a test alert that always fires, and I'm trying to get alertmanager to email me.

I can see the alerts in alertmanager, and my config is:

aggregation_rule: <
  filter: <
    name_re: ".*"
    value_re: ".*"
  >

Btw., you can omit this filter completely, as a catch-all filter is a no-op.
 
  repeat_rate_seconds: 3600
  notification_config_name: "rob_gmail"
>
notification_config: <
  name: "rob_gmail"
  email_config: <
    email: "rrco...@gmail.com"
  >
>

But no email sent. What am I missing?

    - Thanks.

--
Robert Collier
r...@ossifrage.net

--

arun4.d...@gmail.com

unread,
Sep 9, 2015, 10:33:55 AM9/9/15
to Prometheus Developers, r...@ossifrage.net
Hi

Configured Alert Manager:

notification_config: <
name: "alertmanager_email"
email_config: <
email: "f...@example.org"
>
>

I got the Alert but no email sent. I am running the Alter manager docker as follows.
Note : FakeSMTP server is running in the 127.0.0.1:25

docker run -d -p 9093:9093 \
-v /tmp/alertmanager.conf:/alertmanager.conf \
prom/alertmanager \
-config.file=/alertmanager.conf \
-notification.smtp.sender=127.0.0.1:25

Thanks
Arun

Julius Volz

unread,
Sep 9, 2015, 10:36:47 AM9/9/15
to arun4.d...@gmail.com, Prometheus Developers, Robert Collier
You need at least one aggregation_rule section that matches your alerts, even if it has no filters.

A catch-all one could look like this:

aggregation_rule {
  repeat_rate_seconds: 86400 # 24h
  notification_config_name: "alertmanager_email"
}

arun4.d...@gmail.com

unread,
Sep 10, 2015, 5:44:08 AM9/10/15
to Prometheus Developers, r...@ossifrage.net
Thanks for your reply.

I tried adding the aggregation rules still there is no email.

Doubts:
1. We need to set the Postfix null client to send email?
2. Can we configure Fake SMTP ip address using -notification.smtp.sender ?

Thanks
Arun

Brian Brazil

unread,
Sep 10, 2015, 5:50:56 AM9/10/15
to arun4.d...@gmail.com, Prometheus Developers, r...@ossifrage.net
You need an actual SMTP server, such as a postfix null client.

Brian
 

Thanks
Arun

--
You received this message because you are subscribed to the Google Groups "Prometheus Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-devel...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--

arun4.d...@gmail.com

unread,
Sep 10, 2015, 6:58:16 AM9/10/15
to Prometheus Developers, r...@ossifrage.net
I tried using the postfix null client also No email. below my config to run the docker image

docker run -d -p 9093:9093 -v /tmp/alertmanager.conf:/alertmanager.conf prom/alertmanager -config.file=/alertmanager.conf -notification.smtp.smarthost=xx.x.xxx.xx:25

I am able to send email from bash (mail x...@example.com)

Thanks
Arun

arun4.d...@gmail.com

unread,
Sep 11, 2015, 1:55:04 AM9/11/15
to Prometheus Developers, r...@ossifrage.net
Hi
Can you guys explain how to set the -notification.smtp.smarthost and -notification.smtp.sender ?

If my fake smtp server is running in windows on port 25. my docker is running in Centos7. When an alert happen it should send the mail to fake smtp server on windows.

Thanks
Arun

arun4.d...@gmail.com

unread,
Sep 11, 2015, 9:29:07 AM9/11/15
to Prometheus Developers, r...@ossifrage.net
Hi
I am trying to use smt.gmail.com but getting connection timed out. I have tried port 25, 587, 465

Error sending email notification: dial tcp smtp.gmail.com:587: connection timed out" file=notifier.go line=751

Is my firewall is blocking ?

Thanks
Arun

sandeep...@gmail.com

unread,
Dec 8, 2015, 2:37:30 AM12/8/15
to Prometheus Developers, fi...@freigeist.org, r...@ossifrage.net
Hi,

Need help.  I am new to Prometheus and configured Prometheus alert manager within my container. Please check attached snapshot aa1.png

 

Problem statement: If I am shutting down the node exporter from any of the node integrated with Prometheus Server. I am not getting any alert/notification with-in Prometheus alert-manager dashboard it’s not showing anything.

 

Although with-in Prometheus-dashboard it’s showing me node status “unhealthy”. Please check attached snapshot ss2.

 

But it’s not generating/sending any notification through alert manager dashboard(check snapshot ss4 and ss3).

 

Command used for running Prometheus under container:


docker run -dit  -p 9090:9090 -p 9100:9100 -p 3000:3000 -p 9093:9093 prom-node-promd-alert -notification.smtp.sender=10.127.128.199:25 /bin/bash



Regards,

Sandeep

To unsubscribe from this group and stop receiving emails from it, send an email to prometheus-developers+unsub...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.




--
Robert Collier
r...@ossifrage.net
aa1.PNG
ss2.PNG
ss3.PNG
ss4.PNG

annt12...@gmail.com

unread,
Dec 8, 2015, 11:12:47 PM12/8/15
to Prometheus Developers, r...@ossifrage.net
I have problem similar, have you fixed yet? Can you help me to fix its?
Reply all
Reply to author
Forward
0 new messages