Sending traps to prometheus

3,204 views
Skip to first unread message

Nikhil Goenka

unread,
Jun 13, 2017, 6:53:31 AM6/13/17
to Prometheus Users
Hi,
I am trying to enable trap notification on prometheus. I have my alertmanager running on one of the servers with prometheus listening to the alertmanger.
And have a slack webhook where the notifications are being pushed along with emails.

I now wish to enable traps on alertmanager/slack? How can I achieve this?


- Nikhil 

Ben Kochie

unread,
Jun 13, 2017, 7:19:48 AM6/13/17
to Nikhil Goenka, Prometheus Users
I'm not sure what you mean by traps.  Prometheus doesn't support SNMP trap events.

Are you talking about alerts?  What alerts have you configured in your rules files?


--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to prometheus-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/prometheus-users/CAKH5-WFvsL9o7snV2LY7ccgO1D%2BVRfs8HGzS8o%2B7cBb2X2J3Yw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Nikhil Goenka

unread,
Jun 13, 2017, 7:28:09 AM6/13/17
to Ben Kochie, Prometheus Users
Ben,
I have the following alerts specified in alert.rules:

ALERT system_down
  IF up == 0
  FOR 1m
  LABELS { severity="critical" }
  ANNOTATIONS {
    summary = "System is down",
    description = "System has been unreachable for more than 1 minute.",
  }

What I wish to do is also send trap along with the notification. I was going through the link below:


However, I am not sure how to incorporate these Notifications. Should I be modifying the alert.rules file to have these incorporated?


On Tue, Jun 13, 2017 at 4:49 PM, Ben Kochie <sup...@gmail.com> wrote:
I'm not sure what you mean by traps.  Prometheus doesn't support SNMP trap events.

Are you talking about alerts?  What alerts have you configured in your rules files?

Ben Kochie

unread,
Jun 13, 2017, 7:32:23 AM6/13/17
to Nikhil Goenka, Prometheus Users
Oh, that makes much more sense.

You're not sending to Prometheus, you're sending from Prometheus via the alertmanager.

You will need to set up the trap webhook server somewhere in your network, and add the URL that it provides as a webhook config in the alertmanager.yml..


On Tue, Jun 13, 2017 at 1:28 PM, Nikhil Goenka <nikhil...@alefmobitech.com> wrote:
Ben,
I have the following alerts specified in alert.rules:

ALERT system_down
  IF up == 0
  FOR 1m
  LABELS { severity="critical" }
  ANNOTATIONS {
    summary = "System is down",
    description = "System has been unreachable for more than 1 minute.",
  }

What I wish to do is also send trap along with the notification. I was going through the link below:


However, I am not sure how to incorporate these Notifications. Should I be modifying the alert.rules file to have these incorporated?

On Tue, Jun 13, 2017 at 4:49 PM, Ben Kochie <sup...@gmail.com> wrote:
I'm not sure what you mean by traps.  Prometheus doesn't support SNMP trap events.

Are you talking about alerts?  What alerts have you configured in your rules files?

Nikhil Goenka

unread,
Jun 13, 2017, 8:11:30 AM6/13/17
to Ben Kochie, Prometheus Users
Thanks Ben.

Can I also monitor virtual-ip machines through alertmanager and send notifications?

On Tue, Jun 13, 2017 at 5:02 PM, Ben Kochie <sup...@gmail.com> wrote:
Oh, that makes much more sense.

You're not sending to Prometheus, you're sending from Prometheus via the alertmanager.

You will need to set up the trap webhook server somewhere in your network, and add the URL that it provides as a webhook config in the alertmanager.yml..

Reply all
Reply to author
Forward
0 new messages