How I do notifications
Intro
A lot of self-hosted software I use offer notification options and I do like to play with these, but getting the different implementations to work in a unified way can be a pain in the ass. I’d like to show you in this post how I arrived at my current solution and what other options I used along the way.
The basic problem I have is that I always want to know what happens in my systems and take action if needed. Also it gives me great pleasure to see how my environment is chugging along with all the tasks I set it out to do for me. I guess this need comes from my sysadmin days from a long time ago. After all, it was in my best interest to know the status of every server or network equipment I manage, and the habit stuck with me ever since.
My journey in a nutshell
I guess I kinda like to divide the information sources to two distinct categories: hardware and software.
Hardware sources
Since I have been a Synology user for a long time as you might have guessed from multiple posts already, the first obvious choice was to use the builtin e-mail notification system. The only thing you have to set up is an SMTP server and you are good to go. You can find the settings for this in the Control Panel -> Notifications -> E-mail. (You have other options as well like Push Service and Webhooks - I’ll touch on those in a later post).
This was working fine but I got bored with it, since e-mail is just so last-decade (or last century). And it also bothered me that I used a Google SMTP server. This covered the hardware part, but what about for example all the times Watchtower updates a docker image?
Software sources
I run a lot of containers and other software. I mean a lot. Getting all of these under the same notification system would be never an easy task but let’s do it anyway!
First stop: Discord
My first candidate after switching from the e-mail based notifications was Discord. It is the most popular (and free) subsystem among the containers I run, and also it can be configured to work with Synology webhooks. It was perfect, everything was working and I got notifications from everywhere (just to name a few: Watchtower, Scrutiny, Synology, Sonarr, Lidarr, Radarr and the list goes on, perhaps forever).
Next stop: ntfy.sh
But it had to go. Running Discord on all of my devices just to get some info seemed like an overkill and I did not use Discord for anything else. Some say Discord is the same as IRC from ye olden days, but I guess I’m just too much of a boomer to believe this. To compare this bloated monster with xchat or mIRC just rubs me the wrong way.
Ntfy.sh is a topic/subscription based system, can be self-hosted, it’s supported by all the stuff I’m running and can be coerced to work with Synology notifications. The only problem I had with it is that in the Apple ecosystem it cannot do automatic background refresh, you always have to manually refresh your app in order to get the sweet, sweet notifications you crave. There is a workaround to this and I’ll do a later blogpost (maybe) about it, but unfortunately I had to abandon it. It just did not live up to my expectations.
Last(?) stop: pushover
Pushover is a one-time purchase app, it’s available on Apple, Android and on desktop as well. It’s cheap, seems to be rock stable and if I come to think of it, when I have a problem with my environment, it’s not a bad idea to have an independent alarm solution to rely on.
So I bit the bullet, bought it and never looked backed since. This stuff is perfect for me, it does one thing but it’s doing it without any issues, it’s supported by all of the stuff I use and all in all a pleasant experience to use.
Conclusion
Writing this post up I just realized that I spent a lot of time working on this topic, so I’ll try to do other posts about the solutions I used, maybe somebody will find them useful.
Also on the hardware level it would be great to integrate this into my network equipment as well, so let’s see how that turns out.