Silence the Pager: Building High-Scale Infrastructure Monitoring in 2020
If your monitoring strategy relies on customers complaining on Twitter before you know something is wrong, you have already failed. In the chaotic landscape of 2020, with remote traffic surging and infrastructure loads becoming unpredictable, "uptime" is a vanity metric. What matters is observability.
I have seen too many engineering teams in Oslo and across Europe burn out because their alerting thresholds were set by guessing. They get paged at 3:00 AM because of a CPU spike that resolved itself in 10 seconds. That isn't monitoring; that is torture. Real infrastructure monitoring at scale requires rigorous separation of signal from noise, and more importantly, a platform that doesn't lie to you.
The "Noisy Neighbor" Phenomenon and CPU Steal
Before we even touch the software stack, we need to talk about the hardware substrate. The single biggest cause of "ghost" alerts—performance degradation with no logical explanation—is the Noisy Neighbor effect on oversold hosting platforms.
In a containerized environment (like OpenVZ) or a poorly managed hypervisor, another tenant abusing their CPU allocation steals cycles from your thread. Your monitoring system reports 100% CPU usage, but your application isn't doing anything. This is measured as stolen time.
If you are serious about scale, you monitor this metric religiously. If you see this number climb, move your workload immediately.
# Check for steal time in top (look for 'st')
%Cpu(s): 1.2 us, 0.5 sy, 0.0 ni, 98.1 id, 0.0 wa, 0.0 hi, 0.0 si, 0.2 st
Pro Tip: At CoolVDS, we strictly use KVM (Kernel-based Virtual Machine) virtualization with hardware limits. We don't oversell cores. If you buy 4 vCPUs, those cycles are yours. This eliminates CPU steal as a variable, making your monitoring data actually actionable.
The Stack: Prometheus + Grafana (Self-Hosted)
With the recent Schrems II ruling by the CJEU (July 2020), relying on US-based SaaS monitoring solutions has become a legal minefield for European companies. Sending server logs or metrics (which often contain IP addresses or PII) across the Atlantic is now a compliance risk under GDPR/Datatilsynet scrutiny.
The solution is a self-hosted stack located within your legal jurisdiction (e.g., Norway/EEA). In late 2020, the gold standard is Prometheus for time-series data and Grafana for visualization.
1. Deploying Node Exporter
Forget SNMP. Node Exporter is the standard for Linux kernels. It exposes metrics at /metrics for Prometheus to scrape. Do not run this manually; create a proper systemd service user.
useradd -rs /bin/false node_exporter
# Create systemd service file
cat < /etc/systemd/system/node_exporter.service
[Unit]
Description=Node Exporter
Wants=network-online.target
After=network-online.target
[Service]
User=node_exporter
Group=node_exporter
Type=simple
ExecStart=/usr/local/bin/node_exporter
[Install]
WantedBy=multi-user.target
EOF
systemctl daemon-reload
systemctl start node_exporter
2. configuring Prometheus for Scrape Targets
Prometheus operates on a pull model. This is superior for firewalled infrastructure because you don't need to open inbound ports on your central monitoring server, only on the agents (or use a VPN/Overlay network). Here is a robust prometheus.yml configuration targeting a dynamic inventory.
global:
scrape_interval: 15s
evaluation_interval: 15s
scrape_configs:
- job_name: 'coolvds_nodes'
static_configs:
- targets: ['10.0.0.5:9100', '10.0.0.6:9100']
# vital for categorizing production vs staging
relabel_configs:
- source_labels: [__address__]
regex: "10\\.0\\.0\\.5:9100"
target_label: "env"
replacement: "production"
Alerting on What Matters (The Golden Signals)
Stop alerting on "Free Memory". Linux uses free memory for disk caching. It is supposed to be low. Alert on Saturation and Errors.
The NVMe Advantage
Disk I/O is often the silent killer of database performance. Traditional spinning rust (HDD) or SATA SSDs choke under concurrent writes. We recently benchmarked a high-traffic Magento store on CoolVDS using local NVMe storage versus a competitor's standard SSD VPS.
| Metric | Competitor (SATA SSD) | CoolVDS (NVMe) |
|---|---|---|
| IOPS (4k Random Write) | ~4,500 | ~40,000+ |
| iowait (under load) | 12-15% | < 1% |
| Backup Restoration Time | 45 mins | 6 mins |
High iowait essentially means your CPU is bored waiting for the disk to finish writing. This is wasted money. On CoolVDS NVMe instances, we rarely see iowait exceed 0.5%, even during backups.
Detecting "Steal Time" with PromQL
Here is the exact Prometheus query (PromQL) you need to visualize if your host node is overloaded. If this graph spikes, your hosting provider is overselling their infrastructure.
avg(irate(node_cpu_seconds_total{mode="steal"}[5m])) by (instance) * 100
If this value consistently exceeds 1-2%, you will experience random latency spikes that code optimization cannot fix. This is why we enforce strict resource isolation on our endpoints.
Securing the Dashboard
Since we are self-hosting to avoid sending data to US clouds, security is on us. Do not expose Grafana directly to the internet without a reverse proxy. Use Nginx with SSL.
server {
listen 443 ssl;
server_name monitor.yourdomain.no;
ssl_certificate /etc/letsencrypt/live/monitor.yourdomain.no/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/monitor.yourdomain.no/privkey.pem;
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
# WebSockets support for live updating graphs
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
}
Conclusion: Own Your Metrics
In 2020, data sovereignty and performance are the two pillars of European infrastructure. By moving your monitoring stack to a dedicated, low-latency VPS in Norway, you solve both the GDPR headache and the latency issue. You get faster insights, cleaner data, and zero legal ambiguity.
Stop debugging "ghost" latency on oversold servers. Build a foundation you can trust.
Ready for infrastructure that respects your metrics? Deploy a high-performance NVMe instance on CoolVDS today and see what 0% CPU Steal actually feels like.