sync: auto-sync from HOWARD-HOME at 2026-07-04 10:45:23

Author: Howard Enos
Machine: HOWARD-HOME
Timestamp: 2026-07-04 10:45:23
This commit is contained in:
2026-07-04 10:45:49 -07:00
parent a1f0a3e5e8
commit ac05230cd2
5 changed files with 204 additions and 145 deletions

View File

@@ -194,3 +194,15 @@ Built:
- projects/gps-rmm-audit/tools/reassign-staging.py: moves Staging agents to their real client via POST /api/agents/:id/move, matching hostname->Syncro customer business_name->GuruRMM client (main site). Idempotent; --dry supported. Verified runs clean (0 staging agents currently).
Next: Howard adds the one-liner to the Syncro all-machines policy; schedule reassign-staging.py (or fold into the daily GPS-RMM-Progress task). Unmatched agents stay in Staging + flagged.
## Update: Corrected online detection + Staging auto-enroll (WORKS end-to-end)
Howard caught that machines marked "offline 45+ days" were actually online. Two bugs found + fixed:
1. Online field: was reading GuestConnectedCount (always null -> everything looked offline). Correct = ActiveConnections with ProcessType==2 (guest agent connected); recency via GuestInfoUpdateTime.
2. Age metric: needs-list used Syncro last_synced_at (Syncro agent check-in, goes stale when the agent breaks) instead of ScreenConnect reachability.
Built projects/gps-rmm-audit/tools/rebuild-and-push.py: rebuilds needs-screenconnect.md by SC reachability (ONLINE now / active<=14d / stale15-45 / dead) and pushes the generic Staging installer (DARK-STORM-3150, base64 -EncodedCommand via SendCommandToSession) to every ONLINE machine. Ran it: 17 online -> pushed all 17 -> 15 enrolled into Staging within ~2 min. (Counts: online 17, active<=14d 31, stale 4, dead 58.)
reassign-staging.py sorted all 15 to their real clients (Curtis, Mineralogical, IMC, Prairie Schooner, Zeus, Stamback + Ridgetop/Gary Hartman/Robyn Pittman). Surfaced 3 clients I'd wrongly written off as no-footprint (Ridgetop has 3 machines, Gary Hartman 1, Robyn Pittman 1) - onboarded them. Added name normalization to reassign (strip LLC/Inc/Corp/etc.) so Syncro 'Safesite LLC' matches GuruRMM 'Safesite'. Staging now empty (all reassigned).
Proven pipeline: correct-online -> push staging installer -> enroll -> auto-reassign. Ready to repeat as machines come online (or via the Syncro all-machines policy Howard will add).