Crystade Uptime Monitor
WordPress REST health-check plugin with authenticated monitoring endpoint and behavioral tests.
by Alex Boles · github.com/alexwboles/crystade-uptime-monitor
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/alexwboles/crystade-uptime-monitor/archive/refs/heads/main.zipA small WordPress plugin proof for an external uptime-monitoring integration.
It exposes GET /wp-json/crystade/v1/status and returns a compact JSON health
report without publishing WordPress, PHP, plugin, or theme version numbers.
Checks returned
- Database connectivity (critical if unavailable)
- WordPress maintenance mode (critical when active)
- Overdue cron-event count (degraded when non-zero)
- Free-disk percentage (degraded below 10%)
- Counts of available core, plugin, and theme updates
The endpoint returns HTTP 503 for critical failures and HTTP 200 for healthy or
degraded states. The JSON status field lets Crystade distinguish ok,
degraded, and critical results.
Installation
-
Copy this directory into
wp-content/plugins/. -
Add a long random token to
wp-config.php:define('CRYSTADE_MONITOR_TOKEN', 'replace-with-a-long-random-secret'); -
Activate Crystade Uptime Monitor in WordPress.
-
Configure Crystade to call:
https://example.com/wp-json/crystade/v1/statuswith the request header:
Authorization: Bearer replace-with-a-long-random-secret
The route fails closed with HTTP 503 if no token is configured. Responses use
Cache-Control: no-store so monitoring data is not cached by intermediaries.
Verification
The plugin is linted and its route, authentication, privacy, health-state, and HTTP-status behavior are exercised in a self-contained PHP test harness:
php -l crystade-uptime-monitor.php
php tests/test-plugin.php
The current verification run used PHP 8.5.10 on Windows and passed syntax validation plus all 13 behavioral assertions.
The exact Crystade authentication and response schema should be confirmed with the client before final integration. This proof intentionally keeps the transport adapter small so the payload can be mapped to their documented schema without rewriting the WordPress health checks.