Files
rmm-backend/.env
Kaushik 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

29 lines
1.1 KiB
Bash

ROCKETCHAT_WEBHOOK_URL="https://text.seekright.com/hooks/6a0eb41ea88367bc6e101f0c/gvXfD8zSNRti43kEabqdE9tMCvNi9zAAoGfbao7cxcKbiW6R"
MONGODB_URI="mongodb://localhost:27017"
MONGODB_DB="rmm_db"
# --- Authentication (added 2026-07-16) ---
# Shared secret every agent must present in the X-Agent-Token header.
AGENT_TOKEN=Y508_Lq1Ow8sTfQrQQ-r9lbX0KS9_wxl5CKK085Dj0I
# Signing key for dashboard login tokens.
JWT_SECRET_KEY="Gme4fl7mCxTQv9b7H7iahacoEG6j5R4Av7kLAPQpzgVzHjINNScKIDWZ_tJsf93a"
# Dashboard login. CHANGE THESE, then restart the backend.
DASHBOARD_USERNAME="root"
DASHBOARD_PASSWORD="seekright159@"
# --- rclone sync-monitor proxy (added 2026-08-17) ---
# Collector on this same VM; viewer creds are its READ-ONLY login.
SYNC_MONITOR_URL=http://127.0.0.1:4400
SYNC_MONITOR_USER=admin
SYNC_MONITOR_PASS=HjiYnDgkbclVPfI102CU
# --- NAS (Synology) for sync verification + health panel (Phase 2) ---
REAL_SYNOLOGY_HOST=takeleap.in
REAL_SYNOLOGY_PORT=26
REAL_SYNOLOGY_USER=sr-upload
REAL_SYNOLOGY_PASS=T@keleap@123
SYNC_VERIFY_INTERVAL=300
SYNC_MISSING_GRACE_S=600
NAS_MIN_FREE_PCT=10
NAS_VOLUMES=ClientSync,Saudi_Video_Sync