DEV Community

Vigilmon
Vigilmon

Posted on

How to Monitor Your Contentful CMS API with Vigilmon

How to Monitor Your Contentful CMS API with Vigilmon

Contentful is the headless CMS powering content for thousands of marketing sites, e-commerce stores, and developer portals. When the Content Delivery API goes down, your pages either show stale content or fail to render entirely. Monitoring Contentful with Vigilmon gives you early warning before your editors or end-users notice.

Why Monitor Contentful?

Contentful is highly reliable, but failures do happen:

  • Rate limiting after content previews or automated fetches spike your API calls
  • API key expiration or revocation after a team rotation
  • Space migration misconfiguration leaving API calls pointing at wrong space IDs
  • Webhook delivery failures when content publish events stop reaching your app
  • Preview API vs Delivery API mismatches between environments

Contentful API Endpoints to Monitor

1. Content Delivery API (CDA) — Public content

The CDA serves published content. Monitor a simple health-check query:

https://cdn.contentful.com/spaces/{SPACE_ID}/environments/master/content_types
Enter fullscreen mode Exit fullscreen mode

This returns all content types for your space. A valid response confirms:

  • Your Space ID is correct
  • Your CDN API key is active
  • Content is reachable from Contentful's CDN

Vigilmon setup:

  1. URL: https://cdn.contentful.com/spaces/{SPACE_ID}/environments/master/content_types
  2. Header: Authorization: Bearer {CDN_API_KEY}
  3. Expected status: 200
  4. Keyword check: "total" (should appear in response JSON)
  5. Check interval: 5 minutes

2. Content Preview API (CPA) — Draft content

If your site has a preview mode for editors, the CPA is a separate dependency:

https://preview.contentful.com/spaces/{SPACE_ID}/environments/master/content_types
Enter fullscreen mode Exit fullscreen mode

Use your Preview API key (not the CDN key) here. A separate monitor catches preview-only failures that won't affect your production site.

3. Contentful Images API

Contentful's image transformation CDN is at images.ctfassets.net. If you use ?w=800&fit=fill parameters for responsive images, verify the image CDN is reachable:

https://images.ctfassets.net/{SPACE_ID}/{ASSET_ID}/{TOKEN}/image.jpg?w=100
Enter fullscreen mode Exit fullscreen mode

Grab a stable asset URL from your space and add it as a monitor. Expect 200 with a Content-Type: image/* header.

4. Contentful Webhook Receiver (Your App)

Contentful triggers webhooks on content publish, unpublish, and asset changes. If your app's webhook endpoint is down, you'll miss invalidation events and serve stale content.

Add a monitor for:

https://yourapp.com/api/revalidate
https://yourapp.com/api/webhooks/contentful
Enter fullscreen mode Exit fullscreen mode

Keyword Monitoring for Content Freshness

For critical marketing pages, add a content freshness check:

  1. Add a monitor for your page URL (e.g., https://yoursite.com/landing)
  2. Enable keyword check: look for a string unique to recent content
  3. Alert if the keyword disappears — this catches "page renders but shows old content"

Alert Configuration

Marketing/editorial teams: Alert via Slack #content-alerts channel. 2–3 failures before alerting (avoids false alarms during Contentful's brief maintenance windows).

E-commerce with product data in Contentful: Alert immediately on first failure, page on-call engineering.

Example Monitoring Stack

Monitors:
  - name: Contentful CDA Health
    url: https://cdn.contentful.com/spaces/SPACE_ID/environments/master/content_types
    headers:
      Authorization: Bearer CDN_API_KEY
    expected_status: 200
    keyword: total
    interval: 5m

  - name: Contentful Images CDN
    url: https://images.ctfassets.net/SPACE_ID/ASSET_ID/TOKEN/img.jpg
    expected_status: 200
    interval: 10m

  - name: App Webhook Endpoint
    url: https://yourapp.com/api/webhooks/contentful
    expected_status: 200
    interval: 5m
Enter fullscreen mode Exit fullscreen mode

Summary

Contentful failures are usually invisible until editors start complaining or visitors see outdated prices. Four monitors — CDA, CPA, Images CDN, and your webhook receiver — give you complete coverage of the Contentful-to-browser stack.

Set up your first Contentful monitor on Vigilmon — free plan covers up to 5 monitors with 5-minute checks.


Vigilmon — multi-region uptime monitoring with instant Slack and email alerts.

Top comments (0)