I have been running a YunoHost server for ~5 years now, but there is one question I have never been able to reply to: how loaded is my server?
I am a terrible administrator, I have no idea how to determine:
if my server is running smoothly
if the server is under stress, and why
what applications are the heaviest
if there is the possibility of installing more apps
when peaks of stress are happening and what is causing them
In general, I would like to understand the fundamentals of server monitoring: what are the most critical metrics and what do they mean? What parameters do I have to keep an eye on?
I installed Prometheus and Grafana, but then I realized I have absolutely no idea what to do next… Do you have any suggestions?
I thought about watching some video tutorials, but I would not really know how they would relate to YunoHost installations.
Feel free to send me any resource that comes to your mind! Once I will have learned the basics, I would be very happy to write some pointers about this in the documentation, or an essential YunoHost Monitoring tutorial.
Hi,
same here, i don’t really know how to monitor my little server. What i do is using htop, there you can see the load and ram usige. And sometimes not all services are running so i check yunohost diagnosis show --issues . On my old yunohost VPS with Debian11 i got email, when an issue was there.
My problem is not really what is not working, because indeed YunoHost’s own diagnosis works quite well. It’s more about what’s stressing/loading the hardware…
I use Monitorix for that purpose. It displays lots of graphs and allows you to select the time period. I haven’t yet configured it to send me emails about critical issues. That would be the next step.
I generally have phpsysinfo, htop, btop, iotop, watchdog installed on my servers.
I still didn’t find an easy way for log analysis and viewing logs on web interface. Some options are available on github but I didn’t find time to look at them.
@tommi I finally got around to thinking about this myself the other day and tried out a few things that have been suggested. I started with Prometheus and Grafana - all you have to do is run the official node_exporter metrics exporter on your machine and add the Grafana node_exporter dashboard. This is the most powerful and complete system, which you can also wire up alerts for, but I found it to be overkill for my needs. Then I tried some of the other tools folks have already mentioned:
Monitorix - provides a nice grab-bag of graphs out-of-the-box, but has an unusable UI, IMO
PHPSysinfo - provides a nice/simple page with basic stats
I also tried Glances, but I didn’t see much benefit to that over shelling into my machine and running top, etc. NetData was a no-go because of the proprietary front-end.
Finally I realized what I really wanted was just basic alerting for memory and disk usage - which the YNH Diagnosis tool already provices While it’s true this only provides memory stress alerting at the time the diagnosis is run and doesn’t account for memory spikes, CPU or disk/network I/O, I’ve found the only thing that’s really caused issues with my YNH instance and apps over the past 6 years is memory and disk space.
That said, if you need more granularity for some reason, then I think Prometheus/Grafana is probably your best option - mostly because of the alerting component. Although I didn’t know you could configure email alerts for Monitorix - might take a second look at it, now that I know about that.
UPDATE: Meh, took a look at the Monitorix alerts - the docs are like the graphs, IMO - all over the place. Lots of noise that I think most people don’t need, and if I’m going to be configuring scripts for each built-in graph to send alerts, then I may as well configure Prometheus Alertmanager or Grafana alerting. If anyone knows any other monitoring tools with a simple and sensible alerting setup, I’d love to know.
As a newbie I may be missing the point here but I use the Cockpit app to see how much memory is being used, how much swap is available, what process load is like and which apps are soaking up both. It seems like a simple easy to use tool to me. What more do you need or importantly what am i missing?
@tzb6js Cockpit looks interesting, love that it’s written in Python - but one thing it at least doesn’t seem to cover is alerting, which I find pretty critical for monitoring. Not sure if that’s a priority for the OP, though. (Oh, and it looks like Cockpit wont run out of the box on YNH if you’re also running Jitsi because they compete for port 9090)
I use Beszel for monitoring and alerting (alerts are being send to me via Telegram). Also I use Uptime Kuma to have some kind of healthcheck (Uptime Kuma also sends alerts via Telegram).
Important note here is that I host Beszel Server and Uptime Kuma on external VPS which is connected with my Yunohost box via Tailscale (Uptime Kuma just pings the web services, but Beszel needs beszel-agent installed on Yunohost box).
I use Webadmin, this seems to provide all the info that I needed on the health of my server. It also provides me with UI to navigate my Yunohost server internal file structure and installed apps.