Skip to content

r-ss/ress_notification_service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ress_notification_service

Personal utility to send me telegram notifications from various scripts, services etc.

Stack used here:

Goal

When you have some apps and services running here and there, they send you messages, statuses, alarms. Mostly via Telegram. Easiest way is directly touch Telegram API from app, but here are problems when apps-zoo grows up. Some services may send you message at night and you don't want it. Another service send you message at night and you need it. So width Extra services that can manage notification you have possibility to filter messages by own rules, collect them etc.

                                              │  Extra service gives flexibility   
                                              │                                 
            ┌───────┐  ┌───────┐  ┌───────┐   │  ┌───────┐  ┌───────┐  ┌───────┐
            │ app 1 │  │ app 2 │  │ app 3 │   │  │ app 1 │  │ app 2 │  │ app 3 │
            └───────┘  └───────┘  └───────┘   │  └───┬───┘  └───┬───┘  └───┬───┘
                │          │          │       │      │          │          │    
                │          │          │       │      └─┐        │        ┌─┘    
                │          │          │       │        │        │        │      
                └──────┐   │   ┌──────┘       │        │        │        │      
                       │   │   │              │        ▼        ▼        ▼      
                       │   │   │              │     ┏━━━━━━━━━━━━━━━━━━━━━━━━┓  
                       │   │   │              │     ┃  Notification Service  ┃  
                   ┌───▼───▼───▼───┐          │     ┗━━━━━━━━━━━┳━━━━━━━━━━━━┛  
                   │  TelegramAPI  │          │                 │               
                   └───────┬───────┘          │         ┌───────▼───────┐       
                           │                  │         │  TelegramAPI  │       
                           │                  │         └───────┬───────┘       
                           ▼                  │                 ▼               
                      ┌─────────┐             │            ┌─────────┐          
                      │┌───────┐│             │            │┌───────┐│          
                      ││       ││             │            ││       ││          
                      ││       ││             │            ││       ││          
                      ││ Phone ││             │            ││ Phone ││          
                      ││       ││             │            ││       ││          
                      ││       ││             │            ││       ││          
                      │└───────┘│             │            │└───────┘│          
                      │         │             │            │         │          
                      └─────────┘             │            └─────────┘          
                                              │                                 
                                              │                                 

TODO

Started as beginner practice in Golang and Amazon Web Services, I liked that and sometime will add functionality to filter specified notifications according to time and priority.

  • add /mail endpoint alonside to /telegram

Build and run Docker

docker build -t alexress/notificationservice .
docker run -d -p 5008:8080 alexress/notificationservice

Request example:

curl --header "Content-Type: application/json" \
--data '{"message": "Hello World 🐶"}' \
https://notification.custom.domain/telegram

About

personal service to handle alerts and notifications from other services

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published