[CBH] yoself: Podman monitoring & public status page (codeberg.org)
from nykula@piefed.social to selfhosted@lemmy.world on 25 Jul 19:24
https://piefed.social/c/selfhosted@lemmy.world/p/2236785/yoself-podman-monitoring-public-status-page

Made a status page tool, almost no configuration (a few environment variables), ready to drop in compose.yaml. If you run Podman but don’t receive status alerts yet, try setting Yoself up, it should be relatively easy.

  1. To monitor Podman, add volume /run/podman/podman.sock:/var/run/docker.sock. To check if an external website is up, add SERVER_EXAMPLE=https://example.org/.

  2. To send alerts, set EMAIL_STATUS=admin@example.org and SMTP_{HOST,PORT,USER,PASSWORD}.

  3. To generate a static page, set STATIC_HTML=/home/user/public_html/yoself.html. To only monitor containers and/or servers, but not host, set MONITOR_HOST=false.

Intended usage: One instance on each server whose containers you want to monitor. Another one (static page) on the server that checks if your main servers are up.

How it looks like: yoself.nykula.com


Why?

I work with a few servers with Podman containers. Some containers have health checks defined in their Containerfile or my compose.yaml. Some don’t include binaries neccessary to implement health checks; but to see if they work, it can be enough to query their HTTP API.

A server may experience load spikes and is sometimes close to running out of disk. Finally, a server may periodically become inaccessible because of network issues.

My goal is to get emails about server health events, with very little configuration per server. And to have an overview of what stands out, without deep insights (for detailed information, I’ll ssh anyway). Ideally with one tool for it all.

The static page is needed because I only work part-time and don’t have money to rent an extra VPS. For monitoring my main VPS, I use a shared system that lets users run apps in background and publish HTML pages.


Alternatives with similar features:

Non-goals, their features that Yoself doesn’t have:

Would be nice, but wasn’t a strong need to implement yet:

Upd: re-read the rules and added [CBH] to title as per Rule 8. I didn’t use LLMs when coding this project, as evidenced by my commit history on Codeberg. Developers of dependencies do use LLMs, though.

#selfhosted

threaded - newest

nykula@piefed.social on 26 Jul 17:48 collapse

If needed, I can make Yoself show recent RSS from Mastodon

Added tonight, ^1.1.0 on npm. Set another INCIDENT=https://example.org/@mastodon.rss environment variable for it to work. Looks like text + date link at the top of the page. Fetches once every 10 minutes; shows toots from last 48h in static html. No demo for this feature because I don’t currently have an incident history account.