Evaluator Setup (Cron)
Starting with EZMON v0.1.14+, the backend evaluator architecture has been consolidated directly into the Next.js Serverless API Route (/api/internal/evaluate). This eliminates the need to manage separate Cloudflare Worker infrastructure.
The Evaluator executes the following critical background tasks every 1 minute:
- Agent Offline Detection: Checks
offline_deadline_atand creates open incidents when agents pass their deadline. - Agent Recovery Detection: Automatically resolves open incidents when agents recover online.
- Cloud Monitors Evaluation: Evaluates HTTP, SSL/TLS, and Keyword endpoints in parallel.
- Automated Retention Cleanup: Purges aged records (
metric_buckets> 7 days,alert_events> 7 days,cloud_check_results> 30 days).
🔒 Evaluator Authentication
The evaluator endpoint is protected using the CRON_SECRET secret key set in your Next.js Hub environment variables. Incoming requests must supply the authorization header:
Authorization: Bearer YOUR_CRON_SECRET🛠️ Cron Job Setup Options
Choose one of the periodic trigger methods below:
cron-job.org (Free)
Setup via cron-job.org
- Create a free account at cron-job.org .
- Create a New Cronjob:
- URL:
https://your-hub.vercel.app/api/internal/evaluate - Execution Schedule: Every 1 minute (
* * * * *) - HTTP Method:
POST
- URL:
- Add a Header under the Advanced section:
- Key:
Authorization - Value:
Bearer YOUR_CRON_SECRET
- Key:
🧪 Verifying the Evaluator
You can verify whether the evaluator is functioning correctly by issuing a manual cURL request:
curl -X POST https://your-hub.vercel.app/api/internal/evaluate \
-H "Authorization: Bearer YOUR_CRON_SECRET"Successful Response (200 OK):
{
"ok": true,
"evaluatedAgents": 5,
"newOfflineCount": 0,
"recoveredCount": 0,
"cloudChecksEvaluated": 3
}If you receive a 401 Unauthorized status, ensure your cURL Authorization header matches the CRON_SECRET environment variable configured on Vercel.