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!
[[alerter]]
name = "ntfy01_komodo"
[alerter.config]
enabled = true
endpoint.type = "Custom"
endpoint.params.url = "http://<...redacted...>/komodo"
resources = [
{ type = "Stack", id = "6739489f7af2e094dcaf29ec" }
]
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!
```
[[alerter]]
name = "ntfy01_komodo"
[alerter.config]
enabled = true
endpoint.type = "Custom"
endpoint.params.url = "http://<...redacted...>/komodo"
resources = [
{ type = "Stack", id = "6739489f7af2e094dcaf29ec" }
]
```
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 gotifyalerter.
@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](https://gotify.net/) [alerter.](https://github.com/FoxxMD/deploy-gotify-alerter/tree/main)
* Write an alerter handler for ntfy [EX my version implementing gotify client](https://github.com/FoxxMD/komodo-utilities/blob/main/gotify/main.ts)
* [Build and push a docker image for the handler](https://github.com/FoxxMD/komodo-utilities/blob/main/gotify/Dockerfile)
* [Run a Komodo Stack for your alerter](https://github.com/FoxxMD/deploy-gotify-alerter/blob/main/compose.yaml), configure it to push to an existing ntfy instance
* [Configure a custom alerter and point it to your handler's address](https://github.com/FoxxMD/deploy-gotify-alerter/blob/main/README.md)
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 read endpoint.params.url = "http://<...redacted...>"
@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 read `endpoint.params.url = "http://<...redacted...>"`
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.
@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):
```json
{
"data": {
"type": "StackImageUpdateAvailable",
"data": {
"name": "MyStack",
"server_name": "MyServer",
"service": "MyService",
"image": "1.2.3"
}
}
}
```
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.
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.
@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.
@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.
@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
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
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.