fix(v1.1.13): socket ownership, correlation bugs, keepalive_seq
Socket Unix / systemd: - RuntimeDirectory=logcorrelator dans logcorrelator.service : systemd recrée /run/logcorrelator avec logcorrelator:logcorrelator à chaque démarrage/restart, éliminant le problème de droits root:root - Ajout de packaging/rpm/logcorrelator-tmpfiles.conf pour recréer le répertoire au boot via systemd-tmpfiles (couche de protection boot) - Retrait de /var/run/logcorrelator du RPM %files et du %post - Dockerfile.package : copie de logcorrelator-tmpfiles.conf dans SOURCES/ Corrélation — bugs: - Fix CRITIQUE emitPendingOrphans : corruption de slice lors de l'expiration simultanée de plusieurs orphelins pour la même clé (aliasing du tableau sous-jacent, orphelins émis en double et fantômes persistants) - Fix HAUT rotateOldestA : événement silencieusement perdu même avec ApacheAlwaysEmit=true ; retourne désormais *CorrelatedLog propagé dans ProcessEvent - Fix MOYEN processSourceB (pending orphan path) : en mode one_to_many, le B event n'était pas bufferisé après corrélation avec un pending orphan A, cassant le Keep-Alive pour les requêtes A2+ sur la même connexion - Fix BAS : suppression du champ mort timer *time.Timer dans pendingOrphan Corrélation — observabilité: - Ajout keepalive_seq (1-based) dans NormalizedEvent : numéro de requête dans la connexion Keep-Alive, incrémenté par processSourceA - Tous les logs orphelins incluent désormais keepalive_seq=N - keepAliveSeqA nettoyé automatiquement à l'expiration du TTL B Tests: 4 nouveaux tests de non-régression (32 tests au total) Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@ -15,15 +15,16 @@ const (
|
||||
|
||||
// NormalizedEvent represents a unified internal event from either source.
|
||||
type NormalizedEvent struct {
|
||||
Source EventSource
|
||||
Timestamp time.Time
|
||||
SrcIP string
|
||||
SrcPort int
|
||||
DstIP string
|
||||
DstPort int
|
||||
Headers map[string]string
|
||||
Extra map[string]any
|
||||
Raw map[string]any // Original raw data
|
||||
Source EventSource
|
||||
Timestamp time.Time
|
||||
SrcIP string
|
||||
SrcPort int
|
||||
DstIP string
|
||||
DstPort int
|
||||
Headers map[string]string
|
||||
Extra map[string]any
|
||||
Raw map[string]any // Original raw data
|
||||
KeepAliveSeq int // Request sequence number within the Keep-Alive connection (1-based)
|
||||
}
|
||||
|
||||
// CorrelationKey returns the key used for correlation (src_ip + src_port).
|
||||
|
||||
Reference in New Issue
Block a user