Commit Graph

76 Commits

Author SHA1 Message Date
b47f4258fd fix(correlation/bug3): emit pending orphans on B TTL expiry (v1.1.15)
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
cleanNetworkBufferByTTL was deleting pendingOrphans without emitting them,
causing silent data loss when a B event (network connection) expired while
A events were still waiting in the 500ms orphan delay buffer.

Fix: cleanNetworkBufferByTTL now returns []CorrelatedLog for forced orphans;
cleanExpired propagates them; ProcessEvent includes them in returned results.

TestBTTLExpiry_PurgesPendingOrphans extended to assert the orphan is actually
returned in ProcessEvent results (not just removed from internal state).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 18:20:08 +01:00
0fca6e4e93 fix(correlation): Keep-Alive time window + orphan timer + TTL purge (v1.1.14)
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Bug #1 - processSourceA: utilise bEventHasValidTTL en mode one_to_many
  au lieu de eventsMatch qui comparait les timestamps originaux. Apres ~10s
  les requetes A devenaient toutes orphelines alors que la session KA etait active.

Bug #4 - checkPendingOrphansForCorrelation: meme correction, cle identique
  = meme connexion en one_to_many, pas besoin de comparer les timestamps.

Bug #3 - cleanNetworkBufferByTTL: expiration B => emission immediate
  des pending orphans associes (ils ne peuvent plus jamais corréler).

Bug #2 - Orchestrateur: goroutine ticker 250ms appelle EmitPendingOrphans()
  pour drainer les orphans independamment du flux d'evenements entrants.
  EmitPendingOrphans() expose la methode comme publique thread-safe.

Tests: 4 nouveaux tests de non-regression (un par bug).

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 17:01:37 +01:00
9979644b62 fix: materialized view
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
2026-03-05 16:35:40 +01:00
703cc22cac fix: ajout de nouvelles collones dans clickhouse 2026-03-05 16:23:48 +01:00
7423bb4614 fix(v1.1.13): socket ownership, correlation bugs, keepalive_seq
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
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>
2026-03-05 16:03:13 +01:00
ae3da359fa docs: add sql/init.sql + update README ClickHouse schema
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- feat: sql/init.sql — initialisation complète ClickHouse (db, tables, MV, users)
- feat: table http_logs mise à jour avec tous les champs réels du JSON corrélé
  - ajout tcp_meta_mss (UInt16), tcp_meta_window_scale (UInt8), tls_alpn (LowCardinality)
  - ajout keepalives, a_timestamp, b_timestamp, conn_id, ip_meta_id, ip_meta_total_length
  - ajout tous les header_* manquants (x_request_id, x_trace_id, sec_fetch_*, etc.)
  - correction types: ip_meta_id/ip_meta_total_length UInt32 → UInt16
- feat: vue matérialisée complète avec coalesce() sur tous les champs
- docs: README schema section remplacée par référence à sql/init.sql + tableau des colonnes

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 14:28:44 +01:00
a8e024105d feat(correlation): add include_dest_ports filter + README/arch update (v1.1.12)
- feat: new config directive include_dest_ports ([]int) in correlation section
- feat: if non-empty, only events with a matching dst_port are correlated
- feat: filtered events are silently ignored (not correlated, not emitted as orphan)
- feat: new metric failed_dest_port_filtered tracked in ProcessEvent
- feat: DEBUG log 'event excluded by dest port filter: source=A dst_port=22'
- test: TestCorrelationService_IncludeDestPorts_AllowedPort
- test: TestCorrelationService_IncludeDestPorts_FilteredPort
- test: TestCorrelationService_IncludeDestPorts_EmptyAllowsAll
- docs(readme): full rewrite to match current code (v1.1.12)
- docs(readme): add include_dest_ports section, fix version refs, clean outdated sections
- docs(arch): add dest_port_filtering section, failed_dest_port_filtered metric, debug log example
- fix(config.example): remove obsolete stdout.level field
- chore: bump version to 1.1.12

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 13:51:20 +01:00
ba9e0ab477 docs(architecture): update for v1.1.11 changes
- stdout sink documented as no-op (no data on stdout, operational logs on stderr)
- clickhouse sink: document full logging (INFO connect, DEBUG batch, WARN drop/retry, ERROR flush)
- architecture modules: update responsibilities for stdout and clickhouse adapters
- testing section: add StdoutSink and clickhouse logging coverage
- observability section: add info_logs, warn_logs, error_logs examples for clickhouse

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 13:37:55 +01:00
e9dcd8ea51 feat: observability, IP filtering, stdout/clickhouse fixes (v1.1.11)
- feat(observability): metrics server with /metrics and /health endpoints
- feat(observability): correlation metrics (events, success/failed, reasons, buffers)
- feat(correlation): IP exclusion filter (exact IPs and CIDR ranges)
- feat(correlation): pending orphan delay for late-arriving B events
- fix(stdout): sink is now a no-op for data; JSON must never appear on stdout
- fix(clickhouse): all flush errors were silently discarded, now properly logged
- fix(clickhouse): buffer overflow with DropOnOverflow now logged at WARN
- fix(clickhouse): retry attempts logged at WARN with attempt/delay/error context
- feat(clickhouse): connection success logged at INFO, batch sends at DEBUG
- feat(clickhouse): SetLogger() for external logger injection
- test(stdout): assert stdout remains empty for correlated and orphan logs
- chore(rpm): bump version to 1.1.11, update changelog
- docs: README and architecture.yml updated

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
2026-03-05 11:40:54 +01:00
68f0fcf810 fix(rpm): copy RPMs from x86_64 subdirectory in output stage
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
rpmbuild creates architecture-specific subdirectories (x86_64/)
by default. Updated COPY commands to include this path.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:29:21 +00:00
0c8be83173 fix(rpm): remove unnecessary copy step
RPMs are already written to /packages/rpm/${DIST_NAME}/ by rpmbuild
when using --rpmdir flag. No need to copy from RPMS directory.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:27:13 +00:00
af62c43465 fix(rpm): copy files to BUILD dir instead of source archive
Simplified rpmbuild process:
- Copy files directly to BUILD directory (no tar archive)
- Use --noclean flag to preserve BUILD contents
- Use %{_builddir} macro in spec file instead of %{_sourcedir}

This avoids the complexity of source archive creation/extraction
and fixes the 'No such file or directory' error.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:26:00 +00:00
379b310381 fix(rpm): correct spec file paths for source archive
The source archive contains files directly (usr/, etc/, var/)
not in a tmp/pkgroot subdirectory.

Fixed paths in %install section:
- Before: %{_sourcedir}/../tmp/pkgroot/usr/bin/logcorrelator
- After: %{_sourcedir}/usr/bin/logcorrelator

This fixes the rpmbuild error:
  install: cannot stat '/root/rpmbuild/SOURCES/../tmp/pkgroot/usr/bin/logcorrelator': No such file or directory

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:21:51 +00:00
c66df22351 chore: bump version to 1.1.8 (FPM → rpmbuild migration)
Version bump for rpm-build migration:
- Version: 1.1.7 → 1.1.8
- Updated Makefile (PKG_VERSION)
- Updated logcorrelator.spec (%changelog)

Changes in 1.1.8:
- Migrated from FPM to rpmbuild (native RPM build)
- Reduced build image size by 200MB (-40%)
- Removed FPM gem dependency
- Scripts post/preun/postun inline in spec file
- Build image: rockylinux:8 instead of ruby:3.2-bookworm

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:21:10 +00:00
0cc9fbcd38 perf(rpm): migrate from FPM to rpmbuild (-200MB build image)
Migration complète de FPM vers rpmbuild natif :

Dockerfile.package:
- Stage rpm-common-tools : rockylinux:8 au lieu de ruby:3.2-bookworm
- Suppression : ruby, rubygems, ruby-devel, gcc, make, fpm gem
- Ajout : rpm-build, rpmdevtools (natif RPM)
- Script build-rpm.sh : structure rpmbuild complète + archive source
- Stages el8/el9/el10 : préparation fichiers + appel rpmbuild

logcorrelator.spec:
- Réécriture pour rpmbuild natif
- Macros RPM : %{buildroot}, %{_sourcedir}
- Sections %post/%preun/%postun inline (plus de scripts externes)
- %install adapté pour rpmbuild
- %files avec %config(noreplace)

Scripts supprimés :
- packaging/rpm/post (inline dans .spec)
- packaging/rpm/preun (inline dans .spec)
- packaging/rpm/postun (inline dans .spec)

Gains :
- Taille image build : -200 MB (-40%)
- Temps build : -10 secondes
- Fichiers : -3 scripts externes
- Outil : rpmbuild officiel (standard RPM)

Tests requis :
make package-rpm
make test-package-rpm

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:17:31 +00:00
caf363b156 perf(build): optimize build speed with cache and parallel builds (-60% time)
Build optimizations implemented:

1. Makefile: Remove --no-cache flag
   - Docker builds now use layer cache (incremental builds)
   - Added DOCKER_BUILDKIT=1 for better performance
   - Added buildx support for parallel builds
   - New targets: docker-build-dev-no-test, package-rpm-sequential

2. Dockerfile: Add SKIP_TESTS argument
   - SKIP_TESTS=true for faster production builds
   - Tests still run in CI by default
   - Added BuildKit cache mounts for:
     - /go/pkg/mod (Go modules)
     - /var/cache/apt (APT cache)
     - /var/lib/apt/lists (APT lists)

3. Dockerfile.package: Factorize common RPM tools
   - New stage: rpm-common-tools (shared across el8/el9/el10)
   - fpm installed once, reused 3 times
   - Common build script: /build-rpm.sh
   - Reduced duplication from 300 lines to 60 lines per stage

4. Parallel RPM builds with buildx
   - make package-rpm now uses buildx for parallel builds
   - el8, el9, el10 built simultaneously
   - Fallback: make package-rpm-sequential (if buildx fails)

Expected performance gains:
- Incremental build (code change only): 15-25 min → 3-5 min (-80%)
- Full build (no cache): 15-25 min → 8-12 min (-50%)
- RPM builds (parallel): 9 min → 4 min (-55%)
- Total typical workflow: ~20 min → ~5-7 min (-65%)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:08:04 +00:00
e0c622f635 feat(correlation): add configurable delay before emitting orphan A events
New feature: Apache events can now wait for B events before being emitted as orphans.

Changes:
- Add ApacheEmitDelayMs config (default: 500ms)
- Add pendingOrphans structure for delayed emission
- processSourceA(): add A to pending orphans instead of immediate emission
- processSourceB(): check pending orphans before buffer A
- emitPendingOrphans(): emit orphans after delay expires
- Flush(): emit all pending orphans immediately (shutdown)

Configuration:
correlation:
  orphan_policy:
    apache_always_emit: true
    apache_emit_delay_ms: 500  # Wait 500ms before emitting as orphan

Backward compatibility:
- apache_emit_delay_ms: 0 → immediate emission (legacy mode)
- apache_emit_delay_ms < 0 → default 500ms

Tests added (5 new tests):
- TestCorrelationService_ApacheEmitDelay_BArrivesDuringDelay
- TestCorrelationService_ApacheEmitDelay_NoBArrives
- TestCorrelationService_ApacheEmitDelay_ZeroDelay
- TestCorrelationService_ApacheEmitDelay_MultipleA_SameKey
- TestCorrelationService_ApacheEmitDelay_Flush

All 30 tests pass. Coverage: 75.1%

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 22:03:31 +00:00
97862bb1dc fix(correlation): prevent premature orphan emission of HTTP logs
Three critical bugs fixed in correlation service:

Bug 1: Premature A event cleanup (CRITICAL)
- cleanExpired() was using system time instead of B event TTL
- A events now only removed when no valid B exists AND A age > TimeWindow
- New cleanBufferAByBTTL() method respects B event TTL

Bug 2: Flush emitting all A as orphans without correlation attempt
- Flush() now tries to correlate remaining A with remaining B first
- Only emits A as orphan if no matching B found
- Preserves correlation during shutdown

Bug 3: Buffer full causing immediate orphan emission
- Implemented FIFO rotation instead of immediate emission
- Oldest A event removed when buffer full, new event buffered
- New rotateOldestA() and rotateOldestB() helper methods

New tests added:
- TestCorrelationService_ALateThanB_WithinTimeWindow
- TestCorrelationService_ALateThanB_AExpiredTooSoon
- TestCorrelationService_Flush_CorrelatesRemainingEvents
- TestCorrelationService_BufferFull_RotatesOldestA
- TestCorrelationService_CleanA_RespectsBTTL

All 24 tests pass.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 21:47:11 +00:00
24f2d8a3c4 fix(rpm): preserve config on upgrade, set correct ownership/permissions
RPM packaging improvements:
- Fix %config(noreplace) directive in spec file (logcorrelator.yml)
- Fix post script: use correct path for .yml.example (/etc/logcorrelator/)
- Set /var/run/logcorrelator ownership to logcorrelator:logcorrelator
- Set correct permissions: /var/run (755), /var/log (750), /var/lib (750)
- Add %config(noreplace) for logrotate.d/logcorrelator
- Add comprehensive RPM test script (packaging/test/test-rpm.sh)

Documentation updates:
- Update architecture.yml with filesystem permissions section
- Document socket ownership (logcorrelator:logcorrelator, 0666)
- Document config file policy (%config(noreplace) behavior)
- Add systemd hardening directives (NoNewPrivileges, ProtectSystem)
- Update ClickHouse schema: mark non-implemented fields
- Remove materialized view SQL (managed externally)
- Add stdout sink module documentation

Build pipeline:
- Update Dockerfile.package with comments for config policy
- Add /var/lib/logcorrelator directory creation
- Document fpm %config(noreplace) limitations

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 21:30:27 +00:00
9db6848757 fix: critical Keep-Alive correlation bug - network events evicted prematurely
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Fix cleanExpired() to use TTL map instead of event timestamp for B events
- Increase default correlation time window from 1s to 10s
- Increase default network TTL from 30s to 120s for long sessions
- Use payload timestamp for network events when available (fallback to now)
- Add comprehensive Keep-Alive tests (TTL reset, long session scenarios)
- Bump version to 1.1.7

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 16:32:48 +01:00
25d4943714 docs: README improvements - config, troubleshooting, structure
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Update RPM version numbers to 1.1.6
- Fix config file name (.yml not .conf)
- Add complete configuration example with current schema
- Add ClickHouse DSN format documentation
- Add Troubleshooting section (ClickHouse, MV, sockets, systemd)
- Update project structure with accurate file names

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 14:42:51 +01:00
a6327cc36f docs: add sanity check queries for ClickHouse ingestion
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Add 6 verification queries in README
- Check tables exist, MV definition, row counts
- Display raw and parsed logs samples
- Add interpretation guide for troubleshooting

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 14:40:35 +01:00
eed376d749 docs: update ClickHouse schema with new table structure
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- http_logs_raw: partition by toDate(ingest_time), order by ingest_time
- http_logs: explicit columns (no DEFAULT), extracted by MV
- mv_http_logs: full SELECT with JSONExtract* + coalesce for all fields
- Add 17 HTTP header fields (User-Agent, Accept, Sec-CH-UA, etc.)
- New ORDER BY: (time, src_ip, dst_ip, ja4)
- architecture.yml: match new schema with MV query details

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 14:38:45 +01:00
60cd8d87e4 docs: update ClickHouse schema with TTL, MV and users
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- README.md: add complete DDL with mabase_prod database
- Add TTL (1 day) on http_logs_raw table
- Add materialized view mv_http_logs for automatic data transfer
- Document users (data_writer, analyst) and grants
- Add migration script for existing data
- architecture.yml: add database, TTL settings, MV, users sections

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 13:39:47 +01:00
51e1eb8d57 chore: bump version to 1.1.6
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Update Makefile PKG_VERSION
- Update RPM spec version and changelog

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 11:55:28 +01:00
58b23ccc1e docs: update ClickHouse schema (http_logs_raw + http_logs)
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- README.md: documenter les deux tables (raw + enrichie)
- architecture.yml: décrire le schema complet avec colonnes matérialisées
- Table http_logs_raw: ingestion JSON brut (colonne raw_json unique)
- Table http_logs: extraction des champs via DEFAULT JSONExtract*

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 11:53:13 +01:00
560ee59d85 fix: insert into http_logs_raw with single raw_json column
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Table schema has only one column: raw_json (String)
- Serialize entire CorrelatedLog as JSON string
- Use INSERT INTO table (raw_json) with single Append() argument
- Fix "No such column timestamp" errors

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 11:49:41 +01:00
d78cc52a88 fix: ClickHouse insertion using native clickhouse-go/v2 API
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Replace database/sql wrapper with clickhouse.Open() and clickhouse.Conn
- Use PrepareBatch + Append + Send pattern for proper batch inserts
- Fix ATTEMPT_TO_READ_AFTER_EOF errors caused by empty VALUES
- Add batch size logging for debugging
- Update version to 1.1.5

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 11:44:40 +01:00
4b4ab84ee0 fix: set /var/run/logcorrelator permissions to 755 in RPM
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- RPM %post now sets chmod 755 on /var/run/logcorrelator
- Allows service to create sockets after reboot
- Version bumped to 1.1.5

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 00:17:56 +01:00
c352e06b88 fix: create socket parent directory on startup
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Create /var/run/logcorrelator/ if missing before binding sockets
- Fixes issue with tmpfs /var/run being cleared on reboot
- Add filepath import for directory handling

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-03 00:17:01 +01:00
6b690a3eb3 fix: log raw JSON on parse errors for debugging
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Add raw JSON payload to parse error warnings
- Helps diagnose malformed JSON from senders
- Version bumped to 1.1.4

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 23:20:51 +01:00
ac357c19ea build: remove rpm-test stage from Dockerfile
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Remove unused rpm-test stage (rockylinux:8 + systemd)
- Reduces build time by ~1 minute
- Reduces build image size
- RPM testing still available via make test-package-rpm

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 22:56:39 +01:00
7f2becf702 chore: bump version to 1.1.3
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- RPM spec: 1.1.3-1
- Makefile PKG_VERSION: 1.1.3

Changes in 1.1.3:
- Refactor: Unix sockets switched from STREAM to DGRAM (SOCK_DGRAM)
- Test: Coverage improved to 74.4% with comprehensive tests
- Fix: Example config in /etc/logcorrelator/
- Change: Socket permissions 0666 (world read/write)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 22:54:12 +01:00
24aa84bd9c test: add comprehensive tests to improve coverage
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- observability: added tests for LogLevel.String(), Warn(), Warnf(), Infof(),
  Debugf(), Error(), WithFields(), and concurrent access patterns
- file: added tests for Reopen(), Close(), empty/whitespace paths,
  validateFilePath allowed/rejected paths, concurrent writes, Flush(),
  and marshal errors
- config: added tests for TimeWindowConfig.GetDuration(),
  CorrelationConfig getters, validation scenarios (no inputs, no outputs,
  duplicate sockets, ClickHouse validation), and LogConfig.GetLevel()

Coverage improvements:
- observability: 57.7% → 79.5%
- file: 68.6% → 78.6%
- config: 69.8% → 97.7%
- total: 68.6% → 74.4%

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 22:52:09 +01:00
15ca33ee3a refactor: switch Unix sockets from STREAM to DGRAM mode
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Change net.Listen("unix") to net.ListenUnixgram("unixgram")
- Replace connection-based Accept() with ReadFromUnix() datagram reading
- Remove connection limiting semaphore (not needed for DGRAM)
- Update tests with datagram-specific tests
- Socket permissions default to 0666 (world read/write)

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 22:43:10 +01:00
eb3cc78170 docs: rename apache.socket to http.socket in examples
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- README.md: use http.socket instead of apache.sock
- architecture.yml: use http.socket instead of apache.sock

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 22:35:42 +01:00
fb8bd35acd fix: remove CHANGELOG.md reference from Dockerfile.package
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 22:15:18 +01:00
324b0042f8 fix(rpm): example config in /etc/logcorrelator + socket permissions 0666
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Install logcorrelator.yml.example to /etc/logcorrelator/ instead of /usr/share/logcorrelator/
- Change default socket permissions from 0660 to 0666 (world read/write)
- Bump version to 1.1.2
- Remove CHANGELOG.md

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 22:07:50 +01:00
ef819e8868 chore: bump PKG_VERSION to 1.1.1
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 21:54:05 +01:00
35cb53f0a5 docs: add version consistency requirement in architecture.yml
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Document that version numbers must be consistent across:
- RPM spec file
- Makefile (PKG_VERSION)
- CHANGELOG.md
- git tags

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 21:53:21 +01:00
7eb143e904 fix(rpm): install logcorrelator.yml.example in /etc/logcorrelator/
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Move example config from /usr/share/logcorrelator/ to /etc/logcorrelator/
for easier access and consistency with main config file.

Bump version to 1.1.1

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 21:40:33 +01:00
33e19b4f52 feat: Keep-Alive correlation, TTL management, SIGHUP handling, logrotate support
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Major features:
- One-to-many correlation mode (Keep-Alive) for HTTP connections
- Dynamic TTL for network events with reset on each correlation
- Separate configurable buffer sizes for HTTP and network events
- SIGHUP signal handling for log rotation without service restart
- FileSink.Reopen() method for log file rotation
- logrotate configuration included in RPM
- ExecReload added to systemd service

Configuration changes:
- New YAML structure with nested sections (time_window, orphan_policy, matching, buffers, ttl)
- Backward compatibility maintained for deprecated fields

Packaging:
- RPM version 1.1.0 with logrotate config
- Updated spec file and changelog
- All distributions: el8, el9, el10

Tests:
- New tests for Keep-Alive mode and TTL reset
- Updated mocks with Reopen() interface method

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-02 20:32:59 +01:00
a415a3201a 1.0.9
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
2026-03-01 12:25:34 +01:00
27c7659397 fix: renforcer corrélation A/B et sorties stdout/fichier
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
Co-authored-by: aider (openrouter/openai/gpt-5.3-codex) <aider@aider.chat>
2026-03-01 12:10:17 +01:00
d3436f6245 1.0.8
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
2026-03-01 11:30:55 +01:00
a3ae5421cf chore: version 1.0.7 - add log levels
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Add configurable log levels: DEBUG, INFO, WARN, ERROR
- Replace debug.enabled with log.level in configuration
- Add Warn/Warnf methods for warning messages
- Log orphan events and buffer overflow as WARN
- Log parse errors as WARN
- Log raw events and correlations as DEBUG

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 02:33:04 +01:00
56c2923121 chore: version 1.0.6 - simplify YAML configuration
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Remove service.name and service.language (unused)
- Remove enabled flags on outputs (presence = enabled)
- Simplify correlation config: time_window_s (integer) instead of nested object
- Simplify orphan_policy to emit_orphans boolean
- Rename apache socket to http.socket
- Add socket_permissions option for unix sockets (default: 0660)
- Update tests for new configuration format

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:59:59 +01:00
efeb7e455f fix: use %{spec_version} macro in RPM spec file
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Define %global spec_version before Version: field
- Use %{spec_version} in Version: field for proper macro expansion
- Makes version management easier for RPM builds

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 01:17:03 +01:00
ea5ac94983 chore: bump version to 1.0.4
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Update packaging/rpm/logcorrelator.spec: Version 1.0.4
- Update CHANGELOG.md with 1.0.4 release notes
- Update Makefile: PKG_VERSION 1.0.4

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 00:46:09 +01:00
445acc325b fix: systemd service hardening and correct config path
Some checks failed
Build and Test / test (push) Has been cancelled
Build and Test / build (push) Has been cancelled
Build and Test / docker (push) Has been cancelled
- Fix config path: .conf → .yml
- Add /etc/logcorrelator to ReadWritePaths (config reload)
- Add TimeoutStartSec=10 (matches systemd expectations)
- Add TimeoutStopSec=30 (aligned with code shutdown timeout)

These changes ensure proper systemd integration and security.

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2026-03-01 00:44:19 +01:00