Wagtail powers some of the most demanding content management deployments on the planet — from NASA to Google to the UK government's digital infrastructure. Built on Django, it delivers editorial flexibility and developer ergonomics in one package. But like any Django application, Wagtail's uptime depends on the web server, database, cache, and scheduled tasks all running correctly. Vigilmon gives you external monitoring for the admin interface, public site, REST API, SSL certificates, and scheduled management commands.
What You'll Set Up
- HTTP uptime monitor for the Wagtail admin interface
- Site homepage health check
- Wagtail REST API endpoint monitoring (
/api/v2/) - SSL certificate expiry alerts
- Heartbeat monitoring for scheduled management commands (e.g.
publish_scheduled_pages)
Prerequisites
- Wagtail 5.x or later installed and running
- Wagtail admin accessible at
https://yourdomain.com/admin - Wagtail REST API enabled (
wagtail.api.v2inINSTALLED_APPS) - A free Vigilmon account
Step 1: Monitor the Wagtail Admin Interface
The Wagtail admin at /admin is the editorial control center. If it goes down, editors lose the ability to create, edit, or publish content.
- Log in to vigilmon.online and click Add Monitor.
- Set Type to
HTTP / HTTPS. - Enter the URL:
https://yourdomain.com/admin/login/ - Set Check interval to
1 minute. - Set Expected HTTP status to
200. - Click Save.
The login page is accessible without authentication, making it a reliable probe target. A 200 response confirms Django is serving requests, the database connection is alive (login form uses the session backend), and Wagtail's middleware stack is intact.
Step 2: Monitor the Site Homepage
The public homepage is what your visitors see. A separate monitor for the root URL catches failures that might leave the admin up while the public site is broken (e.g. a bad template deploy, a missing static file that causes a template error, or a CDN misconfiguration).
- Click Add Monitor → HTTP / HTTPS.
- Enter your site's root URL:
https://yourdomain.com/ - Set Expected HTTP status to
200. - Set Check interval to
1 minute. - Optionally set Expected response body to contain a string unique to your homepage HTML (e.g. your site name or a specific meta tag value).
- Click Save.
If your site uses a CDN like Cloudflare, add a second monitor that bypasses the CDN and hits your origin server directly. This catches origin failures that the CDN might mask with cached responses:
https://your-origin-ip/
Add the Host: yourdomain.com header so your Django ALLOWED_HOSTS check passes.
Step 3: Monitor the Wagtail REST API
Wagtail's REST API (/api/v2/) is used by headless frontends, mobile apps, and third-party integrations. Monitoring it confirms the API layer is functioning independently of the admin and public site.
First, ensure the API is configured in your Django settings:
# settings.py
INSTALLED_APPS = [
...
'wagtail.api.v2',
...
]
# urls.py
from wagtail.api.v2.router import WagtailAPIRouter
api_router = WagtailAPIRouter('wagtailapi')
api_router.register_endpoint('pages', PagesAPIViewSet)
urlpatterns = [
path('api/v2/', api_router.urls),
...
]
Now add the Vigilmon monitor:
- Click Add Monitor → HTTP / HTTPS.
- Enter the URL:
https://yourdomain.com/api/v2/pages/?limit=1 - Set Expected HTTP status to
200. - Set Expected response body to contain
"meta". - Set Check interval to
5 minutes. - Click Save.
The ?limit=1 parameter keeps the response lightweight. A successful response confirms the API router, database query, and JSON serialization are all working.
Step 4: Add a Django Health Check Endpoint
For richer monitoring, add a dedicated health endpoint that checks Wagtail's dependencies:
# health/views.py
from django.http import JsonResponse
from django.db import connection
def health(request):
try:
connection.ensure_connection()
db_ok = True
except Exception:
db_ok = False
status = 200 if db_ok else 503
return JsonResponse({'db': db_ok, 'status': 'ok' if db_ok else 'error'}, status=status)
# urls.py
from health.views import health
urlpatterns = [
path('health/', health),
...
]
Add a Vigilmon monitor for https://yourdomain.com/health/ with expected status 200 and body containing "status":"ok". This gives you a single endpoint that validates the database connection explicitly.
Step 5: SSL Certificate Alerts
Wagtail sites almost universally run on HTTPS. Certificate expiry causes browser warnings and immediate editorial lockout from the admin.
- Open the HTTP / HTTPS monitor created in Step 1.
- Enable Monitor SSL certificate under the SSL section.
- Set Alert when certificate expires in less than
21 days. - Click Save.
If you're using Let's Encrypt via Certbot with nginx or Apache, verify your renewal cron job is active:
systemctl status certbot.timer
# or
crontab -l | grep certbot
A 21-day alert window gives you three weeks to investigate renewal failures before editors experience disruption.
Step 6: Heartbeat Monitoring for Scheduled Management Commands
Wagtail relies on scheduled Django management commands for core content workflows:
publish_scheduled_pages— publishes pages whose go-live date has passedpublish_scheduled— alias in newer Wagtail versions- Custom commands for cache warming, sitemap generation, search index updates
If the cron or Celery beat that runs these commands fails silently, content never publishes and editors don't know why.
- In Vigilmon, click Add Monitor → Cron Heartbeat.
- Set the expected ping interval to match your management command frequency (e.g.
5 minutesforpublish_scheduled_pages). - Copy the heartbeat URL (e.g.
https://vigilmon.online/heartbeat/abc123). - Update your cron entry to send the heartbeat on success:
# /etc/cron.d/wagtail
*/5 * * * * wagtail cd /path/to/project && python manage.py publish_scheduled_pages && curl -s https://vigilmon.online/heartbeat/abc123
For Celery beat tasks:
# tasks.py
from celery import shared_task
import requests
@shared_task
def publish_scheduled():
from django.core.management import call_command
call_command('publish_scheduled_pages')
requests.get('https://vigilmon.online/heartbeat/abc123', timeout=5)
# celery_config.py
CELERY_BEAT_SCHEDULE = {
'publish-scheduled-pages': {
'task': 'myapp.tasks.publish_scheduled',
'schedule': 300.0, # every 5 minutes
},
}
If the cron job fails, the command throws an exception, or Celery beat stops, no ping reaches Vigilmon, and you get an alert after the expected interval.
Step 7: Configure Alert Channels
- Go to Alert Channels in Vigilmon and add email, Slack, or a webhook.
- Set Consecutive failures before alert to
2on the homepage monitor — Django's WSGI server may occasionally take 5–10 seconds to respond to a cold request after gunicorn worker recycling. - Use Maintenance windows during deployments:
# Before deploying
curl -X POST https://vigilmon.online/api/maintenance \
-H "Authorization: Bearer YOUR_VIGILMON_API_KEY" \
-d '{"monitor_id": "abc123", "duration_minutes": 5}'
python manage.py migrate
sudo systemctl restart gunicorn
Summary
| Monitor | Target | What It Catches |
|---|---|---|
| Admin interface | /admin/login/ | Django down, DB connection broken |
| Site homepage | / | Template error, bad deploy, CDN miss |
| REST API | /api/v2/pages/?limit=1 | API router failure, serialization error |
| Health endpoint | /health/ | Database connection lost |
| SSL certificate | HTTPS domain | Certificate expiry, renewal failure |
| Cron heartbeat | Heartbeat URL | publish_scheduled_pages missed, Celery stopped |
Wagtail makes content management elegant for editors and maintainable for developers — but that elegance depends on all its moving parts running. With Vigilmon watching the admin, public site, REST API, database health, SSL certificates, and scheduled command heartbeats, you'll catch problems before your editors file support tickets or your content silently stops publishing.