feat: make alerts configurable #19

Merged
p4u1 merged 1 commits from configurable-alerts into main 2026-06-12 06:49:18 +00:00
Owner

Alert threshholds can now be configured via env variables

I also seperated the basic auth, so that it is possible to deploy only prometheus without promtail

Alert threshholds can now be configured via env variables I also seperated the basic auth, so that it is possible to deploy only prometheus without promtail
p4u1 added 1 commit 2026-03-31 18:16:25 +00:00
Author
Owner

@dannygroenewegen did you get around to test this yet? :)

@dannygroenewegen did you get around to test this yet? :)
ammaratef45 approved these changes 2026-04-03 02:10:09 +00:00
ammaratef45 left a comment
Owner

nice!

nice!
README.md Outdated
@ -168,1 +161,4 @@
It is possible to enable the following alerts, by uncommenting the corresponding env variable:
- node disk space: `ALERT_NODE_DISK_SPACE_LEFT`
- node memory usage: `ALERT_NODE_MEMORY_USAGE`
Owner

nit: should probably remove the options from here since they are explained in the env file, otherwise we would have to remember that these need to be updates in 2 places

nit: should probably remove the options from here since they are explained in the env file, otherwise we would have to remember that these need to be updates in 2 places
Author
Owner

Ah yes, good point!

Ah yes, good point!
Author
Owner

removed it :)

removed it :)
dannygroenewegen requested changes 2026-04-03 11:00:24 +00:00
Dismissed
.env.sample Outdated
@ -80,4 +81,2 @@
#GF_MATRIX_HOMESERVER_URL="<homeserver-url>"
# ALerts
#ALERT_BACKUP_FAILED_ENABLED=true

I've seen mentions that these backup alerts don't work, but is that the case for everyone? Or could someone still be relying on this?

And if these envs are removed, then grafana-alerts.json.tmpl can also be removed?

I've seen mentions that these backup alerts don't work, but is that the case for everyone? Or could someone still be relying on this? And if these envs are removed, then grafana-alerts.json.tmpl can also be removed?
Author
Owner

Yeah, they are inherently flawed, I can explain it in more detail sometime. I guess we were the only ones using it. I removed the old file now

Yeah, they are inherently flawed, I can explain it in more detail sometime. I guess we were the only ones using it. I removed the old file now
dannygroenewegen marked this conversation as resolved
.env.sample Outdated
@ -87,1 +83,3 @@
#ALERT_NODE_MEMORY_USAGE_ENABLED=true
## ALerts
# Node disk space alert will trigger when free disk space left is below the given number in percent

Good enough for now. But 10% of a 20GB disk or a 2TB disk is a bit different. Can imagine we want a bit more fine-grained control depending on disk size and usage.

Good enough for now. But 10% of a 20GB disk or a 2TB disk is a bit different. Can imagine we want a bit more fine-grained control depending on disk size and usage.
dannygroenewegen marked this conversation as resolved
p4u1 force-pushed configurable-alerts from 0aba60241f to 40f4ab31fb 2026-06-10 17:00:04 +00:00 Compare
Author
Owner

This is ready to merge from my side. we can always improve it in the future and I have more alerts in the pipeline that I want to share :)

This is ready to merge from my side. we can always improve it in the future and I have more alerts in the pipeline that I want to share :)
dannygroenewegen approved these changes 2026-06-11 08:32:09 +00:00
p4u1 merged commit 02b01e5c23 into main 2026-06-12 06:49:18 +00:00
Sign in to join this conversation.
No description provided.