Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications: identify Uptime Kuma that sent it and/or allow customization of sent message #2194

Closed
1 task done
peracchi opened this issue Oct 7, 2022 · 18 comments
Closed
1 task done
Labels
area:notifications Everything related to notifications feature-request Request for new features to be added

Comments

@peracchi
Copy link

peracchi commented Oct 7, 2022

⚠️ Please verify that this feature request has NOT been suggested before.

  • I checked and didn't find similar feature request

🏷️ Feature Request Type

UI Feature, Other

🔖 Feature description

I have two instances of Uptime Kuma running: one inside my network and other outside.

Both monitoring the same few services. This helps to narrow down problems (problem it´s only accessing from inside, outside or both?).

The problem is that I can´t know wich server sent which notification.

✔️ Solution

I think the easiest/quickest solution is to add "From: - " in the beggining of each notification sent.

Ideally, some global and/or field to customize notifications, with some variables available to use.

❓ Alternatives

No response

📝 Additional Context

No response

@peracchi peracchi added the feature-request Request for new features to be added label Oct 7, 2022
@rezzorix
Copy link
Contributor

rezzorix commented Oct 7, 2022

I have two instances of Uptime Kuma running: one inside my network and other outside.

Both monitoring the same few services. This helps to narrow down problems (problem it´s only accessing from inside, outside or both?).

The problem is that I can´t know wich server sent which notification.
I have the same; several instances on different servers.

Simple Solution: give your monitors distinctive "Friendly Names" either prefixes or suffixes.

E.g.:

## Instance1 ##
Instance 1 | homeserver.lan:8888
Instance 1 | homerserver.lan:9999
## Instance2 ##
Instance 2 | homeserver.lan:8888
Instance 2 | homerserver.lan:9999

etc.

@peracchi
Copy link
Author

peracchi commented Oct 8, 2022

Simple Solution: give your monitors distinctive "Friendly Names" either prefixes or suffixes.

Good idea, thanks!

I will use your contour solution but would be better do this at "notification level" instead of "monitor´s friendly names level".

@rezzorix
Copy link
Contributor

rezzorix commented Oct 9, 2022

Yes customizing notifications would be nice; however fully customizing each message - dont know if that is possible or feasible.
Especially as one would need to look into each and every of the 90+ notification services to ensure there are no hiccups etc.

I am also a friend of simple solutions... one could argue that "at notification level" is already possible as you can set up as many notifications as you like (and therefore make them individual to your needs aka easier identifiable).

With some notifications (not all) you can already set e.g. a "title" or "subject".
Where this isnt possible you could use e.g. a different webhook or different channel as target to ensure knowing the source of notification.

What notification service are you mainly using?

@peracchi
Copy link
Author

peracchi commented Oct 9, 2022

What notification service are you mainly using?

I'm only using Telegram.

I have several monitors, usually I configure everything in one Uptime Kuma instance, export and import they at the other.

If could be possible modify the fixed part of Telegram notification, would be necessary to do only one modification in one of the Uptime Kuma instances.

Better yet, if there was some variables to be used in a template message in Telegram notification, no modification would be necessary at all.

Something like: "%UPTIME_KUMA_HOSTNAME% - %MONITORING_FRIENDLY_NAME% - %MESSAGE%".

@rezzorix
Copy link
Contributor

I'm only using Telegram.

Seems like we run a very similar setup 😎

Better yet, if there was some variables to be used in a template message in Telegram notification, no modification would be necessary at all.

Something like: "%UPTIME_KUMA_HOSTNAME% - %MONITORING_FRIENDLY_NAME% - %MESSAGE%".

I like the idea.
However wouldn't the issue with different notification services remain as there are e.g. limited characters or charset etc.?

@peracchi
Copy link
Author

However wouldn't the issue with different notification services remain

Probably.

But maybe just provide some template variables and the possibility of edit the sent message of the notification service would be a great start point.

I supppose (without any real info) that Telegram and email are the most used notification services. Maybe start with implementing this idea with these ones...

@vedatkamer
Copy link

+1

@ahmetsoguksu
Copy link

+1

Here (#393), this feature has been added for Discord before. It would be good to add it for Telegram as well.

@PilaScat
Copy link

+1

@ACiDGRiM
Copy link

ACiDGRiM commented Jun 4, 2023

I just want to provide a link to the uptime kuma instance, so I can easily click an alert to check the status from either email or matrix (or other IM service)

@CommanderStorm
Copy link
Collaborator

@PilaScat @ahmetsoguksu @vedatkamer

Please refrain from posting +1 / requests for updates things on issues, as this makes issue-management harder.
Issues are for discussing what needs to be done how by whom.
We use 👍🏻 on issues to prioritise work.

@CommanderStorm
Copy link
Collaborator

@peracchi is this a duplicate of #975 and associated discussion in #646 ?
If no, could you please edit the inital message to make this more clear.
If yes, please close this issue.
Duplicates just make issue management harder for everybody and spawn more duplicates ^^

@peracchi
Copy link
Author

peracchi commented Jun 4, 2023

@CommanderStorm My suggestion is a little broad than #975, which deals only with customization of the notification.

In my idea, if you do not want customize the notification, at least you already got some identification from the Uptime Kuma server that sent it.

As #975 says, notifications are only "[>>NAME OF SERVICE <<] [🔴 Down]" or "[>> NAME OF SERVICE <<] [✅ Up]".

But which server sent the notification?

The Uptime Kuma code can be modified to add some server identification on the alert even if the user do not want customize notifications.

A template or some UI to customize the notification would be a plus.

@CommanderStorm
Copy link
Collaborator

if you do not want customize the notification

Oh, don't get me wrong, this will eventually be a thing.
Please read through the issue above why message templating has proven difficult until now.

But which server sent the notification?

I don't fully get what you mean by "which server". Is https://github.com/louislam/uptime-kuma/tree/master/server/notification-providers what you are searching for?

@peracchi
Copy link
Author

peracchi commented Jun 4, 2023

@CommanderStorm , as I said before (probably I wasn't clear enough) I have some services running on my work. These services are used by people outside the internal network and by people inside the office.

Sometimes I see a "[>>NAME OF SERVICE <<] [🔴 Down]" on my Telegram group and do not know if guys at firewall messed up and people outside office cannot reach some service OR if guys at infra messed with internal routers because Uptime Kuma outside office and Uptime Kuma inside office will send the same "[>>NAME OF SERVICE <<] [🔴 Down]".

Better explained now?

As @rezzorix suggested, I need to name the monitors something like "Service A from internal perspective" and "Service A from external perspective" to know at first sight.

If Uptime Kuma sent some self-id automatically I can share the config between Uptime Kuma internal and external (export/import backup, for example). The monitors will have the same name like just "Service A".

@CommanderStorm
Copy link
Collaborator

So basically #3191? (I know there is a better some other duplicate out there, but it's 2AM, and I am going to bed now)

@peracchi
Copy link
Author

peracchi commented Jun 5, 2023

So basically #3191? (I know there is a better some other duplicate out there, but it's 2AM, and I am going to bed now)

Nope, that's for email only.

@CommanderStorm CommanderStorm added the area:notifications Everything related to notifications label Dec 6, 2023
@chakflying
Copy link
Collaborator

Duplicate of #646

Note that for certain notification providers, you can do so manually by using a different Webhook url, and customize it's icon/bot name.

@chakflying chakflying closed this as not planned Won't fix, can't repro, duplicate, stale Dec 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area:notifications Everything related to notifications feature-request Request for new features to be added
Projects
None yet
Development

No branches or pull requests

8 participants