messagebird / sachet

SMS alerts for Prometheus' Alertmanager
https://www.messagebird.com
BSD 2-Clause "Simplified" License
216 stars 89 forks source link

Support local SMS modem #27

Open craftbyte opened 7 years ago

craftbyte commented 7 years ago

Since we are monitoring internet connectivity as well in prometheus, we need to always be able to send an alert to our on duty sysadmins. For that we were thinking of using a USB 3G modem, which would allow for sending texts from a prepaid SIM. Would it be possible to implement the protocols for a USB 3G modem or support for gosms?

samwierema commented 6 years ago

@craftbyte thanks for opening an issue.

It would be great to see an implementation of this, although I'm not exactly sure how we'd label the provider ("modem" maybe?). Would you be willing to make a proof-of-concept (or a full implementation) using the library mentioned?

craftbyte commented 6 years ago

As you can see, the library itself just uses a REST API. Calling the provider gosms and allowing to also configure a remote URL would probably be the best idea. I am not really fluent in GoLang yet, so I cannot create one.

craftbyte commented 6 years ago

You can see the way that the modem itself is implemented here: https://github.com/haxpax/gosms/blob/master/modem/modem.go It just uses a serial port and then sends commands.

ipsecguy commented 6 years ago

I am using a local smstools installation and a small cgi script on the very same machine that puts a file with in the correct folder for smstools (http://smstools3.kekekasvi.com/) to process. That way everything can run event without internet (be careful about any DNS dependency...).

I'd vote against having a local device and OS dependencies here. Maybe better a generic URL provider (something I hacked together but currently not being proud of) would solve that better.

Andreas