diff --git a/api/agent-leads-sync.json b/api/agent-leads-sync.json index 4676d0e38..66195a3db 100644 --- a/api/agent-leads-sync.json +++ b/api/agent-leads-sync.json @@ -1,6 +1,6 @@ { "agent": "V45_Leads_Sync", - "ts": "2026-04-19T21:40:02+02:00", + "ts": "2026-04-19T21:50:03+02:00", "paperclip_total": 48, "active_customer": 4, "warm_prospect": 5, diff --git a/api/handlers/disk-status.sh b/api/handlers/disk-status.sh new file mode 100755 index 000000000..49210270e --- /dev/null +++ b/api/handlers/disk-status.sh @@ -0,0 +1,12 @@ +#!/bin/bash +# Opus 19avr: disk usage monitoring +PCT=$(df / --output=pcent | tail -1 | tr -d ' %') +USED=$(df -h / --output=used | tail -1 | tr -d ' ') +AVAIL=$(df -h / --output=avail | tail -1 | tr -d ' ') +SIZE=$(df -h / --output=size | tail -1 | tr -d ' ') +STATUS="OK" +[ "$PCT" -gt 80 ] && STATUS="WARNING" +[ "$PCT" -gt 90 ] && STATUS="CRITICAL" +cat </dev/null | wc -l) +UNIV=$(grep -l "OPUS UNIVERSAL DRILL-DOWN v1 19avr" /var/www/html/*.html 2>/dev/null | wc -l) +SPECIFIC=$(grep -l "opus-drill-modal" /var/www/html/*.html 2>/dev/null | wc -l) +COV_PCT=$((UNIV * 100 / TOTAL)) +cat </dev/null) +CHARS=$(echo "$RESP" | python3 -c "import sys,json; d=json.loads(sys.stdin.read()); print(len(d.get('response','')))" 2>/dev/null) +[ -z "$PROVIDER" ] && PROVIDER="unknown" +[ -z "$CHARS" ] && CHARS=0 +STATUS="LIVE" +[ "$CHARS" -lt 20 ] && STATUS="DEGRADED" +cat <&1) +PASS=$(echo "$RESULT" | grep -oE '[0-9]+ PASS' | head -1 | grep -oE '[0-9]+') +FAIL=$(echo "$RESULT" | grep -oE '[0-9]+ FAIL' | head -1 | grep -oE '[0-9]+') +PCT=$(echo "$RESULT" | grep -oE '[0-9]+%' | head -1) +TOTAL=$((PASS + FAIL)) +SIGMA="<6σ" +[ "$FAIL" -eq 0 ] && SIGMA="6σ ✅" +cat <&1 | grep -oE '[0-9]+ PASS' | head -1 | grep -oE '[0-9]+') +F1=$(timeout 100 php nonreg-master.php 2>&1 | grep -oE '[0-9]+ FAIL' | head -1 | grep -oE '[0-9]+') +R2=$(timeout 100 php nonreg-master.php 2>&1 | grep -oE '[0-9]+ PASS' | head -1 | grep -oE '[0-9]+') +R3=$(timeout 100 php nonreg-master.php 2>&1 | grep -oE '[0-9]+ PASS' | head -1 | grep -oE '[0-9]+') +VAR="variable" +[ "$R1" = "$R2" ] && [ "$R2" = "$R3" ] && VAR="zero_variability" +SIGMA="<6σ" +[ "$R1" = "72" ] && [ "$R2" = "72" ] && [ "$R3" = "72" ] && SIGMA="6σ_DETERMINISTIC" +cat </dev/null | head -1) +DISK=$(df / --output=pcent | tail -1 | tr -d ' %') +UNIV=$(grep -l "OPUS UNIVERSAL DRILL-DOWN v1 19avr" /var/www/html/*.html 2>/dev/null | wc -l) +NR_RESULT=$(cd /var/www/html/api && timeout 100 php nonreg-master.php 2>&1) +NR_PASS=$(echo "$NR_RESULT" | grep -oE '[0-9]+ PASS' | head -1 | grep -oE '[0-9]+') +NR_FAIL=$(echo "$NR_RESULT" | grep -oE '[0-9]+ FAIL' | head -1 | grep -oE '[0-9]+') +cat <