Host agents: reference and what was tested

Endpoints

Port Path Needs Purpose
4318 POST /v1/metrics client certificate OTLP/HTTP, JSON body (Content-Type: application/json, optional Content-Encoding: gzip)
4318 POST /telegraf client certificate Telegraf JSON format (also for your own sender)
4318 POST /renew client certificate body: a PEM certificate request; answer: a new certificate
4319 POST /enrol Authorization: Bearer <token>, window open body: a PEM certificate request; answer: the certificate and the CA certificate

Answers: 200, 400 unusable body, 403 unknown/revoked, 404, 405, 413 too large, 415 wrong format, 429 too many requests, 503 switched off.

What is used from the OpenTelemetry metrics

OpenTelemetry metric (attributes) Becomes
system.cpu.time (state, cpu) — two requests are compared cpu_pct (or system.cpu.utilization with state=idle)
system.cpu.load_average.1m load1
system.memory.usage (state: used, free, cached …) mem_pct (used ÷ everything)
system.paging.usage (state: used, free) swap_pct
system.filesystem.usage (mountpoint, type, state: used, free) disk_pct, disk_free_b per mount point; virtual file systems (tmpfs, overlay, /proc …) are skipped
system.network.io (device, direction) — two requests are compared net_rx_bps, net_tx_bps per interface (loopback, docker, veth and similar skipped)
system.uptime uptime_s

The JSON format for your own sender

The format Telegraf produces; any script can send it. One object, a list, or {"metrics": [...]}; timestamp in seconds.

{"metrics": [
  {"name": "cpu",    "tags": {"cpu": "cpu-total"}, "fields": {"usage_idle": 87.5},                   "timestamp": 1790000000},
  {"name": "mem",    "tags": {},                   "fields": {"used_percent": 41.2},                 "timestamp": 1790000000},
  {"name": "swap",   "tags": {},                   "fields": {"total": 1073741824, "used_percent": 3},"timestamp": 1790000000},
  {"name": "disk",   "tags": {"path": "/", "fstype": "xfs"}, "fields": {"used_percent": 61.0, "free": 52000000000}, "timestamp": 1790000000},
  {"name": "net",    "tags": {"interface": "eth0"}, "fields": {"bytes_recv": 123456789, "bytes_sent": 98765432}, "timestamp": 1790000000},
  {"name": "system", "tags": {},                   "fields": {"load1": 0.42, "uptime": 86400},      "timestamp": 1790000000}
]}

net counters grow; Netlens turns them into a rate from two requests. Mount points and interface names: letters, digits and _ . : / \ @ + ( ) [ ] - and spaces, up to 40 characters.

Limits

Limit Value
Request size 1 MiB (also after decompression)
Data points per request 2000 (more is refused with 413)
Hosts (resources) per request 200
Disks per host 80; interfaces per host 64
Request rate per agent burst 10, then one every 5 seconds
Connections 4 per agent, 64 in all; idle connections close after 60 s; 200 requests per connection
Timestamps not older than 24 hours, not more than 5 minutes ahead
Token 24 hours, once; certificate 30 days; renewal overlap up to 7 days, once per hour
Enrolment window 5 to 240 minutes
Silence no data for 3× the sending interval (at least 3 minutes); an agent that has never sent anything is reported after an hour

Settings API (administrators, local network)

GET/PUT /api/ingest, POST/DELETE /api/ingest/window, GET /api/ingest/ca.pem, POST /api/ingest/ca/rotate|finish|cancel, PUT /api/ingest/own-ca, PUT /api/ingest/server-certificate, POST /api/ingest/agents, PUT/DELETE /api/ingest/agents/{id}, POST /api/ingest/agents/{id}/token|revoke|reinstate. Read-only for everyone who may view: GET /api/agent-status. An AI assistant token cannot use /api/ingest.

What was tested

  • Automatically (every release): enrolment (one-time token, expiry, generic refusal, weak key, rate limit, closed window), mutual TLS (no certificate, foreign CA, unknown certificate, revoked on an open connection, re-enrolment), the limits (size, gzip bomb, nesting, points, content type), identity (host name in the data ignored, gateway mapping), your own CA (identity matching, refused leaf and expired CAs), renewal and overlap, CA rotation from start to finish (with the real renewal script and a forced finish), silence and expiry events, the licence gate, the API, the encrypted CA key, nothing from a sender stored, and a fuzz test of the parsers.
  • With the real software: OpenTelemetry Collector 0.164.0 (as a process and as the Debian package under systemd) and Telegraf 1.40.2 against a running Netlens; enrolment with openssl and curl and with PowerShell 7.4; the RPM installs on Rocky Linux 9 and openSUSE Leap 15.6; the shell sender and both renewal scripts.
  • Not tested here: Windows (the MSI facts were read from the package; the PowerShell scripts ran on PowerShell 7.4 on Linux), AIX, Solaris, HP-UX, FreeBSD, macOS, SELinux enforcing, Kubernetes, and certificates from a real enterprise CA. The documentation says so where it matters.