# Argus Agent Module

Python agent that registers with the Argus master service, persists node information, gathers host metadata, reads module health files, and periodically reports status.

## Build & Run

```bash
cd src/agent
./scripts/build_images.sh          # builds argus-agent:dev
```

Runtime expects a configuration file (generated by installer) at `/private/argus/agent/<hostname>/config`. Key fields:

- `HOSTNAME`, `NODE_FILE`, `VERSION`
- `MASTER_ENDPOINT` (e.g. `http://master:3000`)
- `REPORT_INTERVAL_SECONDS`
- `SUBMODULE_HEALTH_FILE_DIR` (supports `{hostname}` placeholder)
- optional `GPU_NUMBER`

Health files live under `/private/argus/agent/health/<hostname>/` and must follow `<prefix>-*.json` naming (e.g. `log-fluentbit.json`). The agent sends parsed JSON objects keyed by file stem.

## Tests

Docker-based E2E stack (master + agent):

```bash
cd src/agent/tests
./scripts/00_e2e_test.sh
```

The scripts provision configs/health directories under `tests/private/` and clean up via `07_down.sh`.
