Go to file
Daniel Barlow 7a5017fd17 fix package search path in wrapper 2022-09-16 23:21:07 +01:00
.gitignore read config file to get smsc, phone number & device name 2022-09-16 22:00:06 +01:00
GSM0338.TXT SMS sending works for basic chars 2022-09-15 22:09:25 +01:00
Makefile SMS sending works for basic chars 2022-09-15 22:09:25 +01:00
README.md example of nixos module/systemd service 2022-09-16 22:43:21 +01:00
build.nix make default.nix a function callable by callPackage 2022-09-16 18:18:37 +01:00
config.json.example read config file to get smsc, phone number & device name 2022-09-16 22:00:06 +01:00
default.nix fix package search path in wrapper 2022-09-16 23:21:07 +01:00
main.fnl fix package search path in wrapper 2022-09-16 23:21:07 +01:00
module-example.nix example of nixos module/systemd service 2022-09-16 22:43:21 +01:00
sample-alert.json placeholder README 2022-09-16 18:01:08 +01:00
server.fnl SMS sending works for basic chars 2022-09-15 22:09:25 +01:00
sms.fnl whitespace and function reordering 2022-09-16 22:00:14 +01:00
unicode-to-gsm.lua SMS sending works for basic chars 2022-09-15 22:09:25 +01:00
webhook.fnl read config file to get smsc, phone number & device name 2022-09-16 22:00:06 +01:00

README.md

Grafana SMS alert

Send Grafana alerts via SMS to a mobile phone, using a GSM modem that understands AT commands, such as the Huawei E3131 broadband USB dongle. Fancy SaaS alerting services are great, but what if you want to know that the internet is down?

This runs as a service on localhost:8201 - once you've started it, create a "Webhook" type contact point in your Grafana instance, with the url http://localhost:8201.

See Grafana alerting contact points documentation for background.

Building and use (Nix)

Try it quickly

$ nix-build build.nix
$ cp config.json.example config.json # and edit it
$ ./result/bin/grafana-sms-alert config.json

$ curl -v --data @sample-alert.json http://localhost:8201

Install it meaningfully

The derivation in default.nix works with callPackage, so see module-example.nix for a sketch.