It uses a HTTP client to poll all instances every minute which return /proc/stat so that I can see how much CPU they use:
Explaining modern server monitoring stacks for self-hosting
11–20 of 36 posts
Re: Explaining modern server monitoring stacks for self-hosting
#12Push model is only great for short lived jobs (lambdas, cronjobs). Pull model scales much more easily if you’ve large number of servers in your fleet. Configuration is managed centrally, only the agent (like node-exporter) has to be running on the target node.
I like this approach because, for security data, you want it off of the box as soon as possible. In an ideal world a log would go straight from the kernel to another box, or as close to that as possible (to avoid tampering/ DOS'ing). So for your security data you're already going to want to push that latency metric down, and now the question is what to do with the rest of them - obviously your service logs are less sensitive, but at the same time getting things shipped off of a box can save you a lot of headache.
This is hand wavy though, I'm honestly very curious to hear what others think as I haven't built the system I'm describing.
Re: Explaining modern server monitoring stacks for self-hosting
#13Push model is only great for short lived jobs (lambdas, cronjobs). Pull model scales much more easily if you’ve large number of servers in your fleet. Configuration is managed centrally, only the agent (like node-exporter) has to be running on the target node.
How do you deal with security? Are all nodes accepting connections from the monitoring node? With push, the monitoring node is exposed, but it is a less valuable target than every node in the network. This is my main gripe with Prometheus (didn't use it yet).
For backups, you ideally want the backup server to do a pull from the backed-up servers, to avoid that a security incident in one of them could damage your backups.
But for monitoring, I feel that push is the way to go. I want only the minimal, indispensable connections into my production servers.
Re: Explaining modern server monitoring stacks for self-hosting
#14Earlier quoted context omitted.
How do you deal with security? Are all nodes accepting connections from the monitoring node? With push, the monitoring node is exposed, but it is a less valuable target than every node in the network. This is my main gripe with Prometheus (didn't use it yet).
Exactly. I feel that monitoring solutions have to be the opposite of backup ones. For backups, you ideally want the backup server to do a pull from the backed-up servers, to avoid that a security incident in one of them could damage your backups. But for monitoring, I feel that push is the way to go. I want only the minimal, indispensable connections into my production servers.
Re: Explaining modern server monitoring stacks for self-hosting
#15Re: Explaining modern server monitoring stacks for self-hosting
#16Alerts work well and it is not too complicated for simple things.
Re: Explaining modern server monitoring stacks for self-hosting
#17Re: Explaining modern server monitoring stacks for self-hosting
#18Prometheus and other modern application monitoring oriented timeseries solution stacks seem to be an overkill for simple server infrastructure monitoring, Zabbix is easier to setup and use and has all the batteries included.
Re: Explaining modern server monitoring stacks for self-hosting
#19For my single self-hosted server (also NixOS), I use netdata, because it has all the info I need, is efficient enough while keeping a day’s worth of history as well, and most importantly has built-in alerts for services like telegram or slack. Other stacks can do the same, but I haven’t found anything as simple to set up; netdata is just a simple service.
Self hosting in general tends to be overkill. It’s mostly people practicing for enterprise tasks. If you wanted to be practical about things you very likely would just give up self hosting entirely.
Re: Explaining modern server monitoring stacks for self-hosting
#20Prometheus and other modern application monitoring oriented timeseries solution stacks seem to be an overkill for simple server infrastructure monitoring, Zabbix is easier to setup and use and has all the batteries included.
I looked around but didn't really find anything that fit for me. There are a lot of complicated (albeit powerful) options, but I want simple, easy, lightweight, quick. These days I'm juggling so much, I want to be as efficient as possible with my time.
It's still early days but hoping to be able to onboard people towards the end of the year, for anyone who is interested feel free to join the waitlist: https://serverduty.co
Interestingly, I'm using ServerDuty to monitor ServerDuty as I build ServerDuty. I mean, if that isn't dogfooding, I don't know what is.