17 Commits

Author SHA1 Message Date
4e887ab028 Add native rclone sync monitoring (agent v3.6-sync + sync-monitor engine)
Absorbs the standalone rclone fleet monitor into the RMM, per plan:
- deploy_agent.sh: embedded agent v3.6-sync gains a fail-soft sync-monitor
  module — tails the rclone-synology-sync container's log (docker inspect
  discovery), parses rounds/pairs/skips/transfers, inventories upload dirs,
  POSTs to /api/sync-ingest every 10s. Machines without the container
  report no_container and stay silent. Heartbeat loop untouched.
- central_api_prototype.py: POST /api/sync-ingest (agent-token auth) into
  new sync_* collections; native /api/sync-monitor/* read API (overview,
  alerts, stats, timeseries, per-machine events, delete) with JWT auth;
  NAS verification loop (rclone lsjson, Mongo-shared listings across
  workers) + per-volume NAS health via rclone about (NAS_VOLUMES).
- .env: NAS creds + sync-monitor tuning keys.

Rolled out fleet-wide 2026-08-18 (25 clients on 3.6-sync). Standalone
collector still runs in parallel pending retirement.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-08-18 11:34:29 +05:30
932fa8aa9c agent token fix 2026-08-04 12:48:14 +05:30
3a5dfe233e chore: bump agent to 3.5-net for the right-sized speed probe
The probe changed (4/2 MB once a day instead of 8/4 MB every 6h) after the
fleet was already on 3.4-net, so the version had to move for the rollout to
be trackable — identical version strings with different agent code is the
drift the install banner fix was meant to prevent.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 11:14:23 +05:30
0025a65f3d fix: authenticate installer download, rotate-capable agent token, thermal alerts, vitals history
- deploy_agent.sh download now requires auth in EVERY mode (agent token via
  header/?token=, or a dashboard session). It was gated on strict mode only,
  so in grace mode the served installer published the live fleet token to the
  internet
- accept AGENT_TOKEN_PREVIOUS alongside AGENT_TOKEN so a rotation can roll
  through the fleet; record agent_token_current per node to know when the
  previous token can be dropped
- /api/agent-token (dashboard-auth) so the UI can build the install command
- installer: fall back to the default server URL when an inherited one is
  unreachable (stale Tailscale address stranded a fresh install), and derive
  the version banner from the embedded agent instead of a hardcoded string
- CPU thermal alerts to Rocket.Chat at 85C with hysteresis clearing at 75C
- telemetry_history: 1-minute vitals samples, 7-day TTL (~37 MB fleet-wide),
  plus /api/history and /api/history-bulk for dashboard sparklines
- server watches its own disk (85%) after the 2026-07-23 full-disk outage that
  killed mongod; per-heartbeat telemetry logging now opt-in via VERBOSE_TELEMETRY
- /api/logs returns the newest 25 slim entries per client instead of the full
  history (2.2 MB every 3s was most of the server's egress); gzip middleware
- agent speed probe right-sized to 4/2 MB once a day
- server file listing/delete endpoints, search clearing, WAN IP capture

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-08-04 11:13:42 +05:30
c929176cfa feat: per-site SHIFT path with video search, fix agent token injection, accept cpu_temp
- deploy_agent.sh: agent v3.3-shift — use dashboard-configured SHIFT path for
  file fetch/search (SR/SHIFT sites have no TAKELEAP folder), date fast-path;
  fix installer discarding the injected agent token (sentinel was being
  rewritten by the server's placeholder replace, agents ended up tokenless)
- central_api_prototype.py: replace only the token assignment when serving the
  installer; add cpu_temp to TelemetryPayload (agents already send it, it was
  silently dropped); new endpoints set-shift-path, request-search,
  search-results; heartbeat response now carries shift_path + pending search
- commands.json: restore last_reboot/dummy, add update_diag diagnostic
- CLAUDE.md: document deployment layout, procedures, and gotchas
2026-07-16 17:31:33 +05:30
b9aeedc5ef file transfer 2026-07-16 14:30:36 +05:30
80e1bd8e3a refactor: migrate client heartbeat management to atomic MongoDB operations and a dedicated background loop 2026-06-16 12:40:12 +05:30
9987b3a45a feat: implement HMAC-based JWT authentication and secure API endpoints with dependency injection 2026-06-16 12:18:44 +05:30
9baf93bfef feat: add GPU failure monitoring and Rocket.Chat alerts to client telemetry processing 2026-06-09 18:08:24 +05:30
6e05180e7c Fix duplicate alerts, telemetry UI state, and deploy_agent local URL 2026-06-08 15:36:59 +05:30
647c6ae7f0 feat: add agent deployment documentation and improve disk telemetry filtering in deploy script 2026-06-04 17:16:37 +05:30
06c8f62ee6 feat: add disk label and device identification to telemetry collection script 2026-06-04 16:37:48 +05:30
25e9b5e120 feat: implement async command execution, improve client status tracking, and expand takeleap diagnostic commands. 2026-06-04 15:48:38 +05:30
c4a96adfc1 Optimize directory scan paths for Linux client agents 2026-06-04 11:21:00 +05:30
39febf9aeb feat: introduce automated agent deployment script and environment configurations for centralized management 2026-06-03 18:32:28 +05:30
da1e74751e adding .env file 2026-06-02 15:30:22 +05:30
e66a801f55 Initial commit: Clean RMM Backend 2026-06-02 15:28:02 +05:30