Alertmanager: Support SNMP trap notifications

Created on 21 Jul 2015  路  15Comments  路  Source: prometheus/alertmanager

I am logging this in the hopes of getting to it soon. I am currently setting up Prometheus at DST Systems for my group, but we only have an SNMP trap for external notifications when we aren't at work. We are trying to get something like pagerduty, but if we don't, then I'll need to write something for submitting an SNMP trap to an agent.

I may start really rough using an os.exec with the snmptrap command. I haven't found any good snmp libraries with trap support, but if anyone knows of one, please point me to it.

kinenhancement

Most helpful comment

I'd like to add that I think this is worth adding - SNMP is industry standard for a whole world of old-guard applications.

I can understand not adding yet another new hotness messaging app - but SNMP traps are a bit different.

All 15 comments

I don't see a problem with this in theory, but a binary as critical as the alertmanager shouldn't be shelling out. I'd suggest using the Generic Webhook to integrate if you can't do this in pure Go, I know that Python and Java both have trap functionality among their respective snmp libraries.

I agree. I will have to see if I can figure out how to add support to one of the available go libraries. My other option was to run a separate process in Python using their snmp library and notify it with the webhook. I'd rather solve the actual problem, so I will first look at adding support to an existing SNMP library or making my own just for traps. Thanks, @brian-brazil.

I'd be interested in seeing support for this too.

not so fun of +1 comments but i would be interested in a SNMP trap in prometheus also

I'd be interested in seeing support for this too.

I/we'd also be interested in this - whether via something that converts web hooks to SNMP traps and passes them on, or whether it'd be a direct SNMP trap generator.
(Please feel free to contact me if you would happen to be willing/interested in working on this as a consulting/development effort.)

I currently use a web hook that hits a small service that parses the info, builds an SNMP message, and then transmits it. I'll look into adding the functionality back into this project now that some time has passed.

FWIW, there seem to be two alternative implementations that use webhooks to generate SNMP traps:

https://github.com/chrusty/prometheus_webhook_snmptrapper (and several forks thereof)
https://github.com/kaija/webhook-snmp (Javascript using Node.JS)

@LenzGr any experience using one of them?

@erkules unfortunately not. All of these somewhat look like a kludge to me - I would be very much in favor of having native support in the alertmanager for that. Another problem with the Go-based solutions above is that they lack any kind of license information, which makes it problematic to actually deploy and use them (the JavaScript one is MIT licensed).

Why was this feature request closed without any comment?

@LenzGr AlertManager doesn't accept new receivers for the time being (see the doc) hence this issue being closed.

I'd like to add that I think this is worth adding - SNMP is industry standard for a whole world of old-guard applications.

I can understand not adding yet another new hotness messaging app - but SNMP traps are a bit different.

Any thoughts on re-opening this? As @jamessewell mentioned, SNMP is still the standard in many organizations. Offering SNMP trap integration would greatly ease the transition to Prometheus and widen the number of systems supported.

FWIW, we (SUSE) have been working on a Python based implementation of a Prometheus Alertmanager receiver that translates incoming notifications into SNMP traps. Feedback is welcome: https://github.com/SUSE/prometheus-webhook-snmp

Was this page helpful?
0 / 5 - 0 ratings