plugsy / core

A simple, pluggable dashboard and status page
161 stars 4 forks source link

Enhancement - Send notifications on status change #23

Open petersem opened 3 years ago

petersem commented 3 years ago

Implement optional notifications for telegram, pushover, pushbullet, etc, that will send a message when a container changes to a defined status.

Inlustra commented 3 years ago

This is not something I'm going to be looking at, at least not for awhile, the intention of the project (At least for the moment) is really to create a customisable dashboard with the statuses at its core.

My next steps are going to be around creating other connectors such as Kubernetes, Home Assistant supervisor etc

I'm sure there already exists a solution for this sort of thing for the individual connectors?

The biggest issue I see with this, is if something does go wrong, you're not going to know why until you dig into the connector itself.

Happy for this to stay open to gather some more feedback from people though.

petersem commented 3 years ago

My view is if you have status reporting, notifications would be a logical next step. Otherwise, it's not much different to portainer. There really isn't much out there for status+notifications. That was why I was going to write my own, until i saw yours.

modem7 commented 3 years ago

I have to agree with @petersem here.

There are very few tools available that don't require a good bit of setup (monit as an example if you create additional scripts, netdata which is bleh at best for docker and a couple of others which are mediocre at best (or paid services)).

The ability to monitor and notify if a specific container is down (either via its healthcheck system or via up/down if it doesn't have one) via something like gotify would be an immense value not only to the scope of this project, but the docker community in general (which let's be honest, isn't made up of a majority of tech savvy users, who can (or want to) create custom scripts in monit.

Just having the ability (again for example) to receive a telegram notification saying "yo, your grafana container is down" is immensely useful, the reasoning of why it's down, imo is outside of the current scope of this project. That's what log files are for.

And if docker itself is down? Well... That's where something like Monit really would come into play.

Merely my 2c.

Inlustra commented 3 years ago

Alrighty - if we were going to do something like this...

What do you guys think of an apprise integration? https://github.com/caronc/apprise

Feels like the best catch-all way of supporting notifications

modem7 commented 3 years ago

Apprise is definitely a good library too!

As future planning, if there's a way to include env vars for docker, it would definitely make things easier for peeps as well, but not a priority.

Inlustra commented 3 years ago

I'll have a think about how best to integrate notifications in the future :)

I had environment variables as an option at the beginning, unfortunately the config is just getting too complicated to manage with environment variables. Especially with one of my goals being immediate feedback on config changes.

petersem commented 3 years ago

I've got a nodeJS prototype with about 60 lines of core code. It's only for telegram, but easy enough to add other libraries. The prototype alerts on container state change. (Including healthy/unhealthy). So not too much work.

petersem commented 3 years ago

Alrighty - if we were going to do something like this...

What do you guys think of an apprise integration? https://github.com/caronc/apprise

Feels like the best catch-all way of supporting notifications

I thought these were all python-based which library are you planning to use.

Inlustra commented 3 years ago

It's not too much work but I definitely won't be implementing any custom integrations as libraries do exist.

I'm thinking it would be good to integrate with the apprise web API directly

This is still very low on my priority list atm

petersem commented 3 years ago

I did my own quick version. Doesn't use appraise, but works with telegram, pushbullet, and pushover. monocker