diff --git a/api/em-kpi-cache.json b/api/em-kpi-cache.json index e69de29bb..aaa321046 100644 --- a/api/em-kpi-cache.json +++ b/api/em-kpi-cache.json @@ -0,0 +1,281 @@ +{ + "ts": "2026-04-21T11:55:01+00:00", + "server": "s204", + "s204": { + "load": 0.98, + "uptime": "2026-04-14 11:51:24", + "ram_total_mb": 31335, + "ram_used_mb": 12101, + "ram_free_mb": 19233, + "disk_total": "150G", + "disk_used": "117G", + "disk_free": "27G", + "disk_pct": "82%", + "fpm_workers": 140, + "docker_containers": 19, + "cpu_cores": 8 + }, + "s95": { + "load": 0.96, + "disk_pct": "81%", + "status": "UP", + "ram_total_mb": 15610, + "ram_free_mb": 12029 + }, + "pmta": [ + { + "name": "SER6", + "ip": "110.239.84.121", + "status": "DOWN" + }, + { + "name": "SER7", + "ip": "110.239.65.64", + "status": "DOWN" + }, + { + "name": "SER8", + "ip": "182.160.55.107", + "status": "DOWN" + }, + { + "name": "SER9", + "ip": "110.239.86.68", + "status": "DOWN" + } + ], + "assets": { + "html_pages": 314, + "php_apis": 779, + "wiki_entries": 1988, + "vault_doctrines": 61, + "vault_sessions": 104, + "vault_decisions": 12 + }, + "tools": { + "total": 627, + "registry_version": "?" + }, + "sovereign": { + "status": "UP", + "providers": [ + "Cerebras-fast", + "Cerebras-think", + "Groq", + "Cloudflare-AI", + "Gemini", + "SambaNova", + "NVIDIA-NIM", + "Mistral", + "Groq-OSS", + "HF-Space", + "HF-Router", + "OpenRouter", + "GitHub-Models" + ], + "active": 13, + "total": 13, + "primary": "Cerebras-fast", + "cost": "0€" + }, + "ethica": { + "total_hcps": 161733, + "with_email": 110600, + "with_phone": 155151, + "gap_email": 51133, + "pct_email": 68.4, + "pct_phone": 95.9, + "by_country": [ + { + "country": "DZ", + "hcps": 122337, + "with_email": 78499, + "with_tel": 119396, + "pct_email": 64.2, + "pct_tel": 97.6 + }, + { + "country": "MA", + "hcps": 19723, + "with_email": 15076, + "with_tel": 18737, + "pct_email": 76.4, + "pct_tel": 95 + }, + { + "country": "TN", + "hcps": 17794, + "with_email": 15146, + "with_tel": 17018, + "pct_email": 85.1, + "pct_tel": 95.6 + }, + { + "country": "INTL", + "hcps": 1879, + "with_email": 1879, + "with_tel": 0, + "pct_email": 100, + "pct_tel": 0 + } + ] + }, + "docker": [ + { + "name": "loki", + "status": "Up 5 days", + "ports": "" + }, + { + "name": "listmonk", + "status": "Up 5 days", + "ports": "" + }, + { + "name": "plausible-plausible-1", + "status": "Up 3 days", + "ports": "" + }, + { + "name": "plausible-plausible-db-1", + "status": "Up 3 days", + "ports": "" + }, + { + "name": "plausible-plausible-events-db-1", + "status": "Up 3 days", + "ports": "" + }, + { + "name": "n8n-docker-n8n-1", + "status": "Up 5 days", + "ports": "" + }, + { + "name": "mattermost-docker-mm-db-1", + "status": "Up 5 days", + "ports": "" + }, + { + "name": "mattermost-docker-mattermost-1", + "status": "Up 5 days (healthy)", + "ports": "" + }, + { + "name": "twenty", + "status": "Up 5 days", + "ports": "" + }, + { + "name": "twenty-redis", + "status": "Up 5 days", + "ports": "" + }, + { + "name": "langfuse", + "status": "Up 5 days", + "ports": "" + }, + { + "name": "redis-weval", + "status": "Up 6 days", + "ports": "" + }, + { + "name": "gitea", + "status": "Up 6 days", + "ports": "" + }, + { + "name": "node-exporter", + "status": "Up 6 days", + "ports": "" + }, + { + "name": "prometheus", + "status": "Up 6 days", + "ports": "" + }, + { + "name": "searxng", + "status": "Up 6 days", + "ports": "" + }, + { + "name": "uptime-kuma", + "status": "Up 36 hours (healthy)", + "ports": "" + }, + { + "name": "vaultwarden", + "status": "Up 6 days (healthy)", + "ports": "" + }, + { + "name": "qdrant", + "status": "Up 6 days", + "ports": "" + } + ], + "crons": { + "active": 35 + }, + "git": { + "head": "0c982bc55 auto-sync-1355", + "dirty": 0, + "status": "CLEAN" + }, + "nonreg": { + "total": 153, + "passed": 153, + "score": "100%" + }, + "services": [ + { + "name": "DeerFlow", + "port": 3002, + "status": "UP" + }, + { + "name": "DeerFlow API", + "port": 8001, + "status": "UP" + }, + { + "name": "Qdrant", + "port": 6333, + "status": "UP" + }, + { + "name": "Ollama", + "port": 11434, + "status": "UP" + }, + { + "name": "Redis", + "port": 6379, + "status": "UP" + }, + { + "name": "Sovereign", + "port": 4000, + "status": "UP" + }, + { + "name": "SearXNG", + "port": 8080, + "status": "UP" + } + ], + "whisper": { + "binary": "COMPILED", + "model": "142MB" + }, + "grand_total": 3788, + "health": { + "score": 6, + "max": 6, + "pct": 100 + }, + "elapsed_ms": 11275 +} \ No newline at end of file diff --git a/api/v83-business-kpi-latest.json b/api/v83-business-kpi-latest.json index 8d90d2d51..7080422c2 100644 --- a/api/v83-business-kpi-latest.json +++ b/api/v83-business-kpi-latest.json @@ -1,7 +1,7 @@ { "ok": true, "version": "V83-business-kpi", - "ts": "2026-04-21T11:54:02+00:00", + "ts": "2026-04-21T11:55:15+00:00", "summary": { "total_categories": 8, "total_kpis": 64, diff --git a/api/wevia-fast-path-v3.php b/api/wevia-fast-path-v3.php index efa092688..2deb21fa1 100644 --- a/api/wevia-fast-path-v3.php +++ b/api/wevia-fast-path-v3.php @@ -1,22 +1,50 @@ '?','providers'=>'?','hcps'=>'?','pages'=>'?','agents'=>'?','intents'=>'?','skills'=>'?']; return $cache; } + if (!is_array($d)) { + $cache = ['tools'=>'?','providers'=>'?','hcps'=>'?','pages'=>'?','agents'=>'?','intents'=>'?','skills'=>'?','autonomy'=>'?','built_at'=>'?']; + return $cache; + } + // Nested-aware count extractor + $getCount = function($node) { + if (!is_array($node)) return '?'; + foreach (['count_unique','count','total','TOTAL','n'] as $k) { + if (isset($node[$k]) && is_numeric($node[$k])) return (int)$node[$k]; + } + foreach (['items','list','by_source','by_key'] as $k) { + if (isset($node[$k]) && is_array($node[$k])) return count($node[$k]); + } + return '?'; + }; + // For HCPs / pages: try nested first, then top-level scalars + $hcps = '?'; + if (isset($d['ethica']['hcps_total']) && is_numeric($d['ethica']['hcps_total'])) $hcps = (int)$d['ethica']['hcps_total']; + elseif (isset($d['ethica_hcps_total']) && is_numeric($d['ethica_hcps_total'])) $hcps = (int)$d['ethica_hcps_total']; + $pages = '?'; + if (isset($d['pages']) && is_array($d['pages'])) $pages = $getCount($d['pages']); + elseif (isset($d['pages_count']) && is_numeric($d['pages_count'])) $pages = (int)$d['pages_count']; $cache = [ - 'tools' => $d['tools_count'] ?? '?', - 'providers' => $d['providers_count'] ?? '?', - 'hcps' => $d['ethica_hcps_total'] ?? '?', - 'pages' => $d['pages_count'] ?? '?', - 'agents' => $d['agents']['count_unique'] ?? $d['agents_count'] ?? '?', - 'intents' => $d['intents']['count'] ?? $d['intents_count'] ?? '?', - 'skills' => $d['skills']['TOTAL'] ?? $d['skills_total'] ?? '?', - 'autonomy' => $d['autonomy_level'] ?? '?', + 'agents' => $getCount($d['agents'] ?? null), + 'intents' => $getCount($d['intents'] ?? null), + 'skills' => $getCount($d['skills'] ?? null), + 'brains' => $getCount($d['brains'] ?? null), + 'doctrines' => $getCount($d['doctrines'] ?? null), + 'dashboards' => $getCount($d['dashboards'] ?? null), + 'providers' => $getCount($d['providers'] ?? null), + 'tools' => $getCount($d['tools'] ?? null), + 'qdrant' => $getCount($d['qdrant'] ?? null), + 'nonreg' => isset($d['nonreg']['score']) ? $d['nonreg']['score'] : ($d['nonreg_score'] ?? '?'), + 'hcps' => $hcps, + 'pages' => $pages, + 'autonomy' => $d['autonomy_level'] ?? '?', + 'built_at' => $d['built_at'] ?? '?', + 'apis' => $d['apis_php_count'] ?? '?', ]; return $cache; }