Commit Graph

13 Commits

Author SHA1 Message Date
myron 1f25b5d04d Fix facts_collector JARVIS site URL (was :1972 DO port, now correct URL)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 18:13:12 -05:00
myron 04510ac39f fix: update facts_collector for JARVIS VM (not DO web host)
- Site checks use external URLs instead of 127.0.0.1 loopback (JARVIS
  no longer shares a server with the websites)
- JARVIS site URL updated to port 1972
- Fixed syntax error in DO server ping exec call
- Removed Host header injection (not needed for external checks)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 03:53:44 +00:00
myron 38ab8d2977 migrate: update all references from DO server to PVE1 JARVIS VM
- config.php: JARVIS_IP → 10.48.200.211, HA_URL → direct LAN 10.48.200.97
- facts_collector/stats_cache: Proxmox API → direct 10.48.200.90 (not DDNS)
- chat.php: system context updated to reflect PVE1/nginx instead of DO/OLS
- do_server.php: display IP → 10.48.200.211 (reads /proc for JARVIS VM stats)
- jarvis-app.js: service labels nginx/mariadb instead of lshttpd
- jarvis-overlays.js: network map JARVIS node IP → 10.48.200.211
- index.html: DO SERVER labels → JARVIS VM, cache bust v=20260618a
- jarvis-agents.js: agent install URL uses window.location.origin

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-18 02:25:36 +00:00
myron ca66152f45 perf: fix facts_collector blocking cron that was saturating PHP workers
Three issues caused periodic worker saturation:
1. Network section pinged 5 private LAN IPs (10.48.200.x) unreachable
   from DO — each failed after 1s timeout = 5s wasted per run.
   Replaced with a fast DB query on registered_agents.
2. pve_api_get() had no CURLOPT_CONNECTTIMEOUT — added 3s limit so
   unreachable Proxmox fails fast instead of blocking the full 8s.
3. Ollama curl timeout reduced from 5s→3s total, added 2s connect limit.

Cron interpreter also changed from lsphp85 to php8.3 in crontab
(done directly on server) — lsphp85 adds ~8s LSAPI startup overhead
and consumes a PHP worker slot; php8.3 runs standalone.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 19:40:13 +00:00
myron 1e57a7c90c fix: check sites locally to avoid Cloudflare CDN timeouts
facts_collector was checking https://jarvis.orbishosting.com from the
DO server itself — traffic routes through Cloudflare CDN which can
return 524 timeouts. All sites are hosted on this same OLS instance,
so check via http://127.0.0.1 with a Host header instead. This gives
direct OLS response without CDN overhead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 14:30:40 +00:00
myron 2f57908a50 fix: storeFact always bumps updated_at; fix $fresh() wrong column name
ON DUPLICATE KEY UPDATE was not touching updated_at, so if a site's
status didn't change MySQL never fired the ON UPDATE trigger and the
row timestamp stayed 6 days stale. do_server.php's 15-min freshness
window then returned empty sites.

Also fixes $fresh() querying WHERE fact_category= (non-existent column)
instead of WHERE category=, which always returned no rows.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-17 14:24:17 +00:00
myron b19e8e1b25 Phase 2: facts_collector TTL guards — reduce external polling
- Proxmox: skip if data < 10 min old (was: every 3 min unconditionally)
- Ollama: skip if data < 15 min old (model list rarely changes)
- Site health: skip if data < 5 min old (was: 7 HTTP calls every 3 min)
- Home Assistant: removed entirely (HA agent pushes 212 entities every 30s)

Fast local reads (CPU/mem/network pings) still run every 3 min. External
HTTP calls now fire only when data is actually stale. Saves ~140 site-check
HTTP calls/hour and ~60 Proxmox API calls/hour in steady state.
2026-06-11 21:37:26 +00:00
myron 27eb012005 Update Parker Slingshot monitoring URL to parkerslingshotrentals.com
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-09 22:50:44 +00:00
myron 21af9a08e0 Fix Proxmox API: use DDNS hostname (port 8006 forwarded via FortiGate) 2026-05-30 03:35:07 +00:00
myron 62c7878615 Add netscan push endpoint: PVE1 nmap scan every 3min populates network devices 2026-05-30 03:20:06 +00:00
myron 2faeb5498a Auto-populate network devices via nmap scan from PVE1 every 3min 2026-05-30 03:11:14 +00:00
myron 45fef11785 Autonomous systems: watchdog, smart deploy, site health, auto-heal, agent installer
- deploy/jarvis-watchdog.sh: self-healing watchdog (every 5 min)
  * monitors lsws/mysql/redis, restarts on failure
  * JARVIS HTTP self-check, restarts OLS on 5xx
  * disk/memory alerts inserted to DB
  * offline Proxmox VM agents restarted via qm guest exec
  * log rotation (1000 line cap)
- deploy/jarvis-deploy.sh: smart deploy with PHP validation
  * php8.3 syntax check on every changed .php file
  * auto-reverts git commit + inserts critical alert on syntax error
  * reloads OLS after JARVIS deploys
- api/endpoints/facts_collector.php: site health monitoring
  * curls all 7 managed sites every 3 min
  * stores up/down status in kb_facts
- api/endpoints/alerts.php: auto-heal + site alerts
  * dispatches restart_service commands when services down on agents
  * generates alerts from kb_facts site health data
- public_html/install-agent.sh: one-liner Linux agent installer
  * installs deps, downloads agent, registers with JARVIS, sets up systemd
- public_html/webhook.php: fixed infra deploy path to /opt/infra
2026-05-25 14:08:07 +00:00
myron dc55e6c45b Initial commit: JARVIS AI dashboard v2.3
- 4-tier chat: HA control → Ollama → Groq → Claude
- Push-based agent system with heartbeat/metrics
- Network monitoring, alerts, Proxmox, Home Assistant
- Windows + Linux agent installers
- Stats cache cron, facts collector, KB engine
2026-05-25 13:22:57 +00:00