count('tx_vitec_ssrpurgelog', 'crdate > ' . $d1); $purges7d = $this->count('tx_vitec_ssrpurgelog', 'crdate > ' . $d7); $failed7d = $this->count('tx_vitec_ssrpurgelog', 'crdate > ' . $d7 . ' AND success = 0'); $full7d = $this->count('tx_vitec_ssrpurgelog', "crdate > " . $d7 . " AND paths = '*'"); $samples24h = $this->count('tx_vitec_ssrhealthlog', 'crdate > ' . $d1); $ok24h = $this->count('tx_vitec_ssrhealthlog', 'crdate > ' . $d1 . ' AND ok = 1'); $uptime = $samples24h > 0 ? round($ok24h / $samples24h * 100, 1) . ' %' : '-'; $avgMs = $this->scalar('SELECT ROUND(AVG(response_ms)) FROM tx_vitec_ssrhealthlog WHERE crdate > ' . $d1 . ' AND ok = 1'); $maxCache = $this->scalar('SELECT MAX(cache_mb) FROM tx_vitec_ssrhealthlog WHERE crdate > ' . $d7); $rows = [ ['Purges (24 h / 7 Tage)', $purges24h . ' / ' . $purges7d], ['davon Komplett-Purges (7 T.)', (string)$full7d], ['Fehlgeschlagene Purges (7 T.)', $failed7d > 0 ? '' . $failed7d . '' : '0'], ['Verfügbarkeit (24 h)', htmlspecialchars($uptime) . ' (' . $ok24h . '/' . $samples24h . ' Messungen)'], ['∅ Antwortzeit (24 h)', $avgMs !== null ? $avgMs . ' ms' : '-'], ['Max. Cache-Größe (7 T.)', $maxCache !== null ? $maxCache . ' MB' : '-'], ]; $html = '
| ' . $label . ' | ' . $value . ' |
|---|
Noch keine Messwerte: Scheduler-Task für vitec:ssr-health einrichten (z. B. alle 5 Minuten).