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>
This commit is contained in:
2026-06-18 03:53:44 +00:00
parent 38ab8d2977
commit 04510ac39f
2 changed files with 4 additions and 5 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ foreach ($svcNames as $s) {
// Site health from kb_facts
$siteLabels = [
"jarvis" => "jarvis.orbishosting.com",
"jarvis" => "jarvis.orbishosting.com:1972",
"tomsjavajive" => "tomsjavajive.com",
"epictravelexp"=> "epictravelexpeditions.com",
"parkersling" => "parkerslingshotrentals.com",
+3 -4
View File
@@ -135,7 +135,7 @@ function collect_all(): array {
// ── Digital Ocean ─────────────────────────────────────────────────────
try {
exec("ping -c1 -W1 165.22.1.228 > /dev/null 2>&1", $o2, $doCode));
exec("ping -c1 -W1 165.22.1.228 > /dev/null 2>&1", $o2, $doCode);;
$doStatus = ($doCode === 0) ? 'online' : 'unreachable';
KBEngine::storeFact('do_server', 'do_status', $doStatus, '165.22.1.228', $ttl);
$results['do_server'] = "ok ({$doStatus})";
@@ -181,7 +181,7 @@ function collect_all(): array {
$results['sites'] = 'skipped (fresh)';
} else try {
$sites = [
'jarvis' => 'https://jarvis.orbishosting.com',
"jarvis" => "http://jarvis.orbishosting.com:1972",
'tomsjavajive' => 'https://tomsjavajive.com',
'epictravelexp'=> 'https://epictravelexpeditions.com',
'parkersling' => 'https://parkerslingshotrentals.com',
@@ -195,7 +195,7 @@ function collect_all(): array {
$host = $parsed['host'] ?? $url;
// Check sites on the local server directly to avoid Cloudflare CDN timeouts.
// All JARVIS-hosted sites are served from this same OLS instance.
$localUrl = 'http://127.0.0.1' . ($parsed['path'] ?? '/');
$localUrl = $url; // external check
$ch = curl_init($localUrl);
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
@@ -204,7 +204,6 @@ function collect_all(): array {
CURLOPT_TIMEOUT => 10,
CURLOPT_CONNECTTIMEOUT => 5,
CURLOPT_NOBODY => true,
CURLOPT_HTTPHEADER => ["Host: $host"],
]);
curl_exec($ch);
$code = curl_getinfo($ch, CURLINFO_HTTP_CODE);