Skip to main content
Baton connectors running in service mode can expose HTTP health check endpoints for container orchestrators (ECS Fargate, Kubernetes, etc.) to monitor connector health.
When C1 encounters a 503 from a connector during provisioning, it treats this as a transient error and retries automatically (up to 5 attempts). Errors indicating a configuration problem — such as 401, 403, or 404 — are not retried. If provisioning still fails after retries, the task falls back to a manual path and appears in the Assigned to me area for follow-up. Learn more about automatic account provisioning.

Enabling health checks

Health checks are disabled by default. Enable them using environment variables or CLI flags:
Environment variableCLI flagDefaultDescription
BATON_HEALTH_CHECK--health-checkfalseEnable the health check server
BATON_HEALTH_CHECK_PORT--health-check-port8081Port for the health check server
BATON_HEALTH_CHECK_BIND_ADDRESS--health-check-bind-address127.0.0.1Bind address for the health check server

Health check endpoints

EndpointDescriptionSuccess (HTTP 200)Failure (HTTP 503)
/healthFull health check - calls the connector’s Validate() methodConnector is healthyConnector validation failed
/readyReadiness check - verifies connector client is availableConnector is ready to serve requestsConnector client not available
/liveLiveness check - verifies process is runningAlways returns successN/A

The health-check command

Each connector includes a health-check subcommand for querying the health check server. This is designed for container exec probes, eliminating the need to bundle curl or other HTTP clients in container images.

Usage

# Check health (default endpoint)
baton-myconnector health-check

# Check readiness
baton-myconnector health-check --endpoint=ready

# Check liveness
baton-myconnector health-check --endpoint=live

# Check with custom port
baton-myconnector health-check --health-check-port=9090

Flags

FlagDefaultDescription
--endpointhealthEndpoint to check: health, ready, or live
--timeout5Request timeout in seconds
--health-check-port8081Port to connect to
--health-check-bind-address127.0.0.1Address to connect to

Exit codes

ScenarioExit code
HTTP 200 response0 (success)
HTTP non-200 response1 (failure)
Connection failed1 (failure)
Timeout1 (failure)

Container orchestrator examples

AWS ECS Fargate

{
  "healthCheck": {
    "command": ["CMD", "/baton-myconnector", "health-check"],
    "interval": 30,
    "timeout": 10,
    "retries": 3,
    "startPeriod": 60
  }
}

Kubernetes

livenessProbe:
  exec:
    command: ["/baton-myconnector", "health-check", "--endpoint=live"]
  initialDelaySeconds: 10
  periodSeconds: 5

readinessProbe:
  exec:
    command: ["/baton-myconnector", "health-check", "--endpoint=ready"]
  initialDelaySeconds: 5
  periodSeconds: 3