Running a Monitoring System on Your Own VPS
The fundamental problem with running your own monitoring, and how to avoid it. This article also covers the specs you need and how to split the work with external services.

Ren

Procura
Don't put it on the same server
If the thing being monitored and the monitor are on the same server, the notifications stop together with that server when it goes down. It's built so that it goes quietest at the very moment you most want to know. Decide first whether to put it somewhere else or combine it with an external service.
- The server goes down, so monitoring goes down, so no notification is sent
- The network is cut, so likewise no notification arrives
- Then monitoring has no point
- As a rule, put monitoring outside the thing being monitored
Where to put it
- On a VPS from a different provider (lowers the chance both go down at once)
- On a PC at home or a small device
- Combine it with an external monitoring service
- If you have several servers, have them monitor each other

Procura
Specs you need

Procura
- If you have only a few things to monitor, the smallest setup is enough
- If you keep records for a long time, allow capacity for that
- Check that the mechanism that sends notifications works
- You don't need to rent a large plan just for monitoring
Dividing the work with external services

Procura
- External service: leave it only the minimum liveness monitoring (checking that things are running)
- Your own monitoring: the finer items and internal values
- With both, you can notice even if one stops
- Send notifications from both to a place you normally look

Procura
What to monitor

Procura
- Whether the site or service responds
- Free disk space
- The state of memory and swap
- Certificate expiry dates

Procura
Where notifications go
A notification only has meaning once it is sent to a place where you will notice it. Even if you send it to email, someone who doesn't normally check email won't notice. Conversely, if you send too many, you stop reading them and real problems get buried. Deciding where to send them and narrowing the conditions for sending is worth doing before adding more monitoring items.
- Send them to a place you normally look
- Don't send them from the monitored server itself
- After setting up, always test that they arrive
- Once a month, check that notifications are still working

Ren
This article is translated from the Japanese original. If the two differ, the Japanese version is the one we keep up to date.