Skip to content
Statance

Agent

Install the Statance agent on Linux, macOS, Windows, Docker and Kubernetes. What it collects and how it reports.

The Statance agent collects host metrics every 60 seconds and sends them over HTTPS to api.statance.com. On Linux and macOS it is a single bash script that needs only bash and curl; on Windows it is a PowerShell script.

Linux & macOS

curl -fsSL https://statance.com/install.sh | sudo bash -s -- YOUR_API_KEY

The installer:

  • installs the agent to /opt/statance-agent;
  • writes its config to /etc/statance-agent (your API key plus a per-server token generated on the host);
  • creates a statance-agent systemd service on Linux, or a launchd daemon on macOS.

Re-running the installer upgrades the agent in place and keeps the existing server token, so the server keeps its history.

# Status and logs (Linux)
systemctl status statance-agent
journalctl -u statance-agent -f

# Uninstall (Linux)
sudo systemctl disable --now statance-agent
sudo rm -rf /opt/statance-agent /etc/statance-agent /etc/systemd/system/statance-agent.service

Windows

In PowerShell running as Administrator:

iwr -useb https://statance.com/install.ps1 | iex; Install-Statance -Key YOUR_API_KEY

The agent runs as a scheduled task under SYSTEM and starts at boot.

Docker

docker run -d --name statance-agent --restart unless-stopped --pid host --network host -v /proc:/host/proc:ro -v /sys:/host/sys:ro -v /:/host/root:ro -e STATANCE_KEY=YOUR_API_KEY ghcr.io/statance/agent:latest

The read-only host mounts and --pid host let the agent report the host’s metrics and processes rather than its own container’s.

Kubernetes

kubectl create secret generic statance --from-literal=key=YOUR_API_KEY
kubectl apply -f https://statance.com/agent/kubernetes.yaml

This creates a DaemonSet so every node, including nodes added later, reports in.

What is collected

GroupFields
Hosthostname, OS, distribution, release, kernel, architecture, CPU model, cores, total memory, uptime
CPUbusy %, load average (1/5/15), temperature where available
Memorytotal, used, available, swap total and used
Disksmount, filesystem, size and used, per mount
Networkreceived/sent bytes per second per interface
Processestop processes by CPU and memory: pid, name, user, CPU %, memory %

Ingest endpoint

The agent posts one JSON document per minute. You can use the same endpoint to report from custom tooling:

POST /v1/ingest

curl -X POST https://api.statance.com/v1/ingest \
  -H "Authorization: Bearer YOUR_API_KEY" -H "Content-Type: application/json" \
  -d '{
    "token": "unique-per-server-token",
    "version": "1.0.0",
    "host":    { "hostname": "web-1", "os": "linux", "distro": "Ubuntu", "release": "24.04",
                 "kernel": "6.8.0", "arch": "x86_64", "cpuModel": "AMD EPYC", "cores": 4,
                 "totalMemory": 8589934592, "uptime": 86400 },
    "cpu":     { "load": 23.5, "load1": 0.8, "load5": 0.6, "load15": 0.5, "temp": 48 },
    "memory":  { "total": 8589934592, "used": 4294967296, "available": 4294967296,
                 "swapTotal": 0, "swapUsed": 0 },
    "disks":   [{ "mount": "/", "fs": "ext4", "size": 85899345920, "used": 34359738368 }],
    "network": [{ "iface": "eth0", "rx_sec": 12000, "tx_sec": 3400 }],
    "processes": [{ "pid": 1234, "name": "nginx", "user": "www-data", "pcpu": 3.2, "pmem": 1.1 }]
  }'

The first report with a new token registers the server (subject to your plan’s server limit). Sizes are bytes; network rates are bytes per second.

Firewalls and proxies

The agent needs outbound TCP 443 to api.statance.com. To use a proxy, set HTTPS_PROXY in the service environment.

Original Statance agents

Agents installed with the original Node.js installer keep working against the legacy API. To upgrade, re-run the installer above; your server keeps its identity.

Next: Monitors →