It's webhook handler for uptime.com. You can define multiple teams and multiple notifiers for each team.
- Uptime.com will monitor our targets ( HTTP/S - ICMP - DNS - API - ... )
- Notify our webhook after making a decision
- Our webhook handler will send the final alert based on teams and any enabled platform.
-
Create your configuration file. You can use
config.yml.example
as a template. -
Add your Squadcast configuration to the
config.yml
file. -
Run
docker-compose up -d
to start the service or run it manually:docker run -d \ --name uptime-webhook \ -p 8080:8080 \ -v /path/to/config.yml:/app/configs/config.yml \ hatamiarash7/uptime-webhook:latest
-
Go to Uptime dashboard and create a new webhook in Notifications / Integrations section.
-
Use your deployed webhook URL like this:
http://<your-host>:8080/api/v1/alert/
-
Wait for alerts 😁 Or you can send a test alert in Uptime dashboard.
You can use multiple notifiers at the same time. Just define them to the config.yml
file. There is a config.yml.example file in the configs
directory. You can use it as a template.
-
Create a new Service in Squadcast ( Or use an existing one )
-
Use
Incident Webhook
as an alert source -
Define that in
config.yml
filenotifier: squadcast: enable: true teams: team1: "<WEBHOOK-URL>" team2: "<WEBHOOK-URL>"
Fill your notifier
with a telegram
section like this:
notifier:
telegram:
enable: true
host: "https://api.telegram.org/bot"
token: "1234:ABCD"
teams:
team1:
- chat: "-123456789"
team2:
- chat: "-124564"
topic: "56789"
- chat: "-356457"
topic: "982456"
Note
You can use multiple chat/topic for each team.
-
Create a new Application in Slack
-
Use
Incoming Webhook
as type -
Define the webhook in
config.yml
filenotifier: slack: enable: true teams: team1: "<WEBHOOK-URL>" team2: "<WEBHOOK-URL>"
Fill your notifier
with a custom
section and put your webhook URL like this:
notifier:
custom:
enable: true
teams:
team1: "<WEBHOOK-URL>"
team2: "<WEBHOOK-URL>"
We have some metrics for monitoring our service in /metrics
path.
Metric name | Description |
---|---|
UPTIME_webhook_total_alerts |
Total number of alerts |
UPTIME_webhook_telegram_success |
Total number of successful Telegram notify |
UPTIME_webhook_telegram_failure |
Total number of failure Telegram notify |
UPTIME_webhook_squadcast_success |
Total number of successful Squadcast notify |
UPTIME_webhook_squadcast_failure |
Total number of failure Squadcast notify |
UPTIME_webhook_slack_success |
Total number of successful Slack notify |
UPTIME_webhook_slack_failure |
Total number of failure Slack notify |
UPTIME_webhook_custom_success |
Total number of successful Custom Webhook notify |
UPTIME_webhook_custom_failure |
Total number of failure Custom Webhook notify |
UPTIME_webhook_alert_pool_capacity |
The alert pool capacity |
UPTIME_webhook_alert_pool_running_jobs |
Total number of active jobs in alert pool |
You can configure monitoring in config.yml
file:
monitoring:
enable: true
path: "/metrics"
password: "1234"
There is basic authentication for /metrics
path with username admin
and your chosen password.
Don't be shy and reach out to us if you want to contribute 😉
- Fork it!
- Create your feature branch:
git checkout -b my-new-feature
- Commit your changes:
git commit -am 'Add some feature'
- Push to the branch:
git push origin my-new-feature
- Submit a pull request
Each project may have many problems. Contributing to the better development of this project by reporting them. 👍