DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Your Nginx Web Server with Vigilmon

How to Monitor Your Nginx Web Server with Vigilmon

Nginx powers over 30% of all web servers on the internet. Whether you're running it as a reverse proxy, load balancer, or web server, downtime means lost revenue and frustrated users. In this guide, we'll show you how to set up comprehensive monitoring for your Nginx deployment using Vigilmon.

Why Monitor Nginx?

Nginx failures can be silent. The process might still be running, but:

  • Worker processes could be exhausted
  • Upstream services could be timing out
  • SSL certificates could be expiring
  • Specific endpoints could be returning errors

Basic process monitoring isn't enough. You need endpoint-level health checks.

Setting Up Nginx Monitoring with Vigilmon

Step 1: Create a Health Check Endpoint

Add a simple health endpoint to your Nginx config:

server {
    listen 80;
    server_name yourdomain.com;

    # Health check endpoint
    location /health {
        access_log off;
        return 200 "OK\n";
        add_header Content-Type text/plain;
    }

    # Your main app
    location / {
        proxy_pass http://backend;
    }
}
Enter fullscreen mode Exit fullscreen mode

Step 2: Add Your Nginx Monitor in Vigilmon

  1. Sign in at vigilmon.online
  2. Click + New Monitor
  3. Enter your domain: https://yourdomain.com/health
  4. Set check interval: 1 minute
  5. Select monitoring regions (multi-region catches location-specific issues)
  6. Set alert threshold: notify after 2 consecutive failures

Step 3: Monitor SSL Certificate Expiry

Vigilmon automatically checks SSL certificates on HTTPS monitors. You'll get an alert 30, 14, and 7 days before expiry.

No more scrambling to renew certificates at 2am.

Step 4: Configure Alert Channels

Connect your preferred alert destinations:

  • Email: Immediate alerts to your inbox
  • Slack: Team-wide notifications in your ops channel
  • PagerDuty: On-call escalation for critical services
  • Webhooks: Custom integrations with your toolchain

Monitoring Nginx Upstream Health

If Nginx is proxying to multiple backends, monitor each upstream separately:

upstream backend {
    server backend1.internal:8080;
    server backend2.internal:8080;
    server backend3.internal:8080;
}
Enter fullscreen mode Exit fullscreen mode

Create separate monitors in Vigilmon for each backend health endpoint. This lets you pinpoint which server is failing without manually checking each one.

Example: Multi-Region Nginx Monitoring

For production Nginx setups, enable multi-region checks in Vigilmon:

  • US East (primary region)
  • Europe West (catch CDN/geo-routing issues)
  • Asia Pacific (global coverage)

If only one region sees failures, it's likely a routing or CDN issue rather than Nginx itself. This saves hours of debugging.

Setting Up a Status Page

Share your Nginx service status with users using Vigilmon's public status pages. When Nginx goes down, your status page updates automatically — no manual updates needed during incidents.

Real Example: Nginx Downtime Alert

Here's what a typical Vigilmon alert looks like when Nginx goes down:

🔴 ALERT: yourdomain.com is DOWN
Status: 502 Bad Gateway
Location: US East, EU West
Duration: 2m 14s
Acknowledged: No

→ View incident: https://vigilmon.online/incidents/xxx
Enter fullscreen mode Exit fullscreen mode

Advanced: Monitor Nginx Error Rate

Combine Vigilmon's uptime monitoring with your Nginx access logs to track:

  • 4xx error rates (client errors)
  • 5xx error rates (server errors)
  • Response time percentiles
  • Request throughput

Conclusion

Nginx monitoring doesn't have to be complicated. Vigilmon gives you:

  • ✅ 1-minute check intervals
  • ✅ Multi-region monitoring
  • ✅ SSL certificate tracking
  • ✅ Instant alerts via Slack, email, PagerDuty
  • ✅ Public status pages

Start monitoring your Nginx server today — the free tier covers up to 5 monitors at 1-minute intervals. Sign up at vigilmon.online.

Top comments (0)