messagebird / sachet

SMS alerts for Prometheus' Alertmanager

Home Page:https://www.messagebird.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support local SMS modem

craftbyte opened this issue · comments

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?

@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?

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.

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.

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