How to Monitor Your Hetzner VPS or Dedicated Server with Vigilmon
Hetzner is one of Europe's most popular cloud providers, beloved by developers for its exceptional price-to-performance ratio. A Hetzner CX21 VPS starts at around 3.49 EUR/month — making it a go-to choice for side projects, staging environments, and even production workloads. But Hetzner's affordable pricing means you get what you pay for in terms of managed monitoring — there is none. This guide shows you how to add production-grade uptime monitoring to any Hetzner server using Vigilmon.
Hetzner vs. AWS/GCP/Azure — The Monitoring Gap
Managed cloud providers like AWS and GCP include basic monitoring (CloudWatch, Cloud Monitoring) out of the box. With Hetzner, you get:
- A bare VPS or dedicated server
- Hetzner's own basic metrics (CPU, network) in their console
- No application-level monitoring
- No external uptime checks
This is fine — it means lower costs. But you need to add external monitoring yourself.
Step 1: What to Monitor on Your Hetzner Server
For a typical Hetzner server running a web application:
| Component | Monitor Type | URL |
|---|---|---|
| Web application | HTTP monitor | https://yourdomain.com |
| Health check endpoint | HTTP monitor | https://yourdomain.com/health |
| Admin panel | HTTP monitor | https://yourdomain.com/admin |
| SSL certificate | SSL monitor | Auto-detected |
| Background jobs | Cron/heartbeat | Ping URL |
Step 2: Set Up Vigilmon
- Sign up at vigilmon.online — free account, no credit card
- Click Add Monitor > HTTP Monitor
- Enter your Hetzner server's domain or IP:
https://yourdomain.com - Check interval: 1 minute
- Alert after: 2 consecutive failures
- Add your alert channel (email, Slack, or webhook)
Step 3: Add a Health Check Endpoint to Your Application
For nginx serving static files:
location /health {
access_log off;
return 200 'ok';
add_header Content-Type text/plain;
}
For a PHP application:
<?php
// health.php
header('Content-Type: application/json');
echo json_encode(['status' => 'ok']);
For a Node.js/Express app behind nginx:
location /health {
proxy_pass http://127.0.0.1:3000/health;
proxy_read_timeout 5s;
access_log off;
}
Step 4: Configure nginx for HTTPS
Most Hetzner setups use Let's Encrypt with Certbot:
# Install Certbot
apt install certbot python3-certbot-nginx
# Get certificate
certbot --nginx -d yourdomain.com
# Auto-renewal (already set up by Certbot)
crontab -l | grep certbot
Vigilmon's SSL certificate monitor will alert you 30 days before expiry — a useful backup in case Certbot's auto-renewal fails.
Step 5: Monitor Hetzner Server with Multiple Services
For a Hetzner server running multiple services:
# nginx.conf snippet
server {
server_name api.yourdomain.com;
location /health { proxy_pass http://127.0.0.1:3000/health; }
location / { proxy_pass http://127.0.0.1:3000; }
}
server {
server_name app.yourdomain.com;
location /health { proxy_pass http://127.0.0.1:4000/health; }
location / { proxy_pass http://127.0.0.1:4000; }
}
server {
server_name admin.yourdomain.com;
location /health { proxy_pass http://127.0.0.1:5000/health; }
location / { proxy_pass http://127.0.0.1:5000; }
}
Add separate Vigilmon monitors for each subdomain.
Step 6: Hetzner Floating IP Considerations
If you use Hetzner Floating IPs (for failover):
- Monitor the domain (e.g.,
api.yourdomain.com), not the IP - DNS-based monitoring via Vigilmon ensures you catch both the floating IP reassignment and the application health
Step 7: Monitor Background Jobs on Hetzner
Many Hetzner setups run cron jobs for backups, data processing, or monitoring tasks. Use Vigilmon's heartbeat monitor:
# /etc/cron.d/myapp
*/5 * * * * www-data /usr/local/bin/process-queue.sh && curl -s https://vigilmon.online/ping/YOUR_MONITOR_ID > /dev/null 2>&1
If the cron job fails to run (cron daemon dies, script exits with error), the ping never happens and Vigilmon alerts you.
Step 8: Hetzner Robot (Dedicated Servers)
For Hetzner Robot dedicated servers:
- Hardware failures are rarer but possible
- Hetzner provides its own server monitoring in the Robot panel
- Add Vigilmon for application-level monitoring on top
Hetzner Storage Boxes
If you use Hetzner Storage Boxes for backups, verify your backup scripts run successfully:
#!/bin/bash
# backup.sh
rsync -av /var/app/data/ user@your-storage-box.backup.hetzner.com:/data/ \n && curl -s https://vigilmon.online/ping/BACKUP_MONITOR_ID
Typical Hetzner Monitoring Stack
| Tool | Purpose |
|---|---|
| Vigilmon | External uptime monitoring, SSL checks, cron heartbeats |
| Hetzner Console | Server-level CPU, memory, network graphs |
| nginx logs | Request-level access and error logging |
| journald/syslog | System-level events, service restarts |
| Netdata (optional) | Real-time system metrics |
Summary
Hetzner's low cost means you set up your own monitoring — but with Vigilmon, that setup takes under 5 minutes. You get 1-minute check intervals, SSL certificate monitoring, cron heartbeat monitoring, and instant alerts when anything goes wrong.
Top comments (0)