Monitoring API
REST-like, read-only, JSON over HTTPS. All timestamps are UTC ISO-8601
(YYYY-MM-DDTHH:MM:SSZ). Periods: 1h, 24h, 7d,
30d, 90d, 365d. CORS is enabled so browser clients can consume it.
Endpoints
| Method | Path | Purpose |
GET |
/api/v1
|
Endpoint index, supported periods and the status vocabulary. |
GET |
/api/v1/health
|
Health of the monitoring service itself (is the collector running?). |
GET |
/api/v1/status
|
Current status of every monitored service, plus the rolled-up node status. |
GET |
/api/v1/services
|
Service catalogue with the monitoring parameters in use. |
GET |
/api/v1/services/{service_id} |
One service: definition, current status, metrics and daily series. |
GET |
/api/v1/metrics?period=30d
|
Availability, reliability and uptime per service (add &service=ID, &daily=0). |
GET |
/api/v1/checks?service=ID&limit=200
|
Raw probe results behind the metrics. |
GET |
/api/v1/events?limit=100
|
Status transitions (OK → CRITICAL …). |
GET |
/api/v1/federation/export?period=30d
|
Full structured document for EOSC federation harvesting. |
POST |
/api/v1/collector/run |
Trigger a collection run. Requires a write token or an admin session. |
Status vocabulary
| OK | Service answered as expected. |
| WARNING | Reachable but degraded: slow response, or a TLS certificate close to expiry. |
| CRITICAL | Down or failing its health assertion. |
| DOWNTIME | Failing inside a declared maintenance window. |
| UNKNOWN | No usable measurement (collector gap or stale data). |
| MISSING | Service defined but never probed. |
How the metrics are computed
Each check result is time-weighted until the next check, capped at twice the configured interval;
uncovered time is UNKNOWN and is excluded from the ratios rather than being assumed up or down.
availability = uptime / (uptime + downtime)
reliability = uptime / (uptime + downtime - scheduled_downtime)
uptime_ratio = uptime / wall_clock_period
OK and WARNING count as uptime. The full collector source lives in
src/Probe.php, src/Collector.php and src/Metrics.php –
see docs/METRICS.md.
Example
curl -s https://mon.eosc.sk/api/v1/federation/export?period=30d | jq '.summary'
curl -s https://mon.eosc.sk/api/v1/status | jq '.services[] | {service_id, status}'