2022-09-16 16:56:58 +00:00
|
|
|
# Grafana SMS alert
|
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
Send Grafana alerts via SMS to a mobile phone, using a GSM modem that
|
2022-09-16 16:56:58 +00:00
|
|
|
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,
|
2022-09-16 21:43:21 +00:00
|
|
|
create a "Webhook" type contact point in your Grafana instance,
|
2022-09-16 16:56:58 +00:00
|
|
|
with the url `http://localhost:8201`.
|
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
See Grafana [alerting contact points](https://grafana.com/docs/grafana/latest/alerting/contact-points/) documentation for background.
|
2022-09-16 16:56:58 +00:00
|
|
|
|
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
## Building and use (Nix)
|
2022-09-16 16:56:58 +00:00
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
### Try it quickly
|
2022-09-16 16:56:58 +00:00
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
$ nix-build build.nix
|
|
|
|
$ cp config.json.example config.json # and edit it
|
|
|
|
$ ./result/bin/grafana-sms-alert config.json
|
2022-09-16 16:56:58 +00:00
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
$ curl -v --data @sample-alert.json http://localhost:8201
|
2022-09-16 16:56:58 +00:00
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
### Install it meaningfully
|
2022-09-16 16:56:58 +00:00
|
|
|
|
2022-09-16 21:43:21 +00:00
|
|
|
The derivation in `default.nix` works with `callPackage`, so see
|
|
|
|
`module-example.nix` for a sketch.
|