Argavon agent¶
Install the Argavon agent on a Linux host to send its metrics and logs to Argavon.
The agent runs on Linux with systemd only. It is in neuroops-agent/ in
the repository.
Note
The agent routes and the Agents page exist only when the backend runs
the agent edition. With PLATFORM_EDITIONS empty (the default) every
edition is on. If you set PLATFORM_EDITIONS, include agent.
What it collects¶
| What | Details |
|---|---|
| Metrics | CPU, memory, disk, network, load, processes and services, system info |
| Logs | Files listed under log.agent → log.dirs in the config (/var/log/syslog in the packaged config) |
| OTLP proxy | Optional. Listens on 127.0.0.1:4318 for OTLP/HTTP from local apps and forwards it to Argavon' /api/v1/otel/* with an OpenTelemetry source token |
| Diagnostics | Optional. Runs one read-only command (df, uptime, ps aux, tail -n 100 /var/log/…) when the platform asks |
It does not collect packets, VMware, WinRM or cloud APIs.
What Argavon does with the data:
- Metrics are stored and shown on the Agents page. They do not open incidents. Threshold alerts on agent metrics (CPU above 85%, memory above 90%, disk above 90%, 1-minute load above twice the CPU count) are part of the enterprise predictive feature and raise anomaly alerts only with a license that includes it. See Enterprise features.
- Logs are all stored (see Log Explorer). A log line opens or joins an incident only when it matches an error pattern:
| Severity | Patterns (case-insensitive) |
|---|---|
| critical | kernel panic, panic:, fatal error:, out of memory:, killed process, oom-killer, oom_kill |
| high | segfault, core dumped, stack trace, unhandled exception, traceback (most recent, connection refused, connection reset by peer, permission denied, access denied, disk full, no space left on device, authentication failure, failed password |
| medium | timeout, timed out, deadline exceeded, too many open files, resource temporarily unavailable, service failed, failed to start |
Lines from known noisy sources are skipped even if they match: for example
systemd[, apparmor=, session open and close messages, cron, desktop
services, Wi-Fi messages and the agent's own logs.
The service of a log incident is taken from the line:
- the word after
FATAL:,ERROR:,CRITICAL:,WARN:orWARNING:up to the next:(for exampleERROR: payments-api: connection refusedgivespayments-api), - else the syslog process name (
nginx[1234]:givesnginx), exceptkernel,systemd,sshd,cron,sudo,su,loginanddbus, - else the agent's name (the host name).
The incident title looks like [HIGH] payments-api: connection refused to database.
How enrollment works¶
- You create a one-time enrollment token in Argavon. It decides which workspace the agent joins.
- On first start, the agent registers with the token
(
POST /api/v1/agents/register, headerX-Enrollment-Token). - Argavon marks the token used and returns a secret for this agent only.
The agent stores it in
state/agent_secret.json(mode 600). - From then on, every batch is signed with that secret.
A token works for one agent and expires. Each host needs its own token.
1. Create an enrollment token¶
You need the operator or admin role.
In the web app: open Agents (under Observability). If you already have agents, click Add a host. Under Enrollment tokens, fill in Label (optional) and Valid for (hours) (default 24), then click Create token. Copy it at once: it is shown only once.
The token list shows each token as unused, used or expired. You can Revoke an unused token.
With the API:
curl -sS -X POST https://argavon.com.com/api/v1/agents/enrollment-tokens \
-H "Authorization: Bearer $NEUROOPS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"label": "db hosts", "ttl_hours": 24}'
{
"id": "etok_1a2b3c4d5e6f7a8b",
"tenant_id": "…",
"label": "db hosts",
"expires_at": "2026-11-05T09:00:00Z",
"created_by": "…",
"created_at": "2026-11-04T09:00:00Z",
"token": "enroll_…"
}
ttl_hours defaults to 24 and is capped at 720 (30 days). token appears only
in this response.
| Call | What it does |
|---|---|
GET /api/v1/agents/enrollment-tokens |
List tokens (without the token value) |
DELETE /api/v1/agents/enrollment-tokens/{id} |
Revoke a token |
2. Install the agent¶
You need root on the host, systemd, and the neuroops-agent binary. Argavon
does not host the binary: build it with make build in neuroops-agent/, or
take it from a release.
Option A: the install command from the web app¶
The Agents page shows an Install command. After you create a token, the token is filled in:
curl -fsSL https://argavon.com.com/install.sh | sudo NEUROOPS_ENROLLMENT_TOKEN=<token> AGENT_BINARY=./neuroops-agent sh
Run it in the directory that holds the binary. Instead of AGENT_BINARY you
can give a download URL and its checksum:
AGENT_URL=https://… AGENT_SHA256=<hex>.
Other variables the script reads:
| Variable | Default | Meaning |
|---|---|---|
SERVER_URL |
The Argavon address the script was downloaded from | Where the agent sends data |
INSTALL_DIR |
/neuroops/neuroops-agent |
Install directory |
HEALTH_LISTEN |
127.0.0.1 |
Address of the agent's health and /execute server. Set it to the host's IP so the platform can run diagnostics. |
ALLOW_INSECURE |
unset | 1 allows an http:// SERVER_URL or AGENT_URL |
The script copies the binary, writes config/agent.json, creates the
neuroops system user, puts the token in /etc/neuroops/agent.env (mode 600),
installs neuroops-agent.service and starts it.
Warning
The config written by /install.sh has log collection off
("log.agent.enabled": false) and no log files listed. Only metrics are
sent. To collect logs, use option B, or add "log.agent.enabled": true and
a log.agent section with log.dirs (as in
neuroops-agent/config/agent.json) and restart the agent.
Option B: the package¶
Build a package with make package in neuroops-agent/
(dist/neuroops-agent-<version>-linux-<arch>.tar.gz). On the host, as root:
tar xzf neuroops-agent-*.tar.gz && cd neuroops-agent-*/
PLATFORM_URL=https://argavon.com.com \
NEUROOPS_ENROLLMENT_TOKEN=enroll_… \
bash install.sh
Run without the variables and it asks for them. This installer needs
python3, installs the packaged config (with syslog collection on) and the
plugins, and also installs neuroops-upgrader if it is in the package.
For many hosts, scripts/bulk-install.sh <platform_url> <token> with one
token per host.
Where the config is¶
| Path (default install dir) | What |
|---|---|
/neuroops/neuroops-agent/config/agent.json |
Agent config |
/neuroops/neuroops-agent/config/.agent.id |
The agent's ID, created on first start |
/neuroops/neuroops-agent/state/agent_secret.json |
The agent's signing secret (mode 600) |
/etc/neuroops/agent.env |
NEUROOPS_ENROLLMENT_TOKEN, read on first start |
/etc/systemd/system/neuroops-agent.service |
systemd unit |
Keys in agent.json that matter most:
| Section → key | Meaning |
|---|---|
agent → http.forwarder.url |
Argavon base URL (the installer sets it) |
agent → health.listen, health.port |
Health and /execute server (127.0.0.1, 8765; port 0 turns it off) |
agent → metric.agent.enabled, log.agent.enabled |
Turn metrics and logs on or off |
log.agent → log.dirs |
Log files to tail: path, pattern, tag |
trace.agent → otlp.endpoint |
Local OTLP listener (127.0.0.1:4318) |
trace.agent → export.endpoint, export.token |
Where OTLP is forwarded (default <forwarder url>/api/v1/otel) and the OpenTelemetry source token |
See neuroops-agent/README.md for every key and environment variable.
Signed ingest¶
After enrollment the agent sends batches to POST /api/v1/ingest/agent. Each
request carries X-Agent-ID, X-Timestamp, X-Nonce and X-Signature, an
HMAC-SHA256 with the agent's own secret over the method, agent ID, timestamp,
nonce and the SHA-256 of the body. Argavon accepts a timestamp within 5
minutes of its clock and each nonce once, so a captured request cannot be
replayed. Events in a batch that claim another agent's ID are dropped. Keep the
host clock in sync (NTP), or every batch is rejected.
Check it is connected¶
On the host:
systemctl status neuroops-agent
journalctl -u neuroops-agent -f
curl -s http://127.0.0.1:8765/health
In the journal, a good first start logs
HTTP forwarder: agent enrolled with platform (…).
In Argavon, open Agents. The host appears with its IP, OS and version, and a status:
| Status | Meaning |
|---|---|
| Active | Registered and sending data |
| Inactive | Nothing received for 10 minutes (checked every 5 minutes) |
| Stopped | You clicked Stop. The agent keeps running and its last-seen time updates, but Argavon discards its data: no logs, no metrics, no incidents. Click Start to resume. |
An agent marked Inactive becomes Active again as soon as it sends data. A Stopped agent stays stopped until you click Start.
Click a host to see live CPU, memory, disk, load and system details. The page refreshes every 30 seconds.
If it does not work¶
| You see | Fix |
|---|---|
Journal: agent registration returned 401: …registration requires a valid X-Enrollment-Token… |
The token is wrong, already used, expired or revoked. Create a new one, put it in /etc/neuroops/agent.env, restart the agent. |
Journal: agent registration returned 409: …agent id already registered; choose a new agent id |
The agent ID in config/.agent.id belongs to another workspace. Delete that file and restart. |
Batches rejected with 401 X-Timestamp out of acceptable window (±5 min) |
Fix the host clock. |
Batches rejected with 401 agent authentication failed |
The agent is unknown to Argavon (for example it was removed on the Agents page) or its secret does not match. Delete state/agent_secret.json, create a new token, put it in /etc/neuroops/agent.env, restart. |
Installer: run as root (sudo): the agent is installed as a system service |
Run with sudo. |
Installer: systemd is required / the agent supports Linux only |
The agent supports Linux with systemd only. |
Installer: SERVER_URL is http://; use https or set ALLOW_INSECURE=1 |
Use HTTPS, or set ALLOW_INSECURE=1 for a lab. |
Installer: SHA-256 mismatch: got … |
AGENT_SHA256 does not match the downloaded file. |
| Host is on the page but no log incidents | Logs are off (see the warning under option A), or no line matched an error pattern. Check Log Explorer. |
| The Agents page is missing | The backend runs without the agent edition, or you are a viewer (the page needs operator). |
Agent event format¶
For reference, one log event in a batch looks like this:
{
"event.type": "log",
"event.source": "10.0.0.5",
"event.category": "error",
"log.source": "/var/log/syslog",
"log.tag": "syslog",
"log.message": "ERROR: payments-api: connection refused to database",
"agent.id": "uuid",
"object.ip": "10.0.0.5",
"timestamp": 1712345678
}
event.type is metric, log or trace. Events from an agent that is not
registered are dropped.