Documentation

One agent, one endpoint, one configuration file. This page is the whole reference.

Agent configuration

/etc/sc-agent.conf — keys are flat, values are unquoted.

KeyDefaultNotes
endpointRequired. Full URL including /api/v1/data.
keyRequired. Sent as X-Agent-Key. Read once at start.
window30sSampling interval. Minimum 10s, maximum 300s.
collectcpu, mem, diskComma separated. Also net, systemd, procs.
hosthostnameOverride when the hostname is not stable across reboots.
proxyenvFalls back to HTTPS_PROXY when unset.
queue20Windows held in memory before the oldest is discarded.

The agent re-reads the file on SIGHUP. Changing window takes effect at the next window boundary, not immediately, so buckets stay aligned across the fleet.

Ingest endpoint

POST /api/v1/data — the only endpoint an agent ever calls.

POST /api/v1/data HTTP/1.1
Host: slatecadence.com
Content-Type: application/json
Content-Encoding: gzip
X-Agent-Key: sk_live_xxxxxxxxxxxxxxxx

{"host":"web-03","window":30,"ts":1789102800,
 "series":[{"k":"cpu.busy","v":0.41},{"k":"mem.used","v":6291456}]}

Bodies may be gzipped; the agent does so above 4 KB. Maximum accepted body is 1 MB decompressed. Batches above that are rejected rather than truncated — lower queue or raise window.

Responses

StatusMeaningAgent behaviour
204Batch accepted.Window dropped from the queue.
207Accepted, some series rejected. Count in X-Rejected.Window dropped; warning logged.
400Body is not valid JSON or fails schema.Window discarded, never retried.
401Missing or unknown agent key.Retry with backoff to 5 min.
413Body over the size limit.Window discarded, warning logged.
429Per-key rate limit. Retry-After is set.Sleeps for Retry-After, keeps the queue.
5xxServer side.Retry with backoff; queue drains oldest first.

Series keys

Fixed vocabulary per collector. Unknown keys are rejected, not stored.

CollectorKeys
cpucpu.busy, cpu.iowait, cpu.steal, cpu.load1
memmem.used, mem.cached, mem.swap, mem.pressure
diskdisk.used, disk.io.r, disk.io.w, disk.await
netnet.rx, net.tx, net.drop, net.retrans
systemdsvc.failed, svc.restarts, svc.p95
procsproc.count, proc.zombie, proc.fds

Troubleshooting

In rough order of how often it turns out to be the cause.

Nothing arrives, no errors

Egress proxy swallowing the POST. Run sc-agent --probe: it performs one synchronous request and prints the full exchange.

Gaps at fixed times

Usually a host suspending. The agent does not backfill across a suspend — the queue is in memory by design.

Repeated 207

A collector emitting a key outside the vocabulary above, normally after a partial upgrade. Check sc-agent --version across the fleet.

Clock skew

Windows whose ts is more than 10 minutes from server time are rejected with 400. Fix NTP before anything else.