Skip to content

Collector

Health checks, metrics and logs

Release: v0.1.0 (latest)

The collector gives you three ways to see what it is doing. /healthz says whether it is up, /metrics counts what it did with each payload, and the log says what went wrong. /healthz and /metrics need no agent token and have no per-client rate limit, so a probe or a scraper inside your network works with the defaults.

Check health

GET /healthz answers 200 with an empty body once the collector is listening. It checks nothing else. It does not test the forward URL or the backend, so a collector that cannot reach the backend still reports healthy. Watch the forwarding counters for that.

The image has no shell and no curl, so it carries a healthcheck subcommand:

docker exec <container> /otherlode-collector healthcheck

The subcommand makes one GET of /healthz on the address the collector listens on, which is OTHERLODE_COLLECTOR_ADDR (default :4319). It rewrites the host so the probe stays inside the container:

OTHERLODE_COLLECTOR_ADDRAddress probed
Unset, or :4319127.0.0.1:4319
0.0.0.0:4319 or [::]:4319127.0.0.1:4319
10.0.0.5:431910.0.0.5:4319
:http-alt127.0.0.1 on the port that name resolves to, as the listener resolves it

The probe gives up after 2 seconds. It never uses a proxy, so HTTPS_PROXY, HTTP_PROXY and NO_PROXY do not affect it. It prints the error to standard error when it fails.

Exit codeMeaning
0/healthz answered 200
1The address is invalid, the request failed or timed out, or the status was not 200
2You passed any argument list other than healthcheck alone. The collector prints a usage line and does not start

The image runs the subcommand as its HEALTHCHECK:

SettingValue
Interval10 seconds
Timeout3 seconds
Start period10 seconds
Retries3

Docker marks the container unhealthy after three failed probes in a row. If the probe fails, see troubleshooting.

Read the metrics

GET /metrics serves the counters in the Prometheus text format, with the content type text/plain; version=0.0.4; charset=utf-8. The output holds only counts. It carries no service names, instance IDs, literals or payload content.

Every metric is a counter. The counters live in memory and start again at 0 when the collector restarts, so use increase() or rate() rather than the raw value. A counter without labels shows at 0 from startup. A counter with labels adds a series the first time that label combination happens, so a missing series means that label combination has not happened. The one exception is the token reload counter, which shows each token file you configured at 0.

The payload label takes one of four values, named for the path the agent posted to:

payloadAgent path
deltas/v1/otherlode/deltas
manifest/v1/otherlode/manifest
static_baseline/v1/otherlode/static-baseline
class_listing/v1/otherlode/class-listing

One request carries one payload.

Ingest counters

CounterLabelsGoes up when
otherlode_collector_ingest_accepted_totalpayloadThe collector answered 202. The payload decoded, passed validation and the sink took it. With forwarding on, Otherlode had stored it
otherlode_collector_ingest_rejected_totalpayload, reasonThe collector turned a request away after the token and rate limit checks. See the reasons below
otherlode_collector_auth_rejected_totalnoneA request to an ingest path got 401 for a missing or wrong bearer token
otherlode_collector_rate_limited_totalnoneA request to an ingest path got 429 because its client IP was over the limit

The reason label on ingest_rejected_total takes these values:

reasonAnswerCause
content_type415The Content-Type is not application/x-protobuf, or a Content-Encoding other than identity is set
too_large413The body is over 16 MiB
read400The collector could not read the body
too_many_elements413The payload holds more elements than the limit for its kind
malformed400The body is not valid protobuf
invalid400The body decoded but failed validation
sink503, 429 or another 4xxOtherlode did not store the payload, so the collector did not answer 202. It answers 429 or another 4xx when Otherlode answered with one, and 503 with Retry-After: 5 for every other failure. forward_failed_total has the cause
busy503No decode slot came free within 1 second. The response carries Retry-After: 1
canceled503The client disconnected while it waited for a decode slot
timeout503The request used its 9-second budget before decoding started, usually because the body arrived slowly. The response carries Retry-After: 1

A 401 from the agent token check or a 429 from the rate limit never reaches the ingest counters. They count in auth_rejected_total and rate_limited_total only. For the limits behind too_large, too_many_elements, busy and rate_limited_total, see rate and memory limits.

Forwarding counters

These have no series when OTHERLODE_COLLECTOR_FORWARD_URL is not set.

CounterLabelsGoes up when
otherlode_collector_forward_delivered_totalpayloadOtherlode answered a payload 202, and the collector answered the agent 202
otherlode_collector_forward_failed_totalpayload, reasonOtherlode did not store a payload, so the collector did not answer 202. The agent keeps the payload and sends it again. See the reasons below
otherlode_collector_forward_notices_totalnoticeOtherlode answered a payload 202 with an Otherlode-Notice header. It adds one for each header value

Each failure also adds one to ingest_rejected_total with reason="sink".

The reason label on forward_failed_total takes these values:

reasonAnswer to the agentCause
rate_limited429, with Otherlode’s Retry-AfterOtherlode answered 429
rejectedOtherlode’s statusOtherlode answered another 4xx, such as 401, 403 or 413
server_error503Otherlode answered with any other status that is not 2xx, including 5xx and every 3xx. The collector does not follow redirects
timeout503Otherlode did not answer within OTHERLODE_COLLECTOR_FORWARD_REQUEST_TIMEOUT
transport503The connection failed, so there was no answer
unexpected_status503Otherlode answered a 2xx other than 202. This comes from a wrong forward URL or a proxy
busy503OTHERLODE_COLLECTOR_MAX_CONCURRENT_FORWARDS forwards were already in flight, and none finished in time
canceled503The agent’s request ended, or the shutdown deadline passed, before Otherlode answered
shutting_down503The collector had begun to shut down
marshal400The collector could not encode the payload to forward it
request503The collector could not build the request to Otherlode

A 503 carries Retry-After: 5. The notice label on forward_notices_total is service-over-cap, environment-not-tracked or unknown. unknown stands for every other value, so a backend cannot add series. A notice does not mean a payload was lost, since Otherlode stored it. service-over-cap and environment-not-tracked mean Otherlode does not track the service or the environment. The collector does not know what an unknown notice means. See Otherlode stores a payload but does not track it.

The agent still holds a failed payload. It keeps its counts and sends them again on its next flush. Forwarding covers the attempt, the time limits and shutdown.

Token counter

CounterLabelsGoes up when
otherlode_collector_token_reload_failures_totalfileA re-read of a token file failed or found no usable token. The collector re-reads each token file every 30 seconds and keeps the last good value

file is auth for OTHERLODE_COLLECTOR_AUTH_TOKEN_FILE and forward for OTHERLODE_COLLECTOR_FORWARD_AUTH_TOKEN_FILE. The forward series exists only when OTHERLODE_COLLECTOR_FORWARD_AUTH_TOKEN_FILE is set. See set and rotate tokens.

Stamping and redaction counters

CounterLabelsGoes up when
otherlode_collector_environment_mismatch_totalpayloadThe agent set an environment that differs from OTHERLODE_COLLECTOR_ENVIRONMENT
otherlode_collector_namespace_mismatch_totalpayloadThe agent set a service namespace that differs from OTHERLODE_COLLECTOR_SERVICE_NAMESPACE
otherlode_collector_redacted_literals_totalpayloadBlanking replaced string literal parts. It adds the number replaced, so one payload can add many. payload is manifest or static_baseline
otherlode_collector_redacted_case_keys_totalpayloadBlanking cleared case keys that are a string’s hash code. It adds the number cleared. payload is manifest or static_baseline
otherlode_collector_fields_stripped_totalpayloadBlanking dropped a field it does not know and marked the payload fields_stripped

The mismatch counters go up whether the action is insert or upsert. An agent value that is empty or only spaces is not a mismatch. See set the environment and namespace and blank out string literals.

Choose what to alert on

  • forward_failed_total. A rise means Otherlode is not storing payloads, and the reason says why. server_error, timeout and transport mean Otherlode is down, slow or unreachable. rejected and unexpected_status mean the forward URL, the forward key, the blanking settings or the redaction secret are wrong, and no retry fixes them. busy means forwards queue behind the forward limit. Nothing is lost while the agents keep running and keep sending, but a service reads as behind until its payloads arrive. Alert on a rate that stays above zero for several minutes, since one failure during a deploy of Otherlode is normal.
  • forward_delivered_total. A rate of zero while agents are running means no payload reaches Otherlode.
  • forward_notices_total. A rise in service-over-cap or environment-not-tracked means Otherlode stores payloads it does not track. Nothing is lost, but the service or environment gets no findings. Alert on it if you want to hear before a team asks why a service shows none.
  • token_reload_failures_total. Alert on any increase. A token file is broken and the collector still uses the tokens it last read.
  • fields_stripped_total. Alert on any increase. Your collector is older than your agents. Run the latest collector, as troubleshooting describes.

A rise in auth_rejected_total or rate_limited_total means a client is sending the wrong token or too many requests. Whether that matters depends on your fleet, so the collector gives no fixed threshold.

Read the logs

The collector writes one JSON object per line to standard output. Each line has time, level and msg, plus the fields that belong to the event. It never logs a string literal from your code or a token. Its info lines for received payloads name the service and instance and give counts.

{"time":"2026-10-10T09:12:44.381Z","level":"INFO","msg":"otherlode-collector listening","addr":":4319","version":"0.1.0"}

Set the level with OTHERLODE_COLLECTOR_LOG_LEVEL.

ValueEffect
Unsetinfo
debugLogs every line, including DEBUG
infoLogs INFO, WARN and ERROR
warnLogs WARN and ERROR
errorLogs ERROR only

The names are not case sensitive. A name can take a signed offset, such as warn+1 or info-2, to set a threshold between two named levels, which sit 4 apart. An empty value counts as unset. Any other value stops startup with a line like this:

{"time":"2026-10-10T09:12:44.381Z","level":"ERROR","msg":"OTHERLODE_COLLECTOR_LOG_LEVEL: slog: level string \"trace\": unknown name"}

Without OTHERLODE_COLLECTOR_FORWARD_URL, the collector logs every payload it receives at info. On a busy collector, set warn to quiet it.

Lines you may see at the default level

LevelmsgWhen
WARNOTHERLODE_COLLECTOR_FORWARD_URL not set; ingest payloads are only logged, not forwardedAt startup, with no forward URL
WARNOTHERLODE_COLLECTOR_AUTH_TOKEN and OTHERLODE_COLLECTOR_AUTH_TOKEN_FILE not set; ingest endpoints are unauthenticatedAt startup, with no agent token
WARNrate limiting disabled; ingest endpoints accept requests unthrottledAt startup, when the rate limit is 0
WARNforward URL uses plain http; the backend auth token is sent unencryptedAt startup, with an http:// forward URL and a forward key
WARNrejecting invalid delta batch, rejecting invalid manifest, rejecting invalid static baseline or rejecting invalid class listingA payload failed validation, with the reason in error
WARNrejecting malformed delta batch, rejecting malformed manifest, rejecting malformed static baseline or rejecting malformed class listingA body was not valid protobuf
WARNtoken file re-read failed; keeping the last good valueA token file re-read failed, with file and error
WARNsink refused delta batch, or the same with manifest, static baseline or class listingOtherlode answered a 4xx, and the collector answered the agent with that status. The line has the error, the status, unlogged_sink_refusals and, when Otherlode’s response names an error code, backend_error. At most one line a minute for each payload type, status and cause
WARNbackend stores the service's payloads but does not track the service, ..., backend stores the environment's payloads but does not track the environment, ... or backend sent a notice this collector does not knowOtherlode accepted a payload and sent a notice with it. The line has the notice, namespace and service. At most one line an hour for each notice, namespace and service, while the collector remembers fewer than 10,000 of them
WARNdropped fields this collector does not know; ...Blanking dropped unknown fields. The collector logs this line once per run
WARNrefusing delta batch with too many elements, or the same with manifest, static baseline or class listingA payload held more elements than the limit for its kind and got 413. The line has the limit and the body size in bytes
WARNrefusing delta batch: no decode slot came free, or the same with manifest, static baseline or class listingA request waited 1 second for a decode slot and got 503. At most one line a minute. unlogged_busy_refusals counts the refusals since the previous line that got no line of their own
WARNrefusing delta batch: the request used its time budget before decoding started, or the same with manifest, static baseline or class listingThe body took the whole request budget to arrive and the request got 503. The line has the budget. At most one line a minute. unlogged_timeout_refusals counts the refusals since the previous line
WARNagent environment does not match the collector's configured environmentThe first payload of a service that names a given environment other than the collector’s. Later payloads of that service with that environment log at DEBUG
WARNagent namespace does not match the collector's configured namespaceThe same, for the service namespace
ERRORsink rejected delta batch, sink rejected manifest, sink rejected static baseline or sink rejected class listingThe collector answered 503 because Otherlode did not store the payload. The line has the error, the reason (a value of forward_failed_total) and unlogged_sink_failures. At most one line a minute for each payload type and reason, while the counter counts every failure
ERRORbackend answered 2xx other than 202, so the payload is not counted as stored; check OTHERLODE_COLLECTOR_FORWARD_URLOtherlode, or something in front of it, answered a 2xx other than 202. The line has the status, path and owner. At most one line a minute for each status
ERROROTHERLODE_COLLECTOR_ADDR: listen tcp ...The collector could not open its listen address at startup, and the process exits
ERRORserver stopped or graceful shutdown failedThe server stopped with an error after it started, or shutdown did not finish, and the process exits

At info the collector also logs startup, shutdown, the stamping and redaction settings it applied, and the token file events token file changed and token file re-read recovered. The token file line gives a count of tokens, never a token. The redaction line gives the secret’s fingerprint as secret_fingerprint, never the secret.

Startup errors name the setting and the invalid value. Troubleshooting gives the cause and the fix for each line above.

  • Configuration lists OTHERLODE_COLLECTOR_ADDR and OTHERLODE_COLLECTOR_LOG_LEVEL.
  • Forwarding explains the attempt, the time limits and the shutdown behind the forwarding counters.
  • Troubleshooting covers the failing health check and each log line.