All Projects → messagebird → Sachet

messagebird / Sachet

Licence: bsd-2-clause
SMS alerts for Prometheus' Alertmanager

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Sachet

Prometheus Sql
Service that exposes Prometheus metrics for a SQL result set.
Stars: ✭ 140 (-10.83%)
Mutual labels:  prometheus
Php Fpm Exporter
Prometheus exporter for php-fpm status.
Stars: ✭ 146 (-7.01%)
Mutual labels:  prometheus
Appmetrics
App Metrics is an open-source and cross-platform .NET library used to record and report metrics within an application.
Stars: ✭ 1,986 (+1164.97%)
Mutual labels:  prometheus
Redis exporter
Prometheus Exporter for Redis Metrics. Supports Redis 2.x, 3.x, 4.x, 5.x and 6.x
Stars: ✭ 2,092 (+1232.48%)
Mutual labels:  prometheus
Promster
⏰A Prometheus exporter for Hapi, express and Marble.js servers to automatically measure request timings 📊
Stars: ✭ 146 (-7.01%)
Mutual labels:  prometheus
Pagespeed exporter
Prometheus pagespeed exporter
Stars: ✭ 149 (-5.1%)
Mutual labels:  prometheus
Cerebral
Kubernetes cluster autoscaler with pluggable metrics backends and scaling engines
Stars: ✭ 138 (-12.1%)
Mutual labels:  prometheus
Goldpinger
Debugging tool for Kubernetes which tests and displays connectivity between nodes in the cluster.
Stars: ✭ 2,015 (+1183.44%)
Mutual labels:  prometheus
Elephant Shed
PostgreSQL Management Appliance
Stars: ✭ 146 (-7.01%)
Mutual labels:  prometheus
Jmx exporter
A process for exposing JMX Beans via HTTP for Prometheus consumption
Stars: ✭ 2,134 (+1259.24%)
Mutual labels:  prometheus
Bricks
A standard library for microservices.
Stars: ✭ 142 (-9.55%)
Mutual labels:  prometheus
Go Notify
An email automation solution, written in Golang.
Stars: ✭ 143 (-8.92%)
Mutual labels:  prometheus
Jenkins exporter
Prometheus Metrics exporter for Jenkins
Stars: ✭ 152 (-3.18%)
Mutual labels:  prometheus
Promitor
Bringing Azure Monitor metrics where you need them.
Stars: ✭ 140 (-10.83%)
Mutual labels:  prometheus
Ohmgraphite
Export Open Hardware sensor data to Graphite / InfluxDB / Prometheus / Postgres / Timescaledb
Stars: ✭ 155 (-1.27%)
Mutual labels:  prometheus
Nvidia gpu prometheus exporter
NVIDIA GPU Prometheus Exporter
Stars: ✭ 138 (-12.1%)
Mutual labels:  prometheus
Prom ex
An Elixir Prometheus metrics collection library built on top of Telemetry with accompanying Grafana dashboards
Stars: ✭ 149 (-5.1%)
Mutual labels:  prometheus
K8ssandra
K8ssandra is an open-source distribution of Apache Cassandra for Kubernetes including API services and operational tooling.
Stars: ✭ 155 (-1.27%)
Mutual labels:  prometheus
Pat
Prometheus Alert Testing utility
Stars: ✭ 156 (-0.64%)
Mutual labels:  prometheus
Opencensus Go
A stats collection and distributed tracing framework
Stars: ✭ 1,895 (+1107.01%)
Mutual labels:  prometheus

Sachet

Build Status

Sachet (or सचेत) is Hindi for conscious. Sachet is an SMS alerting tool for the Prometheus Alertmanager.

The problem

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.

The solution

An HTTP API that accepts Alertmanager webhook calls and allows an end-user to configure it for the SMS provider of their dreams.

Usage

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")

Testing

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

Alertmanager configuration

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'

Message templating

Sachet supports Alertmanager-like templates for message content. You can do that by simply copying Alertmanager templates to Sachet. Some templates examples can be found in the Alertmanager documentation as well as available variables.

sachet.yml:

templates:
- /etc/sachet/notifications.tmpl

receivers:
- name: 'team-telegram'
  provider: telegram
  text: '{{ template "telegram_message" . }}'

notifications.tmpl:

{{ define "telegram_title" }}[{{ .Status | toUpper }}{{ if eq .Status "firing" }}:{{ .Alerts.Firing | len }}{{ end }}] {{ .CommonLabels.alertname }} @ {{ .CommonLabels.identifier }} {{ end }}

{{ define "telegram_message" }}
{{ if gt (len .Alerts.Firing) 0 }}
*Alerts Firing:*
{{ range .Alerts.Firing }}• {{ .Labels.instance }}: {{ .Annotations.description }}
{{ end }}{{ end }}
{{ if gt (len .Alerts.Resolved) 0 }}
*Alerts Resolved:*
{{ range .Alerts.Resolved }}• {{ .Labels.instance }}: {{ .Annotations.description }}
{{ end }}{{ end }}{{ end }}

{{ define "telegram_text" }}{{ template "telegram_title" .}}
{{ template "telegram_message" . }}{{ end }}

License

Sachet is licensed under The BSD 2-Clause License. Copyright (c) 2016, MessageBird

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].