Hey all, For context, I am self-hosting a lot of different applications on a headless server and some of them are just scripts scraping content or doing automatic tasks.
I’ve been wondering for some time about how I should handle errors and how to be notified when they happen.
Currently, I need to connect to the server and read my logs to know that something has gone wrong. But I would like to get near instant notifications on my phone or computer.
I know I could send emails, try to use signal-cli or other messaging services but some of you might have better ideas.
Should I use one of these or is there some great technology I have never heard of?
Use ntfy.sh. It’s open source and has a free server.
Disclaimer: I made it ;-)
You could setup a status monitoring system and then configured it to send out messages for critical alerts. For example, I’m using Vigil to monitor my services and it’s configured to send email alerts when something is down and then sms alerts when things are still down for too long (in case I didn’t read the email).
I use Seq. You can use it for free for personal use and it has a docker image available. I can use their libraries to send logs my scripts create to Seq, you can ingest logs from other docker containers and syslog, and set it up to send emails for certain log message patterns.
Also is very easy to install and set up. It’s just an exe in windows and docker container elsewhere.
Didn’t know grafana provided this kind of feature. I don’t think i’m going to use it but it’s really good to know. Thanks !
Prometheus has alerting and that’s really the preferred system for sending the alerts, IMO.
Might be overkill but you could setup and run a Jenkins server to run your scripts and use one of the many notification plugins that are available.