mirror of
https://github.com/moghtech/komodo.git
synced 2026-03-09 07:13:36 -05:00
[Documentation] No documentation on alerters, sending notifications #131
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @gitcatpeter on GitHub (Nov 18, 2024).
What custom notifications types are supported? Is it http(s) only? Are mailto: and similar types allowed as well?
I cannot figure out why I'm unable to get any "custom-HTTP" notification working.
I have configured a http alerter in Komodo (it is verified working, self-hosted ntfy server)
Seems like I'm unable to trigger sending external notification. For instance: manually stopping container/stack sends nothing.
Documentation is missing for that area and I don't see any other place to manipulate notification settings besides Alerters.
Also - do I need to explicitly whitelist resources (like a certain stack in the example below)?
Thanks!
@FoxxMD commented on GitHub (Nov 18, 2024):
AFAIK custom alerter will POST a json payload to the URL you provide. It is up to you (the service listening at the provided URL) to parse the payload and do something with it. ntfy will not automatically handle the komodo state payload as it's not setup for that.
You could implement a ntfy alerter yourself, though, using the komodo typescript client. I did this to create a gotify alerter.
@gitcatpeter commented on GitHub (Nov 18, 2024):
hmm, was under impression, that ntfy supports http+json:
https://docs.ntfy.sh/publish/#publish-as-json
The only difference is that ntfy "topic" is a part of JSON and should not be specified in URL.
So in my example this line
endpoint.params.url = "http://<...redacted...>/komodo"should readendpoint.params.url = "http://<...redacted...>"@FoxxMD commented on GitHub (Nov 18, 2024):
The issue isn't that ntfy supports JSON post. It's that the custom alerter payload is not a ntfy payload. I don't have an exact sample but you can see from my gotify implementation the payload from komodo looks like (for example stack image update):
This is not a ntfy payload. There is no topic, message, or title. The payload from komodo needs to be transformed (by an implementation) into a payload that can be sent to ntfy.
@gitcatpeter commented on GitHub (Nov 18, 2024):
Thanks @FoxxMD, I will use gotify then plus your excellent handler.
Maybe over time @mbecker20 could add other providers/schemes to notifications?
Uptime Kuma seems to handle a bunch of notifications very well (including ntfy), maybe there is something to borrow from their code.
@FoxxMD commented on GitHub (Nov 18, 2024):
@gitcatpeter you can try this quick implementation I created. I haven't tested it yet but I've used this same ntfy client in other projects so it should work.
https://github.com/FoxxMD/deploy-ntfy-alerter
@gitcatpeter commented on GitHub (Nov 18, 2024):
@FoxxMD You sir, are a gentleman and a scholar.
@gitcatpeter commented on GitHub (Nov 19, 2024):
@FoxxMD It works with your contraption, thank you!
@mbecker20 commented on GitHub (Nov 20, 2024):
The Alerting system does require dedicated doc page, I'll keep that on my radar.
@markusglaetzner commented on GitHub (May 14, 2025):
I would like to use simple Mail / SMTP, so implementation of SMTP-Settings would be fantastic.