*Cube-Host– full cloud services!!

Using Zabbix as a universal tool to monitor your Virtual Private Server

Zabbix monitoring for a VPS: dashboards, metrics and alerts

Make your VPS predictable with real monitoring, not guesswork

A VPS can feel “stable” right until the day a disk fills up, RAM hits swap, or a database starts choking during peak traffic. Zabbix solves this with one simple idea: collect metrics continuously, visualize trends, and alert you before users notice outages.

This guide is focused on a practical VPS use case: monitoring a Linux/Windows virtual private server (CPU, memory, disk, network, services), setting up meaningful alerts, and securing your monitoring access. If you host projects on Cube-Host, Zabbix is a great companion to keep your VPS hosting environment healthy and scalable.


What Zabbix is and what it can monitor

Zabbix is an open-source monitoring platform used to track servers, networks, websites, databases, virtual machines, and cloud services. On a VPS it can monitor hundreds of parameters in near real time, including:

  • CPU & load: utilization, load averages, context switches, iowait
  • Memory: free/used memory, cache, swap usage, OOM events
  • Disk: free space, inode usage, disk latency, SMART health (if accessible)
  • Network: bandwidth, packet loss, interface errors, active connections
  • Services: nginx/apache status, MySQL/PostgreSQL health, mail server checks, Docker, custom apps
  • Security signals: suspicious logins, file changes, unusual spikes (often via custom items or log monitoring)

The goal is not “collect everything”. The goal is to collect the right signals, attach thresholds, and create alerts that lead to action.

How Zabbix works on a VPS: server, agent, proxy

Most VPS deployments use three core building blocks. Understanding them makes planning much easier:

ComponentRoleWhere it runsWhen you need it
Zabbix ServerCentral brain: stores data, evaluates triggers, sends alertsUsually a dedicated Linux VPSAlways (even if you monitor just one host)
Zabbix Agent (Agent/Agent2)Collects OS/app metrics and sends them to the serverOn each monitored VPS (Linux or Windows)Recommended for deep OS monitoring
Zabbix ProxyCollects data locally and forwards it to the serverRemote sites / segmented networksUseful for many locations or restricted networks

For a single Cube-Host VPS, a common setup is: Zabbix Server on one VPS + Zabbix Agent on the VPS you monitor. As you grow, you can keep one server and add more hosts (and proxies if needed).

Baseline monitoring checklist for any VPS

If you only configure one thing, configure these. This set catches most incidents: full disk, memory exhaustion, overload, broken services, and network problems.

System health

  • CPU utilization and load (including iowait)
  • RAM usage, swap usage, OOM killer events
  • Disk free space and inode usage on critical mount points
  • Disk latency / I/O (especially if you host databases or many small files)
  • Uptime / reboot detection

Network and availability

  • Ping/ICMP reachability (basic availability)
  • Bandwidth usage (in/out), interface errors, packet loss
  • TCP connections count (useful to spot DDoS-like patterns)
  • External HTTP/HTTPS checks for your website or API endpoints

Services you actually depend on

  • Web server (Nginx/Apache) up + response time
  • Database (MySQL/MariaDB/PostgreSQL) availability + slowdowns
  • Queues/workers (if you use background jobs)
  • Mail services (SMTP/IMAP) if your workflow depends on them (see VPS mail server)

Security signals (minimum viable)

  • SSH brute force attempts (via log monitoring or Fail2Ban counters)
  • Unexpected spikes in CPU/network at night
  • Critical file changes in web roots (/var/www) and configs (/etc) for production servers

Practical alert thresholds that work in real life

Default “high CPU” alerts often produce noise. A better approach is alerting on risk (disk almost full), service down, and performance degradation. Start with the table below and tune based on your baseline.

SignalExample triggerWhy it mattersTypical action
Disk free space< 15% (warning), < 5% (critical)Full disk breaks databases, logs, updatesClean logs, extend storage, fix runaway files
RAM + swapSwap usage grows steadily + high iowaitServer becomes slow, may start OOM killingOptimize app, add RAM, tune PHP-FPM/DB
Service availabilityHTTP check fails 3 times in a rowUsers can’t access the siteRestart service, investigate logs
DB latencyResponse time above baseline for 5–10 minSlow site even if it’s “up”Analyze queries, indexes, disk I/O
Network errorsInterface errors/packet loss above baselineHidden root cause of timeoutsCheck routes, firewall rules, provider status

Tip: separate alerts into “actionable now” (critical) and “review soon” (warning). This makes Zabbix helpful, not annoying.

Where to install Zabbix: on the same VPS or on a dedicated monitoring VPS?

You can install Zabbix Server on the same VPS you monitor, but in production it’s usually cleaner to run it separately.

  • All-in-one (server + agent on one VPS): fastest for a lab, a single server, or learning.
  • Dedicated monitoring VPS: best practice for business services—monitoring stays online even if the application VPS is down.

For Cube-Host clients, a simple and scalable pattern is: create a small Linux VPS for Zabbix Server and monitor all other VPS instances from it. When your infrastructure grows, you scale the monitoring VPS or add proxies.

Installation outline on a Linux VPS

Exact steps depend on your distribution and the Zabbix version, but a correct high-level sequence looks like this:

  1. Prepare the VPS: update OS, enable firewall, set correct timezone and NTP.
  2. Install DB: MariaDB/MySQL or PostgreSQL (separate DB server only if you scale).
  3. Install Zabbix Server + Frontend: web UI (Apache/Nginx + PHP) or containerized deployment.
  4. Install Zabbix Agent on each monitored VPS (Linux/Windows) and attach templates.
  5. Secure communication: use TLS (PSK or certificates) between server and agent.
  6. Set alerts: email, messengers, on-call tools; add maintenance windows.
  7. Backups: Zabbix DB + configuration exports; test restore.

Example (agent on Linux VPS)

After installing the agent package, you typically set the server address and hostname. This snippet shows the idea (paths may vary):

# Edit agent config
sudo nano /etc/zabbix/zabbix_agentd.conf

# Typical settings
Server=YOUR_ZABBIX_SERVER_IP
ServerActive=YOUR_ZABBIX_SERVER_IP
Hostname=web-01

# Restart agent
sudo systemctl enable --now zabbix-agent
sudo systemctl restart zabbix-agent

Firewall reminder: open only the necessary ports and restrict by IP. Never expose admin panels broadly without access control.

Notifications that reduce downtime (instead of creating noise)

Well-configured alerting is what makes Zabbix a “universal tool” for VPS monitoring:

  • Use severities (Info/Warning/Average/High/Disaster) so the on-call person knows how urgent it is.
  • Add dependencies (e.g., don’t alert “HTTP down” from 10 services if the whole VPS is unreachable).
  • Use maintenance windows during planned updates to avoid false alarms.
  • Route critical alerts to fast channels (messenger/SMS/on-call) and warnings to email.

Secure access to the Zabbix dashboard

Zabbix has a web interface, so treat it like any admin system. For production:

  • Enable HTTPS (TLS certificate) and redirect HTTP → HTTPS.
  • Restrict access by IP (office/VPN ranges) where possible.
  • Place Zabbix behind a private network or use a VPN for admin access.
  • Use strong passwords, least-privilege roles, and separate admin accounts.

If you want the simplest “secure-by-default” approach, use a private tunnel and access Zabbix only through VPN. Cube-Host has a ready option here: VPS VPN.

Monitoring Windows VPS with Zabbix

You can keep the Zabbix Server on Linux (common approach) and install the Zabbix Agent on Windows hosts to monitor CPU, RAM, disk, services, and event logs. If your workload requires Microsoft stack or RDP environments, check VPS Windows and still manage monitoring centrally from the same Zabbix instance.

Common mistakes (and quick fixes)

  • Installing monitoring on the same VPS you monitor: if the VPS is down, you lose visibility. Fix: run Zabbix Server on a small dedicated VPS Linux.
  • Alerting on CPU only: high CPU is often normal; disk full is not. Fix: prioritize disk, RAM/swap, service checks, and latency.
  • No baseline: thresholds copied from the internet create noise. Fix: measure for a week, then tune triggers.
  • Exposing Zabbix UI to the internet: admin panels become targets. Fix: restrict access, use VPN (VPS VPN), enforce HTTPS.
  • No backups of Zabbix DB: you lose history during incidents. Fix: backup DB + configs and test restore.

Next step: turn monitoring into capacity planning

Once alerts are stable, Zabbix becomes a planning tool: you can see trends and decide when to upgrade CPU/RAM/storage, long before users complain. That’s the difference between “reacting to outages” and running a VPS like a production system.

Prev
Menu