Sachet (or सचेत) is Hindi for conscious. Sachet is an SMS alerting tool for the Prometheus Alertmanager.
There are many SMS providers and Alertmanager supporting all of them would make the code noisy. To get around this issue a new service needed to be created dedicated only for SMS.
An HTTP API that accepts Alertmanager webhook calls and allows an end-user to configure it for the SMS provider of their dreams.
First get it
$ go get github.com/messagebird/sachet/cmd/sachet
And then running Sachet is as easy as executing sachet
on the command line.
$ sachet
Use the -h
flag to get help information.
$ sachet -h
Usage of sachet:
-config string
The configuration file (default "config.yaml")
-listen-address string
The address to listen on for HTTP requests. (default ":9876")
Sachet expects a JSON object from Alertmanager. The format of this JSON is described in the Alertmanager documentation, or, alternatively, in the Alertmanager GoDoc.
To quickly test Sachet is working you can also run:
$ curl -H "Content-type: application/json" -X POST \
-d '{"receiver": "team-sms", "status": "firing", "alerts": [{"status": "firing", "labels": {"alertname": "test-123"} }], "commonLabels": {"key": "value"}}' \
http://localhost:9876/alert
To enable Sachet you need to configure a webhook in Alertmanager. You can do that by adding a webhook receiver to your Alertmanager configuration.
receivers:
- name: 'team-sms'
webhook_configs:
- url: 'http://localhost:9876/alert'
Sachet is licensed under The BSD 2-Clause License. Copyright (c) 2016, MessageBird