Skip to content

send sms via grafana alert webhook and alertmanager prometheus

Notifications You must be signed in to change notification settings

root-ali/notifier

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

notifier fire alarm

What does this project do:

the aim of this project is to send alarm notification from grafana alert manager via kavenegar api.

state:

In testing stage

How to:

Grafana

For running this project you can use docker and should set ADMIN_PASS enviroment variable for sending sms.

docker image build -t notifier .
docker run -d -e ADMIN_PASS=${admin_pass} -e KAVENEGAR_API_KEY=${kavenevgar_api_key} notifier

for test the project you can use this example

curl -X GET notifier:5000/api/v1/notifier

should gave you the below response

{"status" : "ok"}

In the notification channel you should set method in POST and admin user in 'admin' and password with your pass in ADMIN_PASS set in environment.

notifier

for config alert rule in dashboard in getting sms you need config this two tags: tags

in receptor tags you can config the mobile number you want to receive the alert. you should seperated number with comma ','.

AlertManager

For using with Alertmanager you should set labels and annotations in alerts rule.

sample alert rule config:

{
  "receiver": "team-sms",
  "status": "firing",
  "alerts": [
    {
      "status": "firing",
      "labels": {
        "alertname": "test-123",
        "sms": "true",
        "receptor": "09xxxxxxxxx,09xxxxxxxxx"
      },
      "annotation": {
        "summary": "sample message"
      }
    }
  ],
  "commonLabels": {
    "key": "value"
  }
}

Releases

No releases published

Packages

No packages published