All Projects → Swatto → Promtotwilio

Swatto / Promtotwilio

Licence: mit
Send text messages for Prometheus alerts using Twilio

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Promtotwilio

Awesome Prometheus Alerts
🚨 Collection of Prometheus alerting rules
Stars: ✭ 3,323 (+11767.86%)
Mutual labels:  prometheus, alert
Cronmanager
A tool for monitoring Linux cron jobs duration and exit status using Node Exporter and Prometheus. Written in Go.
Stars: ✭ 17 (-39.29%)
Mutual labels:  prometheus, alert
Prometheus
A docker-compose stack for Prometheus monitoring
Stars: ✭ 3,383 (+11982.14%)
Mutual labels:  prometheus, alert
Slo Generator
Easy setup a service level objective using prometheus
Stars: ✭ 91 (+225%)
Mutual labels:  prometheus, alert
Prometheusalert
Prometheus Alert是开源的运维告警中心消息转发系统,支持主流的监控系统Prometheus,Zabbix,日志系统Graylog和数据可视化系统Grafana发出的预警消息,支持钉钉,微信,华为云短信,腾讯云短信,腾讯云电话,阿里云短信,阿里云电话等
Stars: ✭ 822 (+2835.71%)
Mutual labels:  prometheus, alert
Raspberrypi exporter
Prometheus exporter for Raspberry Pi metrics
Stars: ✭ 18 (-35.71%)
Mutual labels:  prometheus
Json Exporter
Prometheus exporter which fetches JSON from a URL and exports one of the values as gauge metrics
Stars: ✭ 26 (-7.14%)
Mutual labels:  prometheus
Hana sql exporter
SAP Hana SQL Exporter for Prometheus
Stars: ✭ 18 (-35.71%)
Mutual labels:  prometheus
Ebpf exporter
Prometheus exporter for custom eBPF metrics
Stars: ✭ 829 (+2860.71%)
Mutual labels:  prometheus
React Notie
Simple notifications for react
Stars: ✭ 27 (-3.57%)
Mutual labels:  alert
Awesome Prometheus
A curated list of awesome Prometheus resources, projects and tools.
Stars: ✭ 884 (+3057.14%)
Mutual labels:  prometheus
Command Bus
Java implementation of the Command-Bus pattern for Spring and CDI
Stars: ✭ 26 (-7.14%)
Mutual labels:  prometheus
Kubenav
kubenav is the navigator for your Kubernetes clusters right in your pocket.
Stars: ✭ 901 (+3117.86%)
Mutual labels:  prometheus
Settingscompat
特殊权限(Special Permissions)兼容库,悬浮窗权限(SYSTEM_ALERT_WINDOW)与系统设置修改权限(WRITE_SETTINGS)
Stars: ✭ 942 (+3264.29%)
Mutual labels:  alert
Prometheus Tor exporter
Prometheus exporter for the TOR daemon
Stars: ✭ 20 (-28.57%)
Mutual labels:  prometheus
Quarkus Microservices Poc
Very simplified shop sales system made in a microservices architecture using quarkus
Stars: ✭ 16 (-42.86%)
Mutual labels:  prometheus
Intro To Apis Flask
Starter repository for the Introductions to API course
Stars: ✭ 26 (-7.14%)
Mutual labels:  twilio
Promviz
Visualize the traffic of your clusters in realtime from Prometheus data
Stars: ✭ 884 (+3057.14%)
Mutual labels:  prometheus
React Native Twilio Ip Messaging
React Native wrapper for the Twilio IP Messaging SDKs (Deprecated)
Stars: ✭ 25 (-10.71%)
Mutual labels:  twilio
Peapod
A personal podcast service.
Stars: ✭ 24 (-14.29%)
Mutual labels:  twilio

Prometheus alert with text message

This is a simple and stupid program that will receive webhooks from Prometheus to send them as text message (using Twilio) with the summary of the alert.

The Docker image size is less than 9MB.

Docker Pulls

Configuration

It needs 4 environment variables:

  • SID - Twilio Account SID
  • TOKEN - Twilio Auth Token
  • RECEIVER - Phone number of receiver (optional parameter, representing default receiver)
  • SENDER - Phone number managed by Twilio (friendly name)

You can see a basic launch inside the Makefile.

API

/: ping promtotwilio application. Returns 200 OK if application works fine.

/send?receiver=<rcv>: send Prometheus firing alerts from payload to a rcv if specified, or to default receiver, represented by RECEIVER environment variable. If none is specified, status code 400 BadRequest is returned.

Test it

To send test sms to a phone +zxxxyyyyyyy use the following command (please notice %2B symbols, representing a url encoded + sign)

$ curl -H "Content-Type: application/json" -X POST -d \
'{"version":"2","status":"firing","alerts":[{"annotations":{"summary":"Server down"},"startsAt":"2016-03-19T05:54:01Z"}]}' \
http://localhost:9090/send?receiver=%2Bzxxxyyyyyyy

Configuration example

Here's a sample Docker Compose file to use it with cAdvisor, Prometheus, Alertmanager and Grafana.

sms:
  image: swatto/promtotwilio:latest
  environment:
    SID: xxx
    TOKEN: xxx
    RECEIVER: xxx
    SENDER: xxx

alert:
  image: prom/alertmanager:latest
  links:
   - sms
  volumes:
   - ./alertmanager.yml:/etc/alertmanager/config.yml

container:
  image: google/cadvisor:latest
  volumes:
   - /:/rootfs:ro
   - /var/run:/var/run:rw
   - /sys:/sys:ro
   - /var/lib/docker/:/var/lib/docker:ro

prometheus:
  image: prom/prometheus:latest
  links:
   - container
   - alert
  volumes:
   - ./prometheus.yml:/etc/prometheus/prometheus.yml
   - ./alerts.conf:/etc/prometheus/alerts.conf
  entrypoint: /bin/prometheus -config.file=/etc/prometheus/prometheus.yml -alertmanager.url=http://alert:9093

web:
  image: grafana/grafana:latest
  links:
   - prometheus
  ports:
   - "3000:3000"
  environment:
    GF_SERVER_ROOT_URL: http://stats.example.com
    GF_SECURITY_ADMIN_PASSWORD: 123456

Here's the AlertManager config where sms will be provided by Docker Compose

route:
  receiver: 'admin'

receivers:
- name: 'admin'
  webhook_configs:
  - url: 'http://sms:9090/send'
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].