Skip to main content
POST
/
metrics
/
ingest
curl -X POST "https://kodostatus.com/api/metrics/ingest" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": "svc_abc123",
    "metrics": {
      "error_rate": 2.5,
      "response_time_ms": 245,
      "request_count": 10000,
      "error_count": 250
    }
  }'
{
  "success": true,
  "metrics_received": {
    "error_rate": 2.5,
    "response_time_ms": 245,
    "request_count": 10000
  },
  "status_change": {
    "previous": "operational",
    "current": "degraded",
    "reason": "Error rate exceeded 1% threshold"
  },
  "incident_created": null
}
Kodo can automatically determine service health based on metrics you push. When error rates or response times exceed thresholds, Kodo updates your service status and optionally creates incidents.

Request Body

service_id
string
required
The service to associate metrics with
metrics
object
required
Metric values to report
timestamp
string
ISO 8601 timestamp for the metrics. Defaults to current time.

Response

Returns confirmation and any status changes triggered.
curl -X POST "https://kodostatus.com/api/metrics/ingest" \
  -H "X-API-Key: your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "service_id": "svc_abc123",
    "metrics": {
      "error_rate": 2.5,
      "response_time_ms": 245,
      "request_count": 10000,
      "error_count": 250
    }
  }'
{
  "success": true,
  "metrics_received": {
    "error_rate": 2.5,
    "response_time_ms": 245,
    "request_count": 10000
  },
  "status_change": {
    "previous": "operational",
    "current": "degraded",
    "reason": "Error rate exceeded 1% threshold"
  },
  "incident_created": null
}

Default Thresholds

MetricDegradedPartial OutageMajor Outage
Error Rate> 1%> 10%> 50%
Response Time (ms)> 1000ms> 3000ms> 10000ms
CPU Percent> 70%> 85%> 95%
Memory Percent> 70%> 85%> 95%
Configure custom thresholds in your Dashboard under Service Settings → Auto-Status Thresholds.