-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Tokens for Notifications? #4344
Comments
Hey @YouveGotMeowxy, I hope I've understood your issue correctly. You're not that far from the correct solution here. The "Friendly Name" input field is just for how you want that notification to be called when it's listed on monitors, see here: "Title" can be left empty, but feel free to put whatever you want in there. When a notification is sent to Gotify, the monitor name will be sent anyway. I've set this up in a test enviroment to check: This way, you should easily be able to just create the monitors for your docker containers with that notification being set as default, without having to configure each monitors notification individually |
Sort of related #1323 I don't think that templating in the notification providers settings (!= send messages, this is tracked in #646) is a good idea, as the added complexity would just confuse users. @larswmh a helptext should be added (discovering something via testing how it works is not ideal UX) @YouveGotMeowxy => I am closing this as a duplicate. If I understood something wrong, please reopen ^^ |
Hi guys, All I really mean is not so much "templating", but simply having a few 'tokens' that get replaced with the text from the already entered fields in the Edit -> General section for a service. Technically yes, it's 'templating', but I don't really mean a complicated templating system; just a couple essentially search & replaces in the form of tokens. for example: if the above-mentioned fields contain:
then using the tokens:
Then we would simply create 1 notification containing those tokens in their respective fields, and toggle the (as also shown in the screenshot, the already created notifications have been manually created for each monitor. Every single one of those are exact clones, with the exception of me having to manually enter the same text as I entered in the Friendly Name and Server URL fields into the notification fields. In my case, I am using an auto-adder: https://github.com/linuxserver/docker-mods/tree/swag-auto-uptime-kuma So I when I add these labels to my docker compose:
the notification would automatically use those in place of the tokens. Completely automating creating properly labeled notifications as well (the way we like them personalized), when the new monitor is added. :) Other replacement tokens could be created as well as you all feel like adding, but in my case, those 2 would be plenty. |
I don't see this as a maintainable solution going forward. Have you asked the integration if this would be a configuration option that they could support for now? Warning Please be aware of these issues (both seem related as they both are triggered by removing a container) with the product you showed: |
🛡️ Security Policy
📝 Describe your problem
Is there a way to use a token when creating a notification?
Case Example:
I am adding a ton of docker containers to monitor and I want them all to use the same Gotify notification via Apprise.
I can either 1-by-1 manually add the same
gotify://gotify/<token>
to each one, and hand edit the "Friendly Name" to match each docker container, and set the below toggles to off so they don't affect all current, or new monitors, or do like this:and it'll use whatever was entered into the Friendly Name field; and keep the toggles enabled so all new monitors automatically get the same notifications settings, with the name dynamically used via the token.
Apologies if this already exists, but I did a quick look through the docs and didn't see it.
📝 Error Message(s) or Log
No response
🐻 Uptime-Kuma Version
1.23.11
💻 Operating System and Arch
Docker container
🌐 Browser
Brave
🐋 Docker Version
latest
🟩 NodeJS Version
No response
The text was updated successfully, but these errors were encountered: