Skip to content

Private Agents

YOUR NETWORK · firewall / VPC Private agent okstatus-agent intranet API db · 10.0.4.12 checks private targets TLS outbound HTTPS only · no inbound port · no VPN pulls checks → pushes results OKStatus backend.okstatus.eu scheduler · aggregator · alerter Dashboard Status page Alerts Identity: per-agent credentials (or a one-time enrollment token) · Max plan: 5 agents · Enterprise: 20

A private agent runs inside your own infrastructure and monitors services OKStatus can’t reach from the public internet — internal APIs, databases, intranet apps. It pulls its checks from OKStatus over outbound HTTPS only: nothing to expose, no inbound port, no VPN. Available on the Max plan and above (Max: 5 agents, Enterprise: 20).

The Private Agents page with two enrolled agents

Install the Helm chart. There are two ways to give the agent its identity — pick one.

Enroll once to obtain the long-lived credential pair, then run the agent from a Secret — no token to spend, no volume to persist, resilient to any restart or reschedule:

Terminal window
helm install okstatus-agent okstatus/private-agent \
--set credentials.agentId=<agentId> \
--set credentials.agentSecret=<agentSecret>

You get the pair from the Private Agents page: open the agent’s menu (⋮) → Stateless credentials, or pick the Kubernetes (env) tab in the deploy dialog and click Generate credentials. The secret is shown once; generating again replaces it.

For a plain Deployment (no Helm), the equivalent environment variables are OKSTATUS_AGENT_ID, OKSTATUS_AGENT_SECRET, OKSTATUS_AGENT_NAME and AGGREGATOR_URL=https://backend.okstatus.eu.

The agent exchanges the token on first boot and persists the result in a small PVC (required — without it a restart needs a new token):

Terminal window
helm install okstatus-agent okstatus/private-agent \
--set token=oksa_live_xxxxxxxx

The token comes from the Private Agents page and is single-use.

A private agent’s credentials are a single identity. Run exactly one pod per credential:

  • The chart ships replicas: 1 and strategy: Recreate on purpose — never RollingUpdate (its surge would briefly run two pods and double this agent’s heartbeats and checks).
  • The server enforces it too. If a second instance starts with the same credentials, the backend’s single-instance lease rejects it with 409 and that pod exits, logging “another instance of this agent is already running”. So scaling replicas up, or applying a second Deployment with the same credentials, does not give you more throughput — the extras just exit.

On a graceful restart the departing pod releases its lease, so a replacement takes over immediately; after a hard kill a replacement takes over within ~2–3 minutes.

  • Stateless (credentials) mode needs no persistent volume — the pod loads its identity from the Secret every boot and never re-enrolls.
  • Token mode needs persistence.enabled (a PVC) so the credential the agent enrolls for survives restarts; without it, a restart requires a rotated token.
SymptomCause / fix
enrollment token rejected — already used or revokedThe single-use token was already spent (or you’re in token mode without a PVC, so it re-enrolls each boot). Rotate the token and upgrade, or switch to stateless credentials.
CrashLoopBackOff right after deployAlmost always the token above, or credentials Secret keys named wrong (must be agentId / agentSecret).
409 / “another instance is already running”Two pods share one credential. Keep replicas: 1; deploy a separate agent for more capacity.
Agent never appears on the dashboardCheck outbound HTTPS egress to backend.okstatus.eu, and kubectl logs on the pod.
401 INVALID_AGENT_ID, or the agent exits at boot complaining about the idOKSTATUS_AGENT_ID holds the agent’s name — it must be its UUID (agent menu → Stateless credentials).
401 UNAUTHORIZED in stateless mode, or the agent exits complaining about the secretOKSTATUS_AGENT_SECRET holds the oksa_live_… enrollment token — it must be the oksas_… secret. Generate one from the agent menu.