louislam / uptime-kuma

A fancy self-hosted monitoring tool

Home Page:https://uptime.kuma.pet

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Do not send notifications for `UP` notifications

adriangalilea opened this issue Β· comments

πŸ“‘ I have found these related issues/pull requests

  • #4368
    This could work but the solution is complex, this should be implemented on the notification level.
  • #508

🏷️ Feature Request Type

Settings

πŸ”– Feature description

New option to all notification "channels" (type in the UI)

Toggle option should read:

Only send error/down notifications.

And that's it.

Telegram specific part

The only current available option is:

Send Silently
Sends the message silently. Users will receive a notification with no sound.

So either be annoyed by all successful checks or silent them all and miss important errors.

image

So my Telegram specific suggestion is that there should be an additional option that send all errors non-silently and send non-errors silently, this way I both know it's working and I don't get annoying notifications while knowing that if an error happens I'll get notified.

βœ”οΈ Solution

.

❓ Alternatives

No response

πŸ“ Additional Context

No response

Sort of in conflict (or at least interaction is unclear/difficult) with #508

I think adding a disable_notification toggle from the telegram api and #508 are an alternative.

Maybe a good alternative merging the approaches would be to have this as a mult-selection box (notify for => UP/DOWN/other).
What do you think about these alternatives?

Tip

Notification provider specific changes are really hard to keep up with. If you want to get there faster, you can consider contributing a change to the notification provider12

Footnotes

  1. https://github.com/louislam/uptime-kuma/blob/master/server/notification-providers/telegram.js ↩

  2. https://github.com/louislam/uptime-kuma/blob/master/src/components/notifications/Telegram.vue ↩

Sort of in conflict (or at least interaction is unclear/difficult) with #508

Completely missed this one, I searched for notification not alert.

I think adding a disable_notification toggle from the telegram api and #508 are an alternative.

Maybe a good alternative merging the approaches would be to have this as a mult-selection box (notify for => UP/DOWN/other). What do you think about these alternatives?

This would be awesome yes.

Tip

Notification provider specific changes are really hard to keep up with. If you want to get there faster, you can consider contributing a change to the notification provider12

I could totally help with telegram implementation once #508 is done, I've worked a lot with the telegram API and currently working full stack and typescript.

But as of now #508 blocks this.

Just noticed that disable_notification is already an option we implement.
=> don't think anything is needed in this department

What #508 needs should be pretty simple to implement.

The shared part of the notification dialog is here:

https://github.com/louislam/uptime-kuma/blob/dbbc79a05a2036176c8b011401c915c0db3384ca/src/components/NotificationDialog.vue

Notifications in the backend are send here

static async send(notification, msg, monitorJSON = null, heartbeatJSON = null) {
if (this.providerList[notification.type]) {
return this.providerList[notification.type].send(notification, msg, monitorJSON, heartbeatJSON);
} else {
throw new Error("Notification type is not supported");
}
}