DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Hetzner Cloud Infrastructure with Vigilmon

How to Monitor Hetzner Cloud Infrastructure with Vigilmon

Hetzner Cloud is one of the most popular choices for European developers — excellent performance-to-price ratio, simple API, and data centers in Germany, Finland, and the US. Whether you're running a single VPS or a multi-server production stack on Hetzner, you need external monitoring.

This guide shows how to monitor your Hetzner Cloud infrastructure with Vigilmon.


Why Hetzner Needs External Monitoring

Hetzner's own dashboard shows server status and basic metrics, but it can't tell you:

  • Whether your application is actually responding to HTTP requests
  • Whether your SSL certificate is about to expire
  • Whether your cron jobs and background workers are running
  • Whether your services are reachable from outside Europe (if you serve global traffic)

Vigilmon checks from multiple geographic regions, so you get a true external view of your Hetzner-hosted services.


Step 1: Monitor Your Web Application

For any web app hosted on Hetzner:

  1. Sign up at vigilmon.online
  2. Click Add Monitor → HTTP(S)
  3. URL: https://yourdomain.com
  4. Interval: 60 seconds (30s on paid plans)
  5. Alert: status != 200 or response time > 3000ms
  6. Channels: email + Slack

This tests whether your Hetzner server is reachable and your app is responding correctly.


Step 2: Monitor Multiple Services on One Server

Hetzner VPS instances typically run multiple services. Add monitors for each:

  • https://yourdomain.com — main web app
  • https://api.yourdomain.com/health — API health endpoint
  • https://admin.yourdomain.com — admin panel
  • https://yourdomain.com/webhook/health — webhook processor

Each gets its own Vigilmon monitor with dedicated alerting.


Step 3: Monitor SSL Certificate

Hetzner works well with Let's Encrypt. But certbot auto-renewal can fail silently if:

  • Port 80 is blocked by your firewall
  • DNS propagation is slow
  • Certbot hooks fail to reload nginx/apache

Add an SSL Certificate monitor in Vigilmon:

  1. Add Monitor → SSL Certificate
  2. Domain: yourdomain.com
  3. Alert: expires < 14 days

This catches certificate failures before your users see browser warnings.


Step 4: Monitor Hetzner Firewall Rules (Indirect)

Hetzner Cloud Firewall can block ports if misconfigured. Test your public services directly from Vigilmon's external checks — if your firewall accidentally blocks port 443, Vigilmon's HTTP check fails immediately.

This is especially useful after infrastructure changes: deploy → run Vigilmon check → confirm still reachable.


Step 5: Monitor Background Workers with Heartbeats

For Hetzner servers running cron jobs, queue workers, or scheduled tasks:

# Laravel queue worker on Hetzner
# /etc/cron.d/vigilmon-heartbeat
*/5 * * * * forge curl -sf https://hb.vigilmon.online/YOUR-HEARTBEAT-ID
Enter fullscreen mode Exit fullscreen mode

For a systemd service:

# In /etc/systemd/system/queue-worker.service
[Service]
ExecStart=/usr/bin/php /var/www/app/artisan queue:work
ExecStartPost=/usr/bin/curl -sf https://hb.vigilmon.online/YOUR-HEARTBEAT-ID
Restart=always
RestartSec=30
Enter fullscreen mode Exit fullscreen mode

Step 6: Monitor Database Connectivity (via App Health Endpoint)

Add a health endpoint to your app that tests the database:

// Laravel
Route::get('/health', function() {
    try {
        DB::connection()->getPdo();
        return response()->json(['status' => 'ok', 'db' => 'connected']);
    } catch (Exception $e) {
        return response()->json(['status' => 'error', 'db' => 'disconnected'], 503);
    }
});
Enter fullscreen mode Exit fullscreen mode

Monitor https://yourdomain.com/health — a 503 means your Hetzner-hosted database is unreachable.


Recommended Monitor Configuration for Hetzner

Monitor Target Alert Condition
HTTP(S) main app https://yourdomain.com status != 200, latency > 3s
HTTP(S) API https://api.yourdomain.com/health status != 200
SSL Certificate yourdomain.com expires < 14 days
Heartbeat cron job (every 5 min) no ping > 7 min
HTTP(S) with DB check https://yourdomain.com/health status 503

Hetzner-Specific Tips

  1. Hetzner data centers: Falkenstein (FSN1), Nuremberg (NBG1), Helsinki (HEL1), Ashburn (ASH). If you're serving EU traffic from Germany, Vigilmon's US check region tests cross-Atlantic latency.

  2. Hetzner floating IPs: If you use floating IPs for failover, monitor the floating IP domain — if the IP is unassigned, your service disappears.

  3. Hetzner volumes: If your app mounts a Hetzner volume for storage and it disconnects, your app may 500. A health endpoint that touches the volume catches this.


Conclusion

Hetzner Cloud gives you excellent infrastructure at low cost. Vigilmon adds the external monitoring layer that makes that infrastructure production-ready — HTTP checks, SSL monitoring, and heartbeat validation from multiple global regions.

Start monitoring your Hetzner infrastructure with Vigilmon — free tier available

Top comments (0)