diff --git a/CHANGELOG.md b/CHANGELOG.md index c76cc60..04e3a6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,8 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/). Les numéros ## [Non publié] +## [0.10.0] - 2026-11-03 + ### Ajouté - **Découpage #111 : RsysLogstach devient le connecteur rsyslog, la sémantique Logstash part dans [PyStashTemplate](https://github.com/Mathilde-Team/PyStashTemplate)** (v0.1.0). @@ -28,6 +30,7 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/). Les numéros - **Gabarits** (#102) : `%{+%s}` rend les secondes depuis l'epoch de `@timestamp`, comme Logstash, au lieu de `%0`. ### Modifié +- **Indexer délégué aux sorties PyStashTemplate** (#160) : `OpenSearchIndexer` garde sa signature et son contrat (`SendOutcome`, DLQ, fingerprint, gabarit) mais envoie via `OpenSearchOutput` (issue #12, API `_bulk`, un document par lot — accusé réel, `retry_max=0` parité) ; `dlq.py` devient un ré-export du port `pystashtemplate.dlq` (format identique) ; `install_index_template` passe par le client httpx de la sortie. Dépendance PyStashTemplate épinglée à `v0.2.0`, `opensearch-py` retirée. **Changements documentés** : le failover multi-nœuds du transport opensearch-py disparaît (premier nœud seul, avertissement si plusieurs — l'échec rend le message à rsyslog, qui le retient) ; `pipeline` est désormais transmis aussi pour `update`/`delete` (l'ancien client l'ignorait silencieusement) ; `PipelineInterpreter.apply_events` doit être attendu (PyStashTemplate #34). - **Licence** (#91) : passage de MIT à GPL-3.0-or-later. `LICENSE` contient désormais le texte officiel de la GPLv3 ; s'y ajoutent `license` dans `pyproject.toml`, les en-têtes SPDX, la section Licence du README avec les licences des dépendances, et `tests/test_licence.py`. ### Ajouté diff --git a/CLAUDE.md b/CLAUDE.md index af111c1..7b1e67a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,7 +18,7 @@ Pipeline asynchrone en Python qui reçoit les messages syslog via le module `omp ## Stack technique - Python >= 3.11, asyncio -- opensearch-py[async] (indexation asynchrone) +- pystashtemplate v0.2.0 (sorties : OpenSearchOutput, API _bulk — l'indexation n'a plus de client dédié) - geoip2 / maxminddb (enrichissement GeoIP) - pyyaml (configuration) - logstash-pipeline-parser==0.0.3 (parsing des pipelines .conf Logstash) diff --git a/FEATURES.md b/FEATURES.md index 57213e7..b798c35 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -29,7 +29,7 @@ - Filtres natifs interprétés : `dissect`, `mutate`, `translate` (toutes les options du plugin, #119), `mmdb`, `geoip`, `date`, `drop` (avec `percentage`, #34), `kv` (#113), `fingerprint` (#114), `grok` (#112), `useragent`, `xml` et `dns` (#121), plus le pont `filters_json` ### Indexation OpenSearch (module indexer.py) -- `OpenSearchIndexer` — indexation asynchrone (opensearch-py[async]) +- `OpenSearchIndexer` — délègue l'envoi à la sortie `OpenSearchOutput` de PyStashTemplate (#160, API `_bulk`) - Authentification via variables d'environnement - Template d'index (`opensearch-index-template.json`) - Retenue (retry) sur erreurs transitoires (connexion refusée, timeout) @@ -92,7 +92,7 @@ ### Indexer (indexer.py) - Réponse du serveur aux redirections (imprimante/série/parallèle) traitée côté serveur, jamais remontée à l'API -- **Multi-nœuds et failover (#37)** : le transport opensearch-py retente le nœud suivant en cas d'échec de connexion ; `retry_on_timeout=True` étend le repli aux délais d'attente (défaut de la bibliothèque : False). `health()` (GET /) alimente le health check périodique d'omprog (`--health-check-interval`, défaut 300 s, 0 = désactivé) — un échec journalise un warning, sans jamais interrompre le pont +- **Multi-nœuds (#37, revu par #160)** : la sortie n'utilise que le premier nœud (avertissement si plusieurs) — l'échec rend le message à rsyslog qui le retient ; plus de failover transport. `health()` (GET /) alimente le health check périodique d'omprog (`--health-check-interval`, défaut 300 s, 0 = désactivé) — un échec journalise un warning, sans jamais interrompre le pont - **Fingerprint HMAC/MURMUR3 (#28)** : `--fingerprint-method murmur3` (entier 32 bits via `mmh3`, non cryptographique, format `_id` décimal) ; mode HMAC avec `--fingerprint-key` ou la variable d'environnement `FINGERPRINT_KEY` (clé de déploiement, `_id` incomparables entre clés ; pas de HMAC MURMUR3, comme le filtre Logstash) - **`_id` déterministe (#33)** : `--document-id-template` (champ identifiant naturel, lisible) et `--document-id-fingerprint` (hash du contenu, aucun champ naturel) peuvent être configurés **simultanément** — le fingerprint est prioritaire, jamais combinés dans un même `_id` ; sans l'un ni l'autre, `_id` aléatoire (historique). Documentation des cas d'usage dans le README diff --git a/README.md b/README.md index cff4caa..19be6eb 100644 --- a/README.md +++ b/README.md @@ -25,11 +25,11 @@ rsyslog → omprog (asyncio) → [filters] → [enrichment] → [indexer] → Op | `opensearchconf.py` | Connexion OpenSearch lue dans `output { opensearch { … } }` (#125) | `pystashtemplate.tracing` | | `dlq.py` | `LocalDeadLetterQueue` — JSONL append-only | `pystashtemplate.tracing` | | `metrics.py` | `Metrics` — compteurs, histogrammes et jauges Prometheus, endpoint `/metrics` | i18n, `pystashtemplate.tracing` | -| `indexer.py` | `OpenSearchIndexer` (opensearch-py async) | dlq, i18n, `pystashtemplate.fingerprint`, `pystashtemplate.templates` | +| `indexer.py` | `OpenSearchIndexer` — délègue à la sortie `OpenSearchOutput` de PyStashTemplate (#160), DLQ et fingerprint locaux | dlq, i18n, `pystashtemplate.fingerprint`, `pystashtemplate.templates`, `pystashtemplate.outputs.opensearch` | Depuis le découpage #111, la sémantique Logstash partagée vit dans le dépôt [PyStashTemplate](https://github.com/Mathilde-Team/PyStashTemplate) -(dépendance figée `v0.1.0`) : `templates` (gabarits `%{field}`), `filters` +(dépendance figée `v0.2.0`) : `templates` (gabarits `%{field}`), `filters` (dissect, drop, regex, kv, mutate, geoip, translate, date), `interpreter` (`PipelineInterpreter`, `--pipeline-conf` Logstash), `enrichment` (dictionnaire + GeoIP), `grok`, `fingerprint`, `useragent`, `xmlfilter`, @@ -310,7 +310,7 @@ par ordre de nom comme le fait Logstash. Seules les sorties `opensearch` et toujours vers les nœuds de `--opensearch-host`. `PYTHONPATH=src python3 src/omprog.py --help` donne la liste complète. -**Multi-nœuds et failover (#37)** : `--opensearch-host` est répétable ; le transport opensearch-py retente le nœud suivant en cas d'échec de connexion ou de délai (`retry_on_timeout`), et un health check périodique journalise l'état du cluster (`--health-check-interval`, défaut 300 s, 0 = désactivé). +**Multi-nœuds et failover (#37, revu par #160)** : `--opensearch-host` est répétable, mais la sortie `OpenSearchOutput` de PyStashTemplate (API `_bulk`) n'utilise que le PREMIER nœud — le failover revient à l'appelant : un échec rend le message à rsyslog (`RETRYABLE`), qui le retient et le renvoie. Un health check périodique journalise l'état du cluster (`--health-check-interval`, défaut 300 s, 0 = désactivé). ### Métriques Prometheus (issue #35) @@ -505,7 +505,7 @@ Le dépôt ne reprend aucun code de Logstash (Apache-2.0) : les filtres sont ré | Dépendance | Licence | |---|---| | logstash-pipeline-parser 0.0.3 | MIT | -| opensearch-py | Apache-2.0 | +| pystashtemplate (git, tag `v0.2.0`) | GPL-3.0-or-later | | geoip2, maxminddb | Apache-2.0 | | prometheus-client | Apache-2.0 AND BSD-2-Clause | | pyyaml, mmh3, loguru | MIT | diff --git a/lang/ar_AR.po b/lang/ar_AR.po index 402fc0e..8925d48 100644 --- a/lang/ar_AR.po +++ b/lang/ar_AR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "تم تكوين عدة عقد ({hosts})، ويُستخدم الأولى فقط" #: src/metrics.py #, python-brace-format diff --git a/lang/bn_BD.po b/lang/bn_BD.po index ebf9291..dc123a2 100644 --- a/lang/bn_BD.po +++ b/lang/bn_BD.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "একাধিক নোড কনফিগার করা হয়েছে ({hosts})، শুধুমাত্র প্রথমটি ব্যবহৃত হয়" #: src/metrics.py #, python-brace-format diff --git a/lang/cs_CZ.po b/lang/cs_CZ.po index f14b06d..e93e6ee 100644 --- a/lang/cs_CZ.po +++ b/lang/cs_CZ.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Nakonfigurováno více uzlů ({hosts}), používá se jen první" #: src/metrics.py #, python-brace-format diff --git a/lang/da_DK.po b/lang/da_DK.po index b247ba5..c2804b5 100644 --- a/lang/da_DK.po +++ b/lang/da_DK.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Flere noder konfigureret ({hosts}), kun den første bruges" #: src/metrics.py #, python-brace-format diff --git a/lang/de_DE.po b/lang/de_DE.po index 7f444c7..11f8ee6 100644 --- a/lang/de_DE.po +++ b/lang/de_DE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Mehrere Knoten konfiguriert ({hosts}), nur der erste wird verwendet" #: src/metrics.py #, python-brace-format diff --git a/lang/el_GR.po b/lang/el_GR.po index ba2fa60..9b200c8 100644 --- a/lang/el_GR.po +++ b/lang/el_GR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Διαμορφώθηκαν πολλοί κόμβοι ({hosts}), χρησιμοποιείται μόνο ο πρώτος" #: src/metrics.py #, python-brace-format diff --git a/lang/en_US.po b/lang/en_US.po index 78d4767..faa00f0 100644 --- a/lang/en_US.po +++ b/lang/en_US.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: deusyv\n" "Language-Team: English\n" @@ -24,8 +24,8 @@ msgstr "OpenSearch indexing failed permanently error={error}" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "OpenSearch indexing failed error={error}" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Several nodes configured ({hosts}), only the first one is used" #: src/metrics.py #, python-brace-format @@ -247,6 +247,10 @@ msgstr "Maximum age of a rotated file" msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "Unexpected failure while processing a message error={error}" +#, python-brace-format +#~ msgid "Indexation OpenSearch échouée erreur={error}" +#~ msgstr "OpenSearch indexing failed error={error}" + #~ msgid "base geoip illisible : {} ({})" #~ msgstr "unreadable geoip database: {} ({})" diff --git a/lang/fa_IR.po b/lang/fa_IR.po index b0c3c67..b996625 100644 --- a/lang/fa_IR.po +++ b/lang/fa_IR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "چندین گره پیکربندی شده است ({hosts})، فقط اولی استفاده می‌شود" #: src/metrics.py #, python-brace-format diff --git a/lang/fi_FI.po b/lang/fi_FI.po index 6e9d655..6fb0539 100644 --- a/lang/fi_FI.po +++ b/lang/fi_FI.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Useita solmuja määritetty ({hosts}), vain ensimmäistä käytetään" #: src/metrics.py #, python-brace-format diff --git a/lang/fr_FR.po b/lang/fr_FR.po index 80032c2..bde6e93 100644 --- a/lang/fr_FR.po +++ b/lang/fr_FR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,7 +24,7 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" msgstr "" #: src/metrics.py diff --git a/lang/he_IL.po b/lang/he_IL.po index 3483d92..3248ba9 100644 --- a/lang/he_IL.po +++ b/lang/he_IL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "הוגדרו מספר צמתים ({hosts}), בשימוש רק הראשון" #: src/metrics.py #, python-brace-format diff --git a/lang/hi_IN.po b/lang/hi_IN.po index 03b6d0a..6c1fde0 100644 --- a/lang/hi_IN.po +++ b/lang/hi_IN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "कई नोड्स कॉन्फ़िगर किए गए हैं ({hosts}), केवल पहले का उपयोग होता है" #: src/metrics.py #, python-brace-format diff --git a/lang/hu_HU.po b/lang/hu_HU.po index 8af9f30..72ccede 100644 --- a/lang/hu_HU.po +++ b/lang/hu_HU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Több csomópont van beállítva ({hosts}), csak az első lesz használva" #: src/metrics.py #, python-brace-format diff --git a/lang/id_ID.po b/lang/id_ID.po index e48bfe0..1af29f6 100644 --- a/lang/id_ID.po +++ b/lang/id_ID.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Beberapa node dikonfigurasi ({hosts}), hanya yang pertama digunakan" #: src/metrics.py #, python-brace-format diff --git a/lang/it_IT.po b/lang/it_IT.po index ca114c9..c13a6f9 100644 --- a/lang/it_IT.po +++ b/lang/it_IT.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Più nodi configurati ({hosts}), viene usato solo il primo" #: src/metrics.py #, python-brace-format diff --git a/lang/ja_JP.po b/lang/ja_JP.po index 836dd87..50cf401 100644 --- a/lang/ja_JP.po +++ b/lang/ja_JP.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "複数のノードが構成されています ({hosts})。最初のノードのみが使用されます" #: src/metrics.py #, python-brace-format diff --git a/lang/ko_KR.po b/lang/ko_KR.po index a53c782..c0d128b 100644 --- a/lang/ko_KR.po +++ b/lang/ko_KR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "여러 노드가 구성되어 있습니다 ({hosts}). 첫 번째 노드만 사용됩니다" #: src/metrics.py #, python-brace-format diff --git a/lang/locale/ar_AR/LC_MESSAGES/rsyslogstach.mo b/lang/locale/ar_AR/LC_MESSAGES/rsyslogstach.mo index 99041ad..18817f8 100644 Binary files a/lang/locale/ar_AR/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/ar_AR/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/bn_BD/LC_MESSAGES/rsyslogstach.mo b/lang/locale/bn_BD/LC_MESSAGES/rsyslogstach.mo index 1728404..fe7a3ad 100644 Binary files a/lang/locale/bn_BD/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/bn_BD/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/cs_CZ/LC_MESSAGES/rsyslogstach.mo b/lang/locale/cs_CZ/LC_MESSAGES/rsyslogstach.mo index 0898f23..65ceefc 100644 Binary files a/lang/locale/cs_CZ/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/cs_CZ/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/da_DK/LC_MESSAGES/rsyslogstach.mo b/lang/locale/da_DK/LC_MESSAGES/rsyslogstach.mo index 77273ab..e7859f7 100644 Binary files a/lang/locale/da_DK/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/da_DK/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/de_DE/LC_MESSAGES/rsyslogstach.mo b/lang/locale/de_DE/LC_MESSAGES/rsyslogstach.mo index 4b3e838..450ef3f 100644 Binary files a/lang/locale/de_DE/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/de_DE/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/el_GR/LC_MESSAGES/rsyslogstach.mo b/lang/locale/el_GR/LC_MESSAGES/rsyslogstach.mo index 8f03251..3f3c6a2 100644 Binary files a/lang/locale/el_GR/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/el_GR/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/en_US/LC_MESSAGES/rsyslogstach.mo b/lang/locale/en_US/LC_MESSAGES/rsyslogstach.mo index 8de6454..05bebe1 100644 Binary files a/lang/locale/en_US/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/en_US/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/fa_IR/LC_MESSAGES/rsyslogstach.mo b/lang/locale/fa_IR/LC_MESSAGES/rsyslogstach.mo index 772d8b6..fac4f33 100644 Binary files a/lang/locale/fa_IR/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/fa_IR/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/fi_FI/LC_MESSAGES/rsyslogstach.mo b/lang/locale/fi_FI/LC_MESSAGES/rsyslogstach.mo index 61200ae..d5cc289 100644 Binary files a/lang/locale/fi_FI/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/fi_FI/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/he_IL/LC_MESSAGES/rsyslogstach.mo b/lang/locale/he_IL/LC_MESSAGES/rsyslogstach.mo index 7180837..2d44470 100644 Binary files a/lang/locale/he_IL/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/he_IL/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/hi_IN/LC_MESSAGES/rsyslogstach.mo b/lang/locale/hi_IN/LC_MESSAGES/rsyslogstach.mo index 0c118a9..1c59d41 100644 Binary files a/lang/locale/hi_IN/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/hi_IN/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/hu_HU/LC_MESSAGES/rsyslogstach.mo b/lang/locale/hu_HU/LC_MESSAGES/rsyslogstach.mo index bb253ab..0ba0f4d 100644 Binary files a/lang/locale/hu_HU/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/hu_HU/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/id_ID/LC_MESSAGES/rsyslogstach.mo b/lang/locale/id_ID/LC_MESSAGES/rsyslogstach.mo index e9966ad..bc7ad24 100644 Binary files a/lang/locale/id_ID/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/id_ID/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/it_IT/LC_MESSAGES/rsyslogstach.mo b/lang/locale/it_IT/LC_MESSAGES/rsyslogstach.mo index f6aa2cd..8346cc0 100644 Binary files a/lang/locale/it_IT/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/it_IT/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/ja_JP/LC_MESSAGES/rsyslogstach.mo b/lang/locale/ja_JP/LC_MESSAGES/rsyslogstach.mo index e0b4ca4..7065bda 100644 Binary files a/lang/locale/ja_JP/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/ja_JP/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/ko_KR/LC_MESSAGES/rsyslogstach.mo b/lang/locale/ko_KR/LC_MESSAGES/rsyslogstach.mo index 531a220..d0d1e2c 100644 Binary files a/lang/locale/ko_KR/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/ko_KR/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/nb_NO/LC_MESSAGES/rsyslogstach.mo b/lang/locale/nb_NO/LC_MESSAGES/rsyslogstach.mo index 4e28ff1..4dedea3 100644 Binary files a/lang/locale/nb_NO/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/nb_NO/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/nl_NL/LC_MESSAGES/rsyslogstach.mo b/lang/locale/nl_NL/LC_MESSAGES/rsyslogstach.mo index 55b3754..893f454 100644 Binary files a/lang/locale/nl_NL/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/nl_NL/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/pl_PL/LC_MESSAGES/rsyslogstach.mo b/lang/locale/pl_PL/LC_MESSAGES/rsyslogstach.mo index fc8fb49..4f8cc5f 100644 Binary files a/lang/locale/pl_PL/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/pl_PL/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/pt_BR/LC_MESSAGES/rsyslogstach.mo b/lang/locale/pt_BR/LC_MESSAGES/rsyslogstach.mo index cac83cb..8cbf027 100644 Binary files a/lang/locale/pt_BR/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/pt_BR/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/ro_RO/LC_MESSAGES/rsyslogstach.mo b/lang/locale/ro_RO/LC_MESSAGES/rsyslogstach.mo index e78d388..cde22a5 100644 Binary files a/lang/locale/ro_RO/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/ro_RO/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/ru_RU/LC_MESSAGES/rsyslogstach.mo b/lang/locale/ru_RU/LC_MESSAGES/rsyslogstach.mo index 65f3422..9800bb2 100644 Binary files a/lang/locale/ru_RU/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/ru_RU/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/sv_SE/LC_MESSAGES/rsyslogstach.mo b/lang/locale/sv_SE/LC_MESSAGES/rsyslogstach.mo index 77485f7..12aadc9 100644 Binary files a/lang/locale/sv_SE/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/sv_SE/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/th_TH/LC_MESSAGES/rsyslogstach.mo b/lang/locale/th_TH/LC_MESSAGES/rsyslogstach.mo index 0c6d0e3..5ebc169 100644 Binary files a/lang/locale/th_TH/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/th_TH/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/tr_TR/LC_MESSAGES/rsyslogstach.mo b/lang/locale/tr_TR/LC_MESSAGES/rsyslogstach.mo index 8bdeadd..c9f2462 100644 Binary files a/lang/locale/tr_TR/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/tr_TR/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/uk_UA/LC_MESSAGES/rsyslogstach.mo b/lang/locale/uk_UA/LC_MESSAGES/rsyslogstach.mo index 008ff76..d03e02a 100644 Binary files a/lang/locale/uk_UA/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/uk_UA/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/vi_VN/LC_MESSAGES/rsyslogstach.mo b/lang/locale/vi_VN/LC_MESSAGES/rsyslogstach.mo index f319085..04d2736 100644 Binary files a/lang/locale/vi_VN/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/vi_VN/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/locale/zh_CN/LC_MESSAGES/rsyslogstach.mo b/lang/locale/zh_CN/LC_MESSAGES/rsyslogstach.mo index f8fd44b..f3ae143 100644 Binary files a/lang/locale/zh_CN/LC_MESSAGES/rsyslogstach.mo and b/lang/locale/zh_CN/LC_MESSAGES/rsyslogstach.mo differ diff --git a/lang/messages.pot b/lang/messages.pot index 4fa14b2..5938462 100644 --- a/lang/messages.pot +++ b/lang/messages.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -19,12 +19,12 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" +msgid "Indexation OpenSearch échouée définitivement erreur={error}" msgstr "" #: src/metrics.py diff --git a/lang/nb_NO.po b/lang/nb_NO.po index 4406c7a..5e6f32c 100644 --- a/lang/nb_NO.po +++ b/lang/nb_NO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Flere noder konfigurert ({hosts}), bare den første brukes" #: src/metrics.py #, python-brace-format diff --git a/lang/nl_NL.po b/lang/nl_NL.po index dac4dbe..417885a 100644 --- a/lang/nl_NL.po +++ b/lang/nl_NL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Meerdere knooppunten geconfigureerd ({hosts}), alleen de eerste wordt gebruikt" #: src/metrics.py #, python-brace-format diff --git a/lang/pl_PL.po b/lang/pl_PL.po index cecb831..cb120a8 100644 --- a/lang/pl_PL.po +++ b/lang/pl_PL.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Skonfigurowano kilka węzłów ({hosts}), używany jest tylko pierwszy" #: src/metrics.py #, python-brace-format diff --git a/lang/pt_BR.po b/lang/pt_BR.po index 7b96e3d..327cd5d 100644 --- a/lang/pt_BR.po +++ b/lang/pt_BR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Vários nós configurados ({hosts}), apenas o primeiro é usado" #: src/metrics.py #, python-brace-format diff --git a/lang/ro_RO.po b/lang/ro_RO.po index 0aa0760..52967f6 100644 --- a/lang/ro_RO.po +++ b/lang/ro_RO.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Mai multe noduri configurate ({hosts}), este folosit doar primul" #: src/metrics.py #, python-brace-format diff --git a/lang/ru_RU.po b/lang/ru_RU.po index a3a3c44..81b9fa8 100644 --- a/lang/ru_RU.po +++ b/lang/ru_RU.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Настроено несколько узлов ({hosts}), используется только первый" #: src/metrics.py #, python-brace-format diff --git a/lang/sv_SE.po b/lang/sv_SE.po index 5d747e3..9d8531a 100644 --- a/lang/sv_SE.po +++ b/lang/sv_SE.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Flera noder konfigurerade ({hosts}), endast den första används" #: src/metrics.py #, python-brace-format diff --git a/lang/th_TH.po b/lang/th_TH.po index 7312699..752e16e 100644 --- a/lang/th_TH.po +++ b/lang/th_TH.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "กำหนดค่าโหนดหลายตัวไว้ ({hosts}) ใช้เฉพาะตัวแรกเท่านั้น" #: src/metrics.py #, python-brace-format diff --git a/lang/tr_TR.po b/lang/tr_TR.po index f4b3b58..8707bd8 100644 --- a/lang/tr_TR.po +++ b/lang/tr_TR.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Birden fazla düğüm yapılandırıldı ({hosts}), yalnızca ilki kullanılıyor" #: src/metrics.py #, python-brace-format diff --git a/lang/uk_UA.po b/lang/uk_UA.po index e9d2429..07a93bb 100644 --- a/lang/uk_UA.po +++ b/lang/uk_UA.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Налаштовано кілька вузлів ({hosts}), використовується лише перший" #: src/metrics.py #, python-brace-format diff --git a/lang/vi_VN.po b/lang/vi_VN.po index e80afe6..f630616 100644 --- a/lang/vi_VN.po +++ b/lang/vi_VN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "Đã cấu hình nhiều nút ({hosts}), chỉ nút đầu tiên được sử dụng" #: src/metrics.py #, python-brace-format diff --git a/lang/zh_CN.po b/lang/zh_CN.po index 2ff1fcf..8a65e65 100644 --- a/lang/zh_CN.po +++ b/lang/zh_CN.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: RsysLogstach\n" "Report-Msgid-Bugs-To: https://github.com/Mathilde-Team/RsysLogstach/issues\n" -"POT-Creation-Date: 2026-11-03 16:32+0000\n" +"POT-Creation-Date: 2026-11-03 22:21+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -24,8 +24,8 @@ msgstr "" #: src/indexer.py #, python-brace-format -msgid "Indexation OpenSearch échouée erreur={error}" -msgstr "" +msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +msgstr "配置了多个节点 ({hosts}),仅使用第一个" #: src/metrics.py #, python-brace-format diff --git a/pyproject.toml b/pyproject.toml index 72ea091..c37a75f 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,17 +1,16 @@ [project] name = "rsyslogstach" -version = "0.9.0" +version = "0.10.0" description = "Pont rsyslog -> omprog (asyncio) -> OpenSearch, compatible schéma/filtres Logstash" license = "GPL-3.0-or-later" requires-python = ">=3.11" dependencies = [ "loguru>=0.7", - "opensearch-py[async]", "prometheus-client==0.26.0", # métriques /metrics (issue #35), version figée # Découpage #111 : la sémantique Logstash (gabarits, filtres, interprétation # des .conf, enrichissement) vit désormais dans PyStashTemplate, dépendance # figée sur le tag v0.1.0 — comme tout autre outil (…beat) pourrait le faire. - "pystashtemplate @ git+https://github.com/Mathilde-Team/PyStashTemplate.git@v0.1.0", + "pystashtemplate @ git+https://github.com/Mathilde-Team/PyStashTemplate.git@v0.2.0", ] [project.scripts] @@ -79,3 +78,4 @@ source = ["src", "scripts"] # déclaré ici seulement : lu par `pytest --cov` dans le job Qualité de ci.yml. fail_under = 95 show_missing = true + diff --git a/src/dlq.py b/src/dlq.py index d6504ff..70ac2ae 100644 --- a/src/dlq.py +++ b/src/dlq.py @@ -13,248 +13,20 @@ Ce module fournit la voie de sortie : `LocalDeadLetterQueue.write()` consigne le document dans un fichier JSONL local (une ligne par document, append-only) — voir `indexer.py::OpenSearchIndexer.send`, qui l'appelle -uniquement pour les erreurs identifiées comme permanentes (`RequestError`/ -`NotFoundError` d'opensearchpy, 400/404), jamais pour une erreur de -connexion ou un timeout (transitoires, comportement de retenue inchangé). -Ne dépend que de `tracing`, comme les autres modules feuilles du projet -(voir PATTERNS.md, "Absence de dépendances circulaires entre modules"). +uniquement pour les erreurs identifiées comme permanentes (statut +400/404), jamais pour une erreur de connexion ou un timeout +(transitoires, comportement de retenue inchangé). + +Migration #160 : l'implémentation a été portée telle quelle dans +PyStashTemplate (`pystashtemplate.dlq`, issue #11) pour que la sortie +OpenSearch référence (`outputs/opensearch.py`) partage EXACTEMENT le même +format et le même fichier que ce connecteur — ce module n'est plus qu'un +ré-export : même classe, mêmes fonctions, aucune perte à la migration +(les tests historiques du port continuent de passer tels quels). """ from __future__ import annotations -import asyncio -import gzip -import json -import re -import shutil -from datetime import datetime, timedelta, timezone -from pathlib import Path +from pystashtemplate.dlq import LocalDeadLetterQueue, parse_duration, parse_size -from loguru import logger -from pystashtemplate.tracing import traced - -_SIZE_UNITS = {"": 1, "b": 1, "k": 1024, "kb": 1024, "m": 1024**2, "mb": 1024**2, "g": 1024**3, "gb": 1024**3} -_DURATION_UNITS = {"s": 1, "m": 60, "h": 3600, "d": 86400, "w": 7 * 86400} -_ROTATED_SUFFIX = re.compile(r"\.(\d{8}T\d{6}Z)(?:-(\d+))?(\.gz)?$") - - -@traced -def parse_size(text: str) -> int: - """Taille lisible -> octets, pour `--dlq-max-size` (issue #27). - - Accepte un entier d'octets ou un suffixe binaire insensible à la casse : - ``100M``, ``100MB``, ``512k``, ``1G``. ``0`` désactive la rotation par - taille. - - Raises: - ValueError: valeur négative ou format non reconnu. - """ - match = re.fullmatch(r"\s*(\d+(?:\.\d+)?)\s*([a-zA-Z]*)\s*", text) - if not match or match.group(2).lower() not in _SIZE_UNITS: - raise ValueError(f"taille invalide : {text!r} (ex. 100M, 512k, 1G, 1048576)") - return int(float(match.group(1)) * _SIZE_UNITS[match.group(2).lower()]) - - -@traced -def parse_duration(text: str) -> timedelta: - """Durée lisible -> `timedelta`, pour `--dlq-max-age`/`--dlq-retention`. - - Formats : ``7d``, ``12h``, ``30m``, ``90s``, ``2w`` ; un entier seul est - compté en secondes. ``0`` désactive le critère. - - Raises: - ValueError: format non reconnu. - """ - match = re.fullmatch(r"\s*(\d+)\s*([smhdw]?)\s*", text.lower()) - if not match: - raise ValueError(f"durée invalide : {text!r} (ex. 7d, 12h, 30m, 90s)") - return timedelta(seconds=int(match.group(1)) * _DURATION_UNITS[match.group(2) or "s"]) - - -class LocalDeadLetterQueue: - """Consigne dans un fichier JSONL local les documents rejetés de façon permanente. - - Une ligne par document, format : - {"@dlq_timestamp": "", "@dlq_index": "", - "@dlq_error": "", "document": {...}} - - Rotation et purge (issue #27), toutes désactivées par défaut - (comportement historique : un seul fichier qui grandit) : - - - ``max_bytes`` : rotation avant d'écrire une ligne qui ferait dépasser - cette taille au fichier courant ; - - ``max_age`` : rotation quand la plus ancienne entrée du fichier - courant (``@dlq_timestamp`` de la 1re ligne, à défaut la date de - modification) est plus vieille que cette durée ; - - le fichier rotaté est renommé ``.[-n]`` et - compressé en gzip (``.gz``) si ``compress`` (défaut) ; - - ``backups`` : nombre maximal de fichiers rotatés conservés (les plus - anciens sont supprimés) ; ``retention`` : âge maximal d'un fichier - rotaté. La purge suit chaque rotation et peut être lancée seule - (``purge()``). - - Les fichiers rotatés restent des JSONL (``zcat`` pour les relire) : - même usage de relecture/réindexation manuelle une fois la cause du - rejet corrigée (ex. mapping de l'index ajusté). L'écriture se fait dans un thread séparé (`asyncio.to_thread`) - pour ne jamais bloquer la boucle asyncio d'`omprog` le temps d'un appel - système disque, cohérent avec le reste du projet (voir CLAUDE.md, - session 4, passage du modèle à threads vers asyncio). - """ - - @traced - def __init__( - self, - path: str, - *, - max_bytes: int = 0, - max_age: timedelta | None = None, - backups: int = 0, - retention: timedelta | None = None, - compress: bool = True, - ) -> None: - """Prépare le chemin du fichier DLQ (dossier parent créé si besoin). - - Args: - path: Chemin du fichier JSONL, créé (ou complété s'il existe - déjà) au premier appel à `write`. - max_bytes: Taille déclenchant la rotation (0 = jamais). - max_age: Âge de la plus ancienne entrée déclenchant la rotation - (None ou 0 = jamais). - backups: Fichiers rotatés conservés au maximum (0 = tous). - retention: Âge maximal d'un fichier rotaté (None ou 0 = illimité). - compress: Compresser les fichiers rotatés en gzip. - - Raises: - ValueError: valeur négative. - """ - if max_bytes < 0 or backups < 0: - raise ValueError("max_bytes et backups doivent être positifs ou nuls") - for name, value in (("max_age", max_age), ("retention", retention)): - if value is not None and value < timedelta(0): - raise ValueError(f"{name} doit être positif ou nul") - self._path = Path(path) - self._path.parent.mkdir(parents=True, exist_ok=True) - self._max_bytes = max_bytes - self._max_age = max_age or None - self._backups = backups - self._retention = retention or None - self._compress = compress - - @traced - async def write(self, doc: dict, *, index: str, error: str) -> None: - """Ajoute une ligne JSON au fichier DLQ pour ce document. - - Args: - doc: Document qui aurait dû être indexé. - index: Nom d'index OpenSearch visé au moment de l'échec. - error: Message d'erreur (`str(exception)`), à titre indicatif - seulement — jamais reparsé, jamais utilisé pour décider quoi - que ce soit. - """ - entry = { - "@dlq_timestamp": datetime.now(timezone.utc).isoformat(), - "@dlq_index": index, - "@dlq_error": error, - "document": doc, - } - line = json.dumps(entry, ensure_ascii=False) + "\n" - await asyncio.to_thread(self._append, line) - - @traced - def _append(self, line: str) -> None: - """Écriture disque proprement dite (appelée hors boucle asyncio, voir `write`).""" - if self._should_rotate(len(line.encode("utf-8"))): - self.rotate() - with self._path.open("a", encoding="utf-8") as handle: - handle.write(line) - - @traced - def _oldest_entry_time(self) -> datetime: - """Horodatage de la 1re ligne du fichier courant (date de modification à défaut).""" - try: - with self._path.open(encoding="utf-8") as handle: - first = handle.readline() - stamp = datetime.fromisoformat(json.loads(first)["@dlq_timestamp"]) - if stamp.tzinfo is None: - stamp = stamp.replace(tzinfo=timezone.utc) - return stamp - except (ValueError, KeyError, TypeError) as exc: - logger.debug("_oldest_entry_time : nom illisible, date de modification retenue : {}", exc) - return datetime.fromtimestamp(self._path.stat().st_mtime, timezone.utc) - - @traced - def _should_rotate(self, incoming: int) -> bool: - """Vrai si le fichier courant doit être rotaté avant d'y ajouter `incoming` octets.""" - if not self._path.exists() or self._path.stat().st_size == 0: - return False - if self._max_bytes and self._path.stat().st_size + incoming > self._max_bytes: - return True - if self._max_age and datetime.now(timezone.utc) - self._oldest_entry_time() >= self._max_age: - return True - return False - - @traced - def rotated_files(self) -> list[Path]: - """Fichiers rotatés existants, du plus ancien au plus récent.""" - found = [] - for candidate in self._path.parent.glob(self._path.name + ".*"): - match = _ROTATED_SUFFIX.fullmatch(candidate.name[len(self._path.name) :]) - if match: - found.append((match.group(1), int(match.group(2) or 0), candidate)) - return [path for _stamp, _n, path in sorted(found)] - - @traced - def rotate(self) -> Path | None: - """Rotation immédiate du fichier courant puis purge. - - Returns: - Chemin du fichier rotaté, ou None si le fichier courant est - absent ou vide. - """ - if not self._path.exists() or self._path.stat().st_size == 0: - return None - stamp = datetime.now(timezone.utc).strftime("%Y%m%dT%H%M%SZ") - suffix = ".gz" if self._compress else "" - # Compteur strictement croissant dans la même seconde, même si la - # purge a supprimé les plus anciens : l'ordre des noms reste l'ordre - # chronologique (sur lequel s'appuie la purge par `backups`). - same_second = [ - int(m.group(2) or 0) - for p in self.rotated_files() - if (m := _ROTATED_SUFFIX.fullmatch(p.name[len(self._path.name) :])) and m.group(1) == stamp - ] - counter = max(same_second) + 1 if same_second else 0 - name = f"{self._path.name}.{stamp}" + (f"-{counter}" if counter else "") - target = self._path.with_name(name + suffix) - if self._compress: - with self._path.open("rb") as src, gzip.open(target, "wb") as dst: - shutil.copyfileobj(src, dst) - self._path.unlink() - else: - self._path.rename(target) - self.purge() - return target - - @traced - def purge(self) -> list[Path]: - """Supprime les fichiers rotatés au-delà de `backups` ou plus vieux que `retention`. - - Returns: - Fichiers supprimés. - """ - rotated = self.rotated_files() - doomed: list[Path] = [] - if self._retention: - limit = datetime.now(timezone.utc) - self._retention - for path in rotated: - stamp = datetime.strptime( - _ROTATED_SUFFIX.fullmatch(path.name[len(self._path.name) :]).group(1), "%Y%m%dT%H%M%SZ" - ).replace(tzinfo=timezone.utc) - if stamp < limit: - doomed.append(path) - if self._backups: - kept = [p for p in rotated if p not in doomed] - doomed.extend(kept[: max(0, len(kept) - self._backups)]) - for path in doomed: - path.unlink(missing_ok=True) - return doomed +__all__ = ["LocalDeadLetterQueue", "parse_duration", "parse_size"] diff --git a/src/indexer.py b/src/indexer.py index 64ee9f0..90c7f8f 100644 --- a/src/indexer.py +++ b/src/indexer.py @@ -8,12 +8,22 @@ `enrichment` (aucune raison pour l'indexation de connaître les filtres d'extraction ou l'enrichissement). -Fix de cohérence (session 13, constaté en touchant ce fichier pour la DLQ) : -`@traced` (voir PATTERNS.md, "Traçabilité systématique des fonctions") -n'était appliqué à AUCUNE fonction de ce module jusqu'ici, contrairement à -la convention "toutes les fonctions du projet" en place depuis la session -9 — un oubli de la réorganisation de cette session-là, pas une exception -volontaire. Ajouté ci-dessous à toutes les méthodes. +Migration #160 : le client opensearch-py est remplacé par la sortie +`OpenSearchOutput` de PyStashTemplate (issue #12, client `_bulk` commun +de l'issue #11). Ce module garde SA signature (build_bridge ne change +pas) et son contrat (`SendOutcome`, DLQ, fingerprint, gabarit) — il +traduit les options du connecteur en options de sortie, délègue l'envoi +et mappe les résultats. Le format de la DLQ et le fichier sont +strictement identiques (le port `pystashtemplate.dlq` EST l'ancien +`rsyslogstach.dlq`) : aucune perte à la migration. + +Parité documentée (voir `outputs/opensearch.py` côté PyStashTemplate) : +l'option `hosts` du connecteur pouvait porter PLUSIEURS nœuds (le +transport opensearch-py faisait le failover) ; la sortie n'en utilise +qu'un seul (première entrée) — le failover revient à l'appelant +(rsyslog retient le message, `SendOutcome.RETRYABLE`). De même, +`pipeline` est désormais transmis aussi pour `update`/`delete` (l'ancien +client l'ignorait silencieusement pour ces actions). """ from __future__ import annotations @@ -23,9 +33,12 @@ from typing import Any from loguru import logger -from opensearchpy import AsyncOpenSearch -from opensearchpy.exceptions import NotFoundError, OpenSearchException, RequestError from pystashtemplate.fingerprint import compute_fingerprint +from pystashtemplate.outputs.elasticsearch_bulk import ( + ActionInvalideError as _ActionSortieInvalide, +) +from pystashtemplate.outputs.elasticsearch_bulk import SendOutcome as _SortieOutcome +from pystashtemplate.outputs.opensearch import OpenSearchOutput from pystashtemplate.templates import CompiledTemplate, compile_template, render from pystashtemplate.tracing import traced @@ -34,14 +47,6 @@ OPENSEARCH_TIMEOUT = 3.0 # secondes, timeout socket du client OpenSearch -# Erreurs considérées comme permanentes (jamais transitoires) : un document -# qui provoque l'une d'elles ne deviendra jamais indexable en le rejouant -# tel quel (RequestError = 400, ex. type de champ incompatible avec le -# mapping de l'index ; NotFoundError = 404). Toute autre OpenSearchException -# (ConnectionError, ConnectionTimeout, erreur 5xx...) reste traitée comme -# transitoire, comportement inchangé. -_PERMANENT_ERRORS = (RequestError, NotFoundError) - # Issue #126 : actions `bulk` du plugin de sortie Logstash. ACTIONS = ("index", "create", "update", "delete") @@ -88,11 +93,11 @@ class OpenSearchIndexer: d'indexer avec un `_id` vide. dlq (session 13) : si fourni, un échec d'indexation identifié comme - PERMANENT (voir `_PERMANENT_ERRORS`) est écrit dans cette dead letter - queue locale plutôt que rendu indéfiniment à rsyslog — voir `dlq.py` - et `SendOutcome`. Sans `dlq` (défaut), comportement historique - inchangé : toute `OpenSearchException`, permanente ou non, retombe sur - `SendOutcome.RETRYABLE`. + PERMANENT (statut 400/404, action invalide — voir la sortie + PyStashTemplate) est écrit dans cette dead letter queue locale plutôt + que rendu indéfiniment à rsyslog — voir `dlq.py` et `SendOutcome`. + Sans `dlq` (défaut), comportement historique inchangé : tout échec, + permanent ou non, retombe sur `SendOutcome.RETRYABLE`. document_id_fingerprint_fields (session 17, `fingerprint.py`) : si fourni (même une liste vide), un `_id` déterministe est dérivé d'un @@ -124,14 +129,16 @@ def __init__( client_cert: str | None = None, client_key: str | None = None, ) -> None: - """Initialise le client OpenSearch. + """Initialise la sortie OpenSearch de PyStashTemplate. Args: - hosts: Liste de nœuds, ex. [{"host": "127.0.0.1", "port": 9200}]. + hosts: Liste de nœuds, ex. [{"host": "127.0.0.1", "port": 9200}] + — seule la PREMIÈRE entrée est utilisée (failover à + l'appelant, voir la docstring du module). auth: Couple (utilisateur, mot de passe), ou None si non authentifié. index_pattern: Motif strftime du nom d'index quotidien (ex. "switch-logs-%Y.%m.%d"). - use_ssl: Utiliser HTTPS pour se connecter aux nœuds. + use_ssl: Utiliser HTTPS pour se connecter au nœud. verify_certs: Vérifier les certificats TLS (à désactiver seulement pour un cluster interne à certificat auto-signé). document_id_template: Gabarit Logstash optionnel (voir la @@ -163,32 +170,46 @@ def __init__( self._document_id_fingerprint_method = document_id_fingerprint_method self._document_id_fingerprint_key = document_id_fingerprint_key self._dlq = dlq - # Failover multi-nœuds (issue #37) : le transport opensearch-py - # retente le nœud suivant en cas d'échec de connexion. `retry_on_timeout` - # étend ce repli aux délais d'attente (défaut de la bibliothèque : - # False — un timeout ne basculait PAS sur le nœud suivant). - self._client = AsyncOpenSearch( - hosts=hosts, - http_auth=auth, - use_ssl=use_ssl, - verify_certs=verify_certs, - ssl_show_warn=False, - ca_certs=ca_certs, - client_cert=client_cert, - client_key=client_key, - timeout=OPENSEARCH_TIMEOUT, - retry_on_timeout=True, - ) + if len(hosts) > 1: + logger.warning( + _("Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé"), + hosts=len(hosts), + ) + noeud = hosts[0] + scheme = "https" if use_ssl else "http" + options: dict[str, Any] = { + "hosts": f"{scheme}://{noeud['host']}:{noeud['port']}", + "index": index_pattern, + "ssl": verify_certs, + "timeout": OPENSEARCH_TIMEOUT, + # Un document par lot : l'accusé de réception est TOUJOURS + # réel (jamais EN_ATTENTE), comme l'ancien client qui + # envoyait chaque document individuellement. + "batch_size": 1, + # retry_max=0 : parité avec l'ancien indexer, qui ne retentait + # PAS lui-même (le transport opensearch-py retentait au pire + # une fois par nœud) — le retour à rsyslog (RETRYABLE) reste + # le mécanisme de réessai. + "retry_max": 0, + } + if auth is not None: + options["user"], options["password"] = auth + if ca_certs is not None: + options["cacert"] = ca_certs + if client_cert is not None: + options["ssl_certificate"] = client_cert + if client_key is not None: + options["ssl_key"] = client_key + self.sortie = OpenSearchOutput(options, dlq=dlq) @traced async def health(self) -> dict[str, Any]: """Interroge le cluster (GET /) : sa version, ou lève l'erreur. - Utilisé par le health check périodique d'omprog (issue #37). Le - failover d'un nœud à l'autre, lui, est géré par le transport - opensearch-py à chaque requête (voir `__init__`). + Utilisé par le health check périodique d'omprog (issue #37) — + délégue à `OpenSearchOutput.health`. """ - return await self._client.info() + return await self.sortie.health() @traced def _current_index(self) -> str: @@ -221,45 +242,14 @@ def _document_id(self, doc: dict) -> str | None: return rendered or None @traced - async def _executer( - self, - action: str, - index: str, - doc: dict, - document_id: str | None, - params: dict[str, str], - *, - doc_as_upsert: bool, - ) -> None: - """Appelle l'API OpenSearch qui correspond à `action` (#126). + async def _client(self): + """Client httpx paresseux de la sortie (couture d'omprog : template d'index). - `index` et `create` passent par l'API index (`op_type=create` pour - `create`) et acceptent `pipeline` et `routing` ; `update` et - `delete` exigent un `_id` et n'acceptent que `routing`, comme les - API `_update` et `_doc` DELETE. - - Raises: - ActionInvalideError: Action inconnue, ou `_id` manquant. + Le client est partagé avec `send` (il est recréé paresseusement + après une fermeture) — l'appelant qui le ferme doit savoir que + le prochain envoi le rouvrira. """ - if action not in ACTIONS: - raise ActionInvalideError(f"action inconnue : {action!r}") - if action in ("index", "create"): - if action == "create": - params = {**params, "op_type": "create"} - await self._client.index(index=index, body=doc, id=document_id, **params) - return - if not document_id: - raise ActionInvalideError(f"l'action {action} exige document_id") - routage = {k: v for k, v in params.items() if k == "routing"} - if len(routage) != len(params): - logger.debug("_executer: pipeline ignoré pour l'action {}", action) - if action == "update": - corps: dict[str, Any] = {"doc": doc} - if doc_as_upsert: - corps["doc_as_upsert"] = True - await self._client.update(index=index, id=document_id, body=corps, **routage) - else: - await self._client.delete(index=index, id=document_id, **routage) + return self.sortie._client_http() @traced async def send( @@ -273,7 +263,7 @@ async def send( routing: str | None = None, doc_as_upsert: bool = False, ) -> SendOutcome: - """Indexe un document dans OpenSearch. + """Indexe un document dans OpenSearch (via `OpenSearchOutput.envoyer`). Args: doc: Document déjà enrichi, prêt à indexer. @@ -305,21 +295,32 @@ async def send( """ resolved_index = index or self._current_index() resolved_id = document_id or self._document_id(doc) - params = {k: v for k, v in (("pipeline", pipeline), ("routing", routing)) if v} try: - await self._executer(action, resolved_index, doc, resolved_id, params, doc_as_upsert=doc_as_upsert) - return SendOutcome.INDEXED - except (*_PERMANENT_ERRORS, ActionInvalideError) as exc: + outcome = await self.sortie.envoyer( + doc, + index=resolved_index, + document_id=resolved_id, + action=action, + pipeline=pipeline, + routing=routing, + doc_as_upsert=doc_as_upsert, + ) + except _ActionSortieInvalide as exc: + # La sortie valide l'action de façon synchrone (elle ne peut + # pas tamponner un document sans `_id` pour `update`/ + # `delete`) : même chemin permanent que l'ancien `_executer`. logger.warning(_("Indexation OpenSearch échouée définitivement erreur={error}"), error=exc) if self._dlq is not None: await self._dlq.write(doc, index=resolved_index, error=str(exc)) return SendOutcome.DEAD_LETTERED return SendOutcome.RETRYABLE - except OpenSearchException as exc: - logger.warning(_("Indexation OpenSearch échouée erreur={error}"), error=exc) - return SendOutcome.RETRYABLE + if outcome is _SortieOutcome.DEAD_LETTERED: + return SendOutcome.DEAD_LETTERED + if outcome is _SortieOutcome.INDEXED: + return SendOutcome.INDEXED + return SendOutcome.RETRYABLE @traced async def close(self) -> None: - """Ferme proprement le client OpenSearch.""" - await self._client.close() + """Ferme proprement la sortie (et son client HTTP).""" + await self.sortie.close() diff --git a/src/omprog.py b/src/omprog.py index f221c4c..667aa65 100644 --- a/src/omprog.py +++ b/src/omprog.py @@ -311,7 +311,9 @@ async def handle_doc(self, doc: dict[str, Any]) -> SendOutcome | None: return await self._send(doc) outcome: SendOutcome | None = None # #141 : clone/split produisent plusieurs événements, tous indexés. - for event, actions in self.interpreter.apply_events(doc, on_missing=self.pipeline_on_missing): + # apply_events est asynchrone depuis PyStashTemplate #34 : même + # sémantique, l'appelant attend désormais la liste. + for event, actions in await self.interpreter.apply_events(doc, on_missing=self.pipeline_on_missing): result = await self._send_event(event, actions) if result is SendOutcome.RETRYABLE or outcome is None: outcome = result @@ -464,12 +466,22 @@ def build_bridge(args: argparse.Namespace, *, indexer_factory: Callable[..., Any @traced async def install_index_template(client: Any, name: str, path: str) -> None: - """Installe l'index template (composable si `index_patterns` + `template`, sinon ancien format).""" + """Installe l'index template (composable si `index_patterns` + `template`, sinon ancien format). + + Migration #160 : `client` est le client httpx de la sortie + PyStashTemplate (voir `OpenSearchIndexer._client`) — les API + `_index_template`/`_template` du produit sont appelées telles + quelles, en JSON, sans le client opensearch-py historique. Le client + n'est PAS fermé ici : il est partagé avec `send` (la sortie le recrée + paresseusement si besoin, mais il sert juste après). + """ body = load_json_file(path) if "template" in body: - await client.indices.put_index_template(name=name, body=body) + chemin = f"_index_template/{name}" else: - await client.indices.put_template(name=name, body=body) + chemin = f"_template/{name}" + reponse = await client.put(chemin, json=body) + reponse.raise_for_status() logger.info(_("Index template installé nom={name}"), name=name) @@ -566,7 +578,7 @@ async def amain(args: argparse.Namespace) -> int: """Construit le pont, installe l'index template, sert jusqu'à l'arrêt.""" bridge = build_bridge(args) if args.index_template: - await install_index_template(bridge.indexer._client, args.index_template_name, args.index_template) + await install_index_template(await bridge.indexer._client(), args.index_template_name, args.index_template) stop = asyncio.Event() loop = asyncio.get_running_loop() for sig in (signal.SIGTERM, signal.SIGINT): diff --git a/tests/test_actions_sortie.py b/tests/test_actions_sortie.py index 792cacd..4de723f 100644 --- a/tests/test_actions_sortie.py +++ b/tests/test_actions_sortie.py @@ -1,14 +1,23 @@ # SPDX-License-Identifier: GPL-3.0-or-later -"""Issue #126 : `action`, `pipeline` et `routing` des sorties opensearch d'un `.conf`.""" +"""Issue #126 : `action`, `pipeline` et `routing` des sorties opensearch d'un `.conf`. + +Issue #160 : l'envoi passe par la sortie `OpenSearchOutput` de +PyStashTemplate (API `_bulk`, NDJSON) — le double reconstruit les appels +façon client historique (méthode + arguments) en décodant le NDJSON et +les paramètres de requête, pour garder les assertions d'avant la +migration. Changement documenté : `pipeline` est désormais transmis +AUSI pour `update`/`delete` (l'ancien client l'ignorait silencieusement). +""" from __future__ import annotations import asyncio +import json from pathlib import Path from typing import Any +import httpx import pytest -from opensearchpy.exceptions import NotFoundError from test_integration import _read_dlq, make_bridge from indexer import ACTIONS, SendOutcome @@ -16,36 +25,74 @@ class ClientActions: - """Double d'AsyncOpenSearch qui enregistre chaque appel (méthode, arguments).""" - - def __init__(self, erreur: Exception | None = None) -> None: - self.appels: list[tuple[str, dict[str, Any]]] = [] - self.erreur = erreur - - async def _appel(self, methode: str, **kwargs: Any) -> None: - if self.erreur is not None: - raise self.erreur - self.appels.append((methode, kwargs)) + """Double du serveur OpenSearch qui enregistre chaque envoi (méthode, arguments). - async def index(self, **kwargs: Any) -> None: - await self._appel("index", **kwargs) + Décode le NDJSON `_bulk` (ligne d'action + document) et les + paramètres de requête (`pipeline`), et les remet en forme comme les + appels du client opensearch-py historique (`index`/`update`/`delete`). + `erreur_http` (statut) simule une réponse en erreur du serveur. + """ - async def update(self, **kwargs: Any) -> None: - await self._appel("update", **kwargs) - - async def delete(self, **kwargs: Any) -> None: - await self._appel("delete", **kwargs) - - async def close(self) -> None: - return None + def __init__(self, erreur_http: int | None = None) -> None: + self.appels: list[tuple[str, dict[str, Any]]] = [] + self.erreur_http = erreur_http + self.transport = httpx.MockTransport(self._handler) + + def brancher(self, indexer: Any) -> None: + """Branche ce double sur la sortie de l'indexer (couture de test).""" + indexer.sortie._transport = self.transport + + def _handler(self, request: httpx.Request) -> httpx.Response: + pipeline = request.url.params.get("pipeline") + lignes = [json.loads(ligne) for ligne in request.content.decode().splitlines() if ligne] + actions_reponse: list[str] = [] + i = 0 + while i < len(lignes): + ((action, meta),) = lignes[i].items() + actions_reponse.append(action) + kwargs: dict[str, Any] = {"index": meta.get("_index")} + if meta.get("_id"): + kwargs["id"] = meta["_id"] + if meta.get("routing"): + kwargs["routing"] = meta["routing"] + if action == "update": + corps: dict[str, Any] = lignes[i + 1] + kwargs["body"] = corps + if pipeline: + kwargs["pipeline"] = pipeline + i += 2 + else: + if action == "delete": + if pipeline: + kwargs["pipeline"] = pipeline + else: + if pipeline: + kwargs["pipeline"] = pipeline + if action == "create": + # L'API _bulk encode « create » comme action ; le + # client historique appelait index(op_type=create). + action = "index" + kwargs["op_type"] = "create" + kwargs["body"] = lignes[i + 1] + kwargs.setdefault("id", None) + i += 2 if action != "delete" else 1 + self.appels.append((action, kwargs)) + if self.erreur_http is not None: + return httpx.Response(self.erreur_http, json={"error": {"type": "simulation"}}) + return httpx.Response(200, json={"items": [{a: {"status": 201}} for a in actions_reponse]}) def _envoyer(tmp_path: Path, sortie: str, doc: dict[str, Any], client: ClientActions | None = None) -> Any: bridge, _ = make_bridge(tmp_path, pipeline_conf=f'output {{ opensearch {{ index => "i" {sortie} }} }}') client = client or ClientActions() - bridge.indexer._client = client - resultat = asyncio.run(bridge.handle_doc(doc)) - return resultat, client.appels + client.brancher(bridge.indexer) + + async def scenario() -> Any: + resultat = await bridge.handle_doc(doc) + await bridge.close() + return resultat + + return asyncio.run(scenario()), client.appels def test_index_par_defaut_sans_parametres_en_plus(tmp_path: Path) -> None: @@ -72,11 +119,22 @@ def test_create_pipeline_routing_en_gabarits(tmp_path: Path) -> None: ] -def test_update_doc_as_upsert_et_pipeline_ignore(tmp_path: Path) -> None: +def test_update_doc_as_upsert_et_pipeline_transmis(tmp_path: Path) -> None: + """Changement documenté (#160) : `pipeline` est transmis aussi pour + `update` (l'ancien client l'ignorait silencieusement).""" sortie = 'action => "update" document_id => "%{id}" doc_as_upsert => true routing => "r" pipeline => "p"' _, appels = _envoyer(tmp_path, sortie, {"id": "7"}) assert appels == [ - ("update", {"index": "i", "id": "7", "body": {"doc": {"id": "7"}, "doc_as_upsert": True}, "routing": "r"}) + ( + "update", + { + "index": "i", + "id": "7", + "body": {"doc": {"id": "7"}, "doc_as_upsert": True}, + "routing": "r", + "pipeline": "p", + }, + ) ] _, appels = _envoyer(tmp_path, 'action => "update" document_id => "7"', {"v": 1}) assert appels == [("update", {"index": "i", "id": "7", "body": {"doc": {"v": 1}}})] @@ -99,7 +157,8 @@ def test_action_invalide_en_dlq(tmp_path: Path, sortie: str) -> None: def test_delete_introuvable_est_permanent(tmp_path: Path) -> None: - client = ClientActions(NotFoundError(404, "not_found", {})) + """Un 404 (statut permanent, comme le NotFoundError historique) : DLQ.""" + client = ClientActions(erreur_http=404) resultat, _ = _envoyer(tmp_path, 'action => "delete" document_id => "7"', {"v": 1}, client) assert resultat is SendOutcome.DEAD_LETTERED diff --git a/tests/test_integration.py b/tests/test_integration.py index 2377204..4068dd3 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -1,10 +1,13 @@ # SPDX-License-Identifier: GPL-3.0-or-later """Test d'intégration bout en bout (issue #30) : ligne rsyslog → omprog -(Bridge) → filters → enrichment → pipeline → indexer → client OpenSearch factice. +(Bridge) → filters → enrichment → pipeline → indexer → serveur OpenSearch factice. -Seul le CLIENT OpenSearch (réseau) est substitué : `build_parser`, +Seul le SERVEUR OpenSearch (réseau) est substitué : `build_parser`, `build_bridge`, `FilterPipeline`, enrichisseurs, `PipelineInterpreter`, -`OpenSearchIndexer` (fingerprint, DLQ) sont les composants réels. Valide : +`OpenSearchIndexer` (fingerprint, DLQ) sont les composants réels — +l'indexer délègue à la sortie `OpenSearchOutput` de PyStashTemplate +(issue #160), substituée par un `httpx.MockTransport` (couture de test +de la sortie, même rôle que l'ancien `FakeOpenSearchClient`). Valide : - le flux nominal (ligne JSON → filtres → enrichissement → indexation) ; - le drop par filtre (acquittement « OK », rien d'indexé) ; @@ -14,6 +17,9 @@ - l'idempotence du fingerprint en ré-émission (même `_id`) ; - le pipeline `.conf` avec `output{}` (surcharge d'index) ; - un débit minimal (200 messages, garde-fou de non-régression grossière). + +Un client httpx est lié à sa boucle d'événements : chaque scénario tient +dans UN SEUL `asyncio.run` (envois ET fermeture du pont). """ from __future__ import annotations @@ -24,43 +30,52 @@ from pathlib import Path from typing import Any +import httpx import pytest -from opensearchpy.exceptions import OpenSearchException, RequestError from indexer import OpenSearchIndexer, SendOutcome from omprog import ACK_OK, ACK_RETRY, build_bridge, build_parser, health_check_loop -class FakeOpenSearchClient: - """Double du client AsyncOpenSearch : enregistre ou échoue selon `mode`. +class FauxOpenSearch: + """Double du serveur OpenSearch : enregistre ou échoue selon `mode`. - Modes : "ok" (enregistre l'appel), "4xx" (RequestError — erreur - permanente de `_PERMANENT_ERRORS`), "transient" (OpenSearchException - générique — échec transitoire). + Modes : "ok" (enregistre l'appel `_bulk`), "4xx" (400 — erreur + permanente, ex. mapping), "transient" (500 — échec transitoire). + Reconstruit les tuples (index, document, _id) de l'ancien + `FakeOpenSearchClient` en décodant le NDJSON reçu. """ def __init__(self) -> None: self.calls: list[tuple[str | None, dict[str, Any], str | None]] = [] self.mode = "ok" - self.closed = False self.health_checks = 0 - - async def index(self, *, index: str, body: dict[str, Any], id: str | None) -> None: + self.transport = httpx.MockTransport(self._handler) + + def brancher(self, indexer: OpenSearchIndexer) -> None: + """Branche ce faux serveur sur la sortie de l'indexer (seul substitut : le réseau).""" + indexer.sortie._transport = self.transport + + def _handler(self, request: httpx.Request) -> httpx.Response: + if request.method == "GET": + # GET / : health check (issue #37). + self.health_checks += 1 + if self.mode == "transient": + return httpx.Response(500) + return httpx.Response(200, json={"version": {"number": "2.19.0-test"}}) + # POST /_bulk : ligne d'action NDJSON + document. + lignes = [json.loads(ligne) for ligne in request.content.decode().splitlines() if ligne] + actions: list[str] = [] + for i in range(0, len(lignes), 2): + ((action, meta),) = lignes[i].items() + actions.append(action) + doc = lignes[i + 1] if action != "delete" and i + 1 < len(lignes) else {} + self.calls.append((meta.get("_index"), doc, meta.get("_id"))) if self.mode == "4xx": - raise RequestError(400, "parse_exception", {}) - if self.mode == "transient": - raise OpenSearchException("connection timeout (test)") - self.calls.append((index, body, id)) - - async def close(self) -> None: - self.closed = True - - async def info(self) -> dict[str, Any]: - # Endpoint GET / (health check, issue #37). + return httpx.Response(400, json={"error": {"type": "parse_exception"}}) if self.mode == "transient": - raise OpenSearchException("connection refused (test)") - self.health_checks += 1 - return {"version": {"number": "2.19.0-test"}} + return httpx.Response(500) + return httpx.Response(200, json={"items": [{a: {"status": 201}} for a in actions]}) def make_bridge( @@ -71,9 +86,9 @@ def make_bridge( fingerprint: str | None = None, pipeline_conf: str | None = None, dlq: bool = True, -) -> tuple[Any, FakeOpenSearchClient]: +) -> tuple[Any, FauxOpenSearch]: """Passe par les VRAIS build_parser/build_bridge (options CLI réelles), - puis substitue uniquement le client réseau de l'indexeur.""" + puis substitue uniquement le serveur réseau de la sortie.""" argv = ["--opensearch-host", "https://localhost:9200", "--no-verify-certs", "--log-level", "ERROR"] if filters is not None: p = tmp_path / "filters.json" @@ -93,8 +108,8 @@ def make_bridge( argv += ["--dlq-path", str(tmp_path / "dlq.jsonl")] args = build_parser().parse_args(argv) bridge = build_bridge(args) - fake = FakeOpenSearchClient() - bridge.indexer._client = fake # seul substitut : le réseau + fake = FauxOpenSearch() + fake.brancher(bridge.indexer) # seul substitut : le réseau return bridge, fake @@ -120,9 +135,13 @@ def test_ligne_valide_filtree_enrichie_indexee(self, tmp_path: Path) -> None: enrich_dict={"srv1": {"site": "strasbourg"}}, ) line = json.dumps({"hostname": "srv1", "message": "app1 INFO connexion ok"}) - reply = asyncio.run(bridge.handle_line(line)) - asyncio.run(bridge.close()) - assert reply == ACK_OK + + async def scenario() -> str: + reply = await bridge.handle_line(line) + await bridge.close() + return reply + + assert asyncio.run(scenario()) == ACK_OK assert len(fake.calls) == 1 index, body, doc_id = fake.calls[0] # Index quotidien selon le motif par défaut. @@ -138,19 +157,27 @@ def test_drop_par_filtre_acquitte_sans_indexer(self, tmp_path: Path) -> None: tmp_path, filters=[{"type": "drop", "source": "message", "words": ["healthcheck"], "mode": "contains"}], ) - reply = asyncio.run(bridge.handle_line(json.dumps({"message": "app1 INFO healthcheck"}))) - asyncio.run(bridge.close()) - assert reply == ACK_OK + + async def scenario() -> str: + reply = await bridge.handle_line(json.dumps({"message": "app1 INFO healthcheck"})) + await bridge.close() + return reply + + assert asyncio.run(scenario()) == ACK_OK assert fake.calls == [] class TestJsonInvalide: def test_json_invalide_vers_dlq_et_acquitte(self, tmp_path: Path) -> None: bridge, fake = make_bridge(tmp_path) - reply = asyncio.run(bridge.handle_line("ceci n'est pas du JSON")) - asyncio.run(bridge.close()) + + async def scenario() -> str: + reply = await bridge.handle_line("ceci n'est pas du JSON") + await bridge.close() + return reply + # Acquitté « OK » : renvoyer ne rendrait pas le message lisible. - assert reply == ACK_OK + assert asyncio.run(scenario()) == ACK_OK assert fake.calls == [] entries = _read_dlq(tmp_path) assert len(entries) == 1 @@ -162,10 +189,14 @@ class TestErreursOpenSearch: def test_erreur_4xx_permanente_vers_dlq(self, tmp_path: Path) -> None: bridge, fake = make_bridge(tmp_path, fingerprint="hostname") fake.mode = "4xx" - reply = asyncio.run(bridge.handle_line(json.dumps({"hostname": "srv1", "message": "x"}))) - asyncio.run(bridge.close()) + + async def scenario() -> str: + reply = await bridge.handle_line(json.dumps({"hostname": "srv1", "message": "x"})) + await bridge.close() + return reply + # Décision définitive : DLQ + « OK » (pas de renvoi en boucle). - assert reply == ACK_OK + assert asyncio.run(scenario()) == ACK_OK entries = _read_dlq(tmp_path) assert len(entries) == 1 assert entries[0]["@dlq_index"].startswith("switch-logs-") @@ -175,16 +206,24 @@ def test_erreur_4xx_sans_dlq_renvoie_a_rsyslog(self, tmp_path: Path) -> None: # Sans --dlq-path : comportement historique, l'échec reste RETRYABLE. bridge, fake = make_bridge(tmp_path, dlq=False) fake.mode = "4xx" - reply = asyncio.run(bridge.handle_line(json.dumps({"hostname": "srv1"}))) - asyncio.run(bridge.close()) - assert reply == ACK_RETRY + + async def scenario() -> str: + reply = await bridge.handle_line(json.dumps({"hostname": "srv1"})) + await bridge.close() + return reply + + assert asyncio.run(scenario()) == ACK_RETRY def test_erreur_transitoire_renvoie_a_rsyslog(self, tmp_path: Path) -> None: bridge, fake = make_bridge(tmp_path) fake.mode = "transient" - reply = asyncio.run(bridge.handle_line(json.dumps({"hostname": "srv1"}))) - asyncio.run(bridge.close()) - assert reply == ACK_RETRY + + async def scenario() -> str: + reply = await bridge.handle_line(json.dumps({"hostname": "srv1"})) + await bridge.close() + return reply + + assert asyncio.run(scenario()) == ACK_RETRY class TestFingerprintIdempotence: @@ -194,49 +233,100 @@ def test_reemission_meme_id(self, tmp_path: Path) -> None: bridge, fake = make_bridge(tmp_path, fingerprint="hostname,seq") doc = {"hostname": "sw01", "seq": 42, "message": "link down"} line = json.dumps(doc) - r1 = asyncio.run(bridge.handle_line(line)) - r2 = asyncio.run(bridge.handle_line(line)) - asyncio.run(bridge.close()) - assert (r1, r2) == (ACK_OK, ACK_OK) + + async def scenario() -> tuple[str, str]: + r1 = await bridge.handle_line(line) + r2 = await bridge.handle_line(line) + await bridge.close() + return r1, r2 + + assert asyncio.run(scenario()) == (ACK_OK, ACK_OK) assert len(fake.calls) == 2 assert fake.calls[0][2] == fake.calls[1][2] # même _id assert fake.calls[0][2] is not None def test_documents_differents_ids_differents(self, tmp_path: Path) -> None: bridge, fake = make_bridge(tmp_path, fingerprint="hostname") - asyncio.run(bridge.handle_line(json.dumps({"hostname": "sw01", "message": "a"}))) - asyncio.run(bridge.handle_line(json.dumps({"hostname": "sw02", "message": "b"}))) - asyncio.run(bridge.close()) + + async def scenario() -> None: + await bridge.handle_line(json.dumps({"hostname": "sw01", "message": "a"})) + await bridge.handle_line(json.dumps({"hostname": "sw02", "message": "b"})) + await bridge.close() + + asyncio.run(scenario()) ids = {call[2] for call in fake.calls} assert len(ids) == 2 + @staticmethod + def _bridge_avec(argv: list[str], tmp_path: Path) -> tuple[Any, FauxOpenSearch]: + args = build_parser().parse_args(argv) + bridge = build_bridge(args) + fake = FauxOpenSearch() + fake.brancher(bridge.indexer) + return bridge, fake + def test_gabarit_seul_genere_l_id(self, tmp_path: Path) -> None: """--document-id-template seul : le gabarit %{...} rendu sert de _id.""" - parser_argv = [ - "--opensearch-host", - "https://localhost:9200", - "--no-verify-certs", - "--log-level", - "ERROR", - "--dlq-path", - str(tmp_path / "dlq.jsonl"), - "--document-id-template", - "%{hostname}", - ] - from omprog import build_bridge, build_parser + bridge, fake = self._bridge_avec( + [ + "--opensearch-host", + "https://localhost:9200", + "--no-verify-certs", + "--log-level", + "ERROR", + "--dlq-path", + str(tmp_path / "dlq.jsonl"), + "--document-id-template", + "%{hostname}", + ], + tmp_path, + ) - args = build_parser().parse_args(parser_argv) - bridge = build_bridge(args) - fake = FakeOpenSearchClient() - bridge.indexer._client = fake - asyncio.run(bridge.handle_line(json.dumps({"hostname": "sw01", "message": "x"}))) - asyncio.run(bridge.close()) + async def scenario() -> None: + await bridge.handle_line(json.dumps({"hostname": "sw01", "message": "x"})) + await bridge.close() + + asyncio.run(scenario()) assert fake.calls[0][2] == "sw01" def test_fingerprint_prioritaire_sur_gabarit(self, tmp_path: Path) -> None: """Les deux configurés (issue #33) : le fingerprint gagne — jamais combinés dans un même _id, mais simultané autorisé.""" - parser_argv = [ + bridge, fake = self._bridge_avec( + [ + "--opensearch-host", + "https://localhost:9200", + "--no-verify-certs", + "--log-level", + "ERROR", + "--dlq-path", + str(tmp_path / "dlq.jsonl"), + "--document-id-template", + "%{hostname}", + "--document-id-fingerprint", + "hostname", + ], + tmp_path, + ) + doc = {"hostname": "sw01", "message": "x"} + + async def scenario() -> None: + await bridge.handle_line(json.dumps(doc)) + await bridge.close() + + asyncio.run(scenario()) + # L'_id est l'empreinte sha256 du champ, pas le gabarit « sw01 ». + from pystashtemplate.fingerprint import compute_fingerprint + + expected = compute_fingerprint(doc, ["hostname"], "sha256") + assert fake.calls[0][2] == expected + assert fake.calls[0][2] != "sw01" + + def test_hmac_via_option_et_via_env(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: + """Issue #28 : --fingerprint-key OU repli FINGERPRINT_KEY — le _id est + un HMAC (différent du hash simple, différent par clé).""" + doc = {"hostname": "sw01", "message": "x"} + base = [ "--opensearch-host", "https://localhost:9200", "--no-verify-certs", @@ -244,70 +334,25 @@ def test_fingerprint_prioritaire_sur_gabarit(self, tmp_path: Path) -> None: "ERROR", "--dlq-path", str(tmp_path / "dlq.jsonl"), - "--document-id-template", - "%{hostname}", "--document-id-fingerprint", "hostname", ] - from omprog import build_bridge, build_parser - args = build_parser().parse_args(parser_argv) - bridge = build_bridge(args) - fake = FakeOpenSearchClient() - bridge.indexer._client = fake - doc = {"hostname": "sw01", "message": "x"} - asyncio.run(bridge.handle_line(json.dumps(doc))) - asyncio.run(bridge.close()) - # L'_id est l'empreinte sha256 du champ, pas le gabarit « sw01 ». - from pystashtemplate.fingerprint import compute_fingerprint + async def envoyer(argv: list[str]) -> str | None: + bridge, fake = self._bridge_avec(base + argv, tmp_path) + await bridge.handle_line(json.dumps(doc)) + await bridge.close() + return fake.calls[0][2] - expected = compute_fingerprint(doc, ["hostname"], "sha256") - assert fake.calls[0][2] == expected - assert fake.calls[0][2] != "sw01" + async def scenario() -> tuple[str | None, str | None, str | None]: + with_option = await envoyer(["--fingerprint-key", "cle-option"]) + monkeypatch.setenv("FINGERPRINT_KEY", "cle-env") + with_env = await envoyer([]) + monkeypatch.delenv("FINGERPRINT_KEY") + sans_cle = await envoyer([]) + return with_option, with_env, sans_cle - def test_hmac_via_option_et_via_env(self, tmp_path: Path, monkeypatch: pytest.MonkeyPatch) -> None: - """Issue #28 : --fingerprint-key OU repli FINGERPRINT_KEY — le _id est - un HMAC (différent du hash simple, différent par clé).""" - from omprog import build_bridge, build_parser - - def make(argv: list[str]) -> tuple[Any, FakeOpenSearchClient]: - args = build_parser().parse_args( - [ - "--opensearch-host", - "https://localhost:9200", - "--no-verify-certs", - "--log-level", - "ERROR", - "--dlq-path", - str(tmp_path / "dlq.jsonl"), - "--document-id-fingerprint", - "hostname", - *argv, - ] - ) - bridge = build_bridge(args) - fake = FakeOpenSearchClient() - bridge.indexer._client = fake - return bridge, fake - - doc = {"hostname": "sw01", "message": "x"} - # 1. Clé via l'option CLI. - bridge, fake = make(["--fingerprint-key", "cle-option"]) - asyncio.run(bridge.handle_line(json.dumps(doc))) - asyncio.run(bridge.close()) - with_option = fake.calls[0][2] - # 2. Clé via la variable d'environnement (repli). - monkeypatch.setenv("FINGERPRINT_KEY", "cle-env") - bridge, fake = make([]) - asyncio.run(bridge.handle_line(json.dumps(doc))) - asyncio.run(bridge.close()) - with_env = fake.calls[0][2] - # 3. Sans clé : hash simple. - monkeypatch.delenv("FINGERPRINT_KEY") - bridge, fake = make([]) - asyncio.run(bridge.handle_line(json.dumps(doc))) - asyncio.run(bridge.close()) - sans_cle = fake.calls[0][2] + with_option, with_env, sans_cle = asyncio.run(scenario()) from pystashtemplate.fingerprint import compute_fingerprint @@ -318,9 +363,7 @@ def make(argv: list[str]) -> tuple[Any, FakeOpenSearchClient]: def test_murmur3_via_cli(self, tmp_path: Path) -> None: """Issue #28 : --fingerprint-method murmur3 → _id entier décimal.""" - from omprog import build_bridge, build_parser - - args = build_parser().parse_args( + bridge, fake = self._bridge_avec( [ "--opensearch-host", "https://localhost:9200", @@ -333,13 +376,15 @@ def test_murmur3_via_cli(self, tmp_path: Path) -> None: "hostname", "--fingerprint-method", "murmur3", - ] + ], + tmp_path, ) - bridge = build_bridge(args) - fake = FakeOpenSearchClient() - bridge.indexer._client = fake - asyncio.run(bridge.handle_line(json.dumps({"hostname": "sw01", "message": "x"}))) - asyncio.run(bridge.close()) + + async def scenario() -> None: + await bridge.handle_line(json.dumps({"hostname": "sw01", "message": "x"})) + await bridge.close() + + asyncio.run(scenario()) doc_id = fake.calls[0][2] assert doc_id is not None and doc_id.isdigit() @@ -355,9 +400,13 @@ def test_output_conf_surcharge_index(self, tmp_path: Path) -> None: } """ bridge, fake = make_bridge(tmp_path, pipeline_conf=conf) - reply = asyncio.run(bridge.handle_line(json.dumps({"message": "app1 connexion"}))) - asyncio.run(bridge.close()) - assert reply == ACK_OK + + async def scenario() -> str: + reply = await bridge.handle_line(json.dumps({"message": "app1 connexion"})) + await bridge.close() + return reply + + assert asyncio.run(scenario()) == ACK_OK assert len(fake.calls) == 1 index, body, _ = fake.calls[0] # L'index vient du output{} rendu, pas du motif quotidien. @@ -371,113 +420,71 @@ def test_200_messages_sous_la_seconde(self, tmp_path: Path) -> None: (aucun verrou de performance : détecte une régression massive du flux).""" bridge, fake = make_bridge(tmp_path, fingerprint="seq") lines = [json.dumps({"seq": i, "message": f"event {i}"}) for i in range(200)] + + async def scenario() -> None: + for line in lines: + reply = await bridge.handle_line(line) + assert reply == ACK_OK + await bridge.close() + start = time.monotonic() - for line in lines: - reply = asyncio.run(bridge.handle_line(line)) - assert reply == ACK_OK + asyncio.run(scenario()) elapsed = time.monotonic() - start - asyncio.run(bridge.close()) assert len(fake.calls) == 200 assert len({call[2] for call in fake.calls}) == 200 # _id uniques par champ assert elapsed < 1.0, f"débit trop faible : {elapsed:.2f}s pour 200 messages" # ---------------------------------------------------------------------- -# Issue #37 : multi-cluster OpenSearch (failover) et health check périodique +# Issue #160 : la sortie PyStashTemplate n'utilise que le PREMIER nœud. +# Le failover transport (opensearch-py, issue #37) disparaît avec le +# client : un nœud mort rend le message à rsyslog (RETRYABLE), qui le +# retient et le renvoie — la retenue rsyslog reste le mécanisme de repli. # ---------------------------------------------------------------------- -class TestFailoverMultiNoeuds: - """Failover RÉEL (issue #37) : transport opensearch-py authentique, - deux serveurs HTTP locaux minimaux — un nœud mort, un nœud vivant. - - La sélection de nœud du transport est rendue déterministe (le nœud - mort en premier) pour exercer le repli, pas seulement la chance. - """ - - @staticmethod - async def _start_minimal_opensearch() -> tuple[asyncio.Server, int]: - """Serveur HTTP minimal qui répond 200 JSON à toute requête.""" - - async def handle(reader: asyncio.StreamReader, writer: asyncio.StreamWriter) -> None: - await reader.read(65536) # requête complète (corps petits) - body = b'{"result":"created","_id":"x"}' - writer.write( - b"HTTP/1.1 200 OK\r\ncontent-type: application/json\r\ncontent-length: " - + str(len(body)).encode() - + b"\r\nconnection: close\r\n\r\n" - + body - ) - await writer.drain() - writer.close() - - server = await asyncio.start_server(handle, "127.0.0.1", 0) - return server, server.sockets[0].getsockname()[1] +class TestNoeudMort: + def test_renvoie_a_rsyslog(self) -> None: + """Port 1 fermé (nœud mort) : RETRYABLE, pas d'exception — rsyslog retient.""" - def test_noeud_mort_bascule_sur_le_suivant(self) -> None: async def scenario() -> SendOutcome: - server, alive_port = await self._start_minimal_opensearch() - # Port adjacent probablement libre = nœud « mort ». - dead_port = alive_port + 1 - try: - indexer = OpenSearchIndexer( - hosts=[ - {"host": "127.0.0.1", "port": dead_port}, - {"host": "127.0.0.1", "port": alive_port}, - ], - auth=None, - index_pattern="switch-logs-%Y.%m.%d", - use_ssl=False, - verify_certs=False, - ) - # Le transport choisit normalement un nœud au hasard : on - # force le nœud mort en premier pour exercer le repli. - indexer._client.transport.randomizer = lambda: 0 - try: - return await indexer.send({"a": 1}) - finally: - await indexer.close() - finally: - server.close() - await server.wait_closed() - - assert asyncio.run(scenario()) is SendOutcome.INDEXED - - def test_retry_on_timeout_active(self) -> None: - """Le repli couvre aussi les délais d'attente (défaut biblio. : False).""" - - async def scenario() -> bool: indexer = OpenSearchIndexer( - hosts=[{"host": "127.0.0.1", "port": 9200}], + hosts=[{"host": "127.0.0.1", "port": 1}], auth=None, index_pattern="switch-logs-%Y.%m.%d", use_ssl=False, verify_certs=False, ) try: - return indexer._client.transport.retry_on_timeout is True + return await indexer.send({"a": 1}) finally: await indexer.close() - assert asyncio.run(scenario()) + assert asyncio.run(scenario()) is SendOutcome.RETRYABLE class TestHealthCheckPeriodique: def test_health_renvoie_la_version(self, tmp_path: Path) -> None: bridge, fake = make_bridge(tmp_path) - info = asyncio.run(bridge.indexer.health()) - asyncio.run(bridge.close()) - assert info["version"]["number"] == "2.19.0-test" + + async def scenario() -> dict[str, Any]: + info = await bridge.indexer.health() + await bridge.close() + return info + + assert asyncio.run(scenario())["version"]["number"] == "2.19.0-test" assert fake.health_checks == 1 def test_health_echec_leve(self, tmp_path: Path) -> None: - import pytest - bridge, fake = make_bridge(tmp_path) fake.mode = "transient" - with pytest.raises(OpenSearchException): - asyncio.run(bridge.indexer.health()) - asyncio.run(bridge.close()) + + async def scenario() -> None: + with pytest.raises(httpx.HTTPStatusError): + await bridge.indexer.health() + await bridge.close() + + asyncio.run(scenario()) def test_boucle_s_arrete_avec_stop_et_surveille(self, tmp_path: Path) -> None: """La boucle tourne tant que `stop` n'est pas demandé, sans jamais lever.""" @@ -490,9 +497,9 @@ async def scenario() -> None: await asyncio.sleep(0.05) stop.set() await loop_task # la boucle se termine proprement, sans exception + await bridge.close() asyncio.run(scenario()) - asyncio.run(bridge.close()) assert fake.health_checks >= 1 def test_option_cli_defaut_300_et_desactivable(self) -> None: diff --git a/tests/test_mtls.py b/tests/test_mtls.py index 6eb5756..23a7a37 100644 --- a/tests/test_mtls.py +++ b/tests/test_mtls.py @@ -1,10 +1,11 @@ # SPDX-License-Identifier: GPL-3.0-or-later """Authentification par certificat client (mTLS) vers OpenSearch (issue #100). -Bout en bout réel : transport opensearch-py authentique, serveur HTTPS local -qui EXIGE un certificat client signé par une autorité de test. Certificats -générés par `openssl` dans un dossier temporaire (test sauté si `openssl` -est absent). +Bout en bout réel : sortie `OpenSearchOutput` de PyStashTemplate (client +httpx authentique, issue #160), serveur HTTPS local qui EXIGE un +certificat client signé par une autorité de test. Certificats générés +par `openssl` dans un dossier temporaire (test sauté si `openssl` est +absent). """ from __future__ import annotations @@ -53,7 +54,8 @@ async def handle(reader: asyncio.StreamReader, writer: asyncio.StreamWriter) -> cert = writer.get_extra_info("peercert") or {} clients.extend(v for rdn in cert.get("subject", ()) for k, v in rdn if k == "commonName") await reader.read(65536) - body = b'{"result":"created","_id":"x"}' + # Réponse _bulk (l'envoi passe par l'API _bulk de la sortie, #160). + body = b'{"items":[{"index":{"status":201}}]}' writer.write( b"HTTP/1.1 200 OK\r\ncontent-type: application/json\r\ncontent-length: " + str(len(body)).encode() diff --git a/tests/test_omprog.py b/tests/test_omprog.py index 238a817..2e0bcfb 100644 --- a/tests/test_omprog.py +++ b/tests/test_omprog.py @@ -280,7 +280,7 @@ def test_sortie_non_geree_ignoree(): class Interp: has_output = True - def apply_events(self, doc, **kw): + async def apply_events(self, doc, **kw): from pystashtemplate.interpreter import OutputAction return [ @@ -344,21 +344,23 @@ async def readline(): def test_index_template_composable(): - class Indices: - def __init__(self): - self.calls = [] - - async def put_index_template(self, name, body): - self.calls.append(("composable", name, sorted(body))) + """Client httpx de la sortie (#160) : PUT _index_template/{name} en JSON.""" - async def put_template(self, name, body): - self.calls.append(("ancien", name, sorted(body))) + class Reponse: + def raise_for_status(self) -> None: + return None class Client: - indices = Indices() + def __init__(self): + self.calls: list[tuple[str, list[str]]] = [] + + async def put(self, chemin, json=None): + self.calls.append((chemin, sorted(json))) + return Reponse() - _run(omprog.install_index_template(Client, "switch-logs", str(ROOT / "opensearch-index-template.json"))) - assert Client.indices.calls == [("composable", "switch-logs", ["index_patterns", "priority", "template"])] + client = Client() + _run(omprog.install_index_template(client, "switch-logs", str(ROOT / "opensearch-index-template.json"))) + assert client.calls == [("_index_template/switch-logs", ["index_patterns", "priority", "template"])] def test_script_de_bout_en_bout_sans_opensearch(tmp_path): diff --git a/tests/test_omprog_complements.py b/tests/test_omprog_complements.py index 1beb24e..1d5af84 100644 --- a/tests/test_omprog_complements.py +++ b/tests/test_omprog_complements.py @@ -110,22 +110,22 @@ async def readline(): # ne doit jamais être appelée def test_index_template_ancien_format(tmp_path: Path) -> None: + """Sans `template` : l'ancienne API `_template/{name}` (client httpx, #160).""" gabarit = tmp_path / "ancien.json" gabarit.write_text('{"index_patterns": ["switch-*"], "mappings": {}}', encoding="utf-8") - appels: list[tuple[str, str]] = [] + appels: list[str] = [] - class Indices: - async def put_index_template(self, name, body): - appels.append(("composable", name)) - - async def put_template(self, name, body): - appels.append(("ancien", name)) + class Reponse: + def raise_for_status(self) -> None: + return None class Client: - indices = Indices() + async def put(self, chemin, json=None): + appels.append(chemin) + return Reponse() - _run(omprog.install_index_template(Client, "switch-logs", str(gabarit))) - assert appels == [("ancien", "switch-logs")] + _run(omprog.install_index_template(Client(), "switch-logs", str(gabarit))) + assert appels == ["_template/switch-logs"] class TestHealthCheckLoop: @@ -212,15 +212,23 @@ def pont_de_test(monkeypatch: pytest.MonkeyPatch, capsys: pytest.CaptureFixture[ construits: list[omprog.Bridge] = [] gabarits: list[str] = [] + class Reponse: + """Réponse HTTP minimale : toujours un succès (raise_for_status muet).""" + + def raise_for_status(self) -> None: + return None + class Client: - class indices: # noqa: N801 - imite client.indices d'opensearch-py - @staticmethod - async def put_index_template(name, body): - gabarits.append(name) + """Client httpx minimal : enregistre le nom du gabarit installé.""" + + @staticmethod + async def put(chemin: str, json=None): # noqa: A002 - imite httpx + gabarits.append(chemin.rsplit("/", 1)[-1]) + return Reponse() def construire(args): indexeur = FakeIndexer() - indexeur._client = Client + indexeur._client = lambda: asyncio.sleep(0, result=Client) indexeur.health = lambda: asyncio.sleep(0, result={}) bridge = omprog.Bridge(indexer=indexeur) construits.append(bridge) diff --git a/uv.lock b/uv.lock index a7b1e3b..8cb9043 100644 --- a/uv.lock +++ b/uv.lock @@ -142,6 +142,19 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fb/76/641ae371508676492379f16e2fa48f4e2c11741bd63c48be4b12a6b09cba/aiosignal-1.4.0-py3-none-any.whl", hash = "sha256:053243f8b92b990551949e63930a839ff0cf0b0ebbe0597b0f3fb19e1a0fe82e", size = 7490, upload-time = "2025-07-03T22:54:42.156Z" }, ] +[[package]] +name = "anyio" +version = "4.16.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "idna" }, + { name = "typing-extensions", marker = "python_full_version < '3.15'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a1/98/7e457a3b014976887a050561955c0b76e1e7e2d6e27b78ecef2ef80518f2/anyio-4.16.0.tar.gz", hash = "sha256:59bb03251907983d1603d27c3087ddb1e93299ea2163adcdba37899a4fb12ffb", size = 310971, upload-time = "2026-11-01T11:20:07.282Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/a9/16/7757fb84c819accc7d7e9af5291b261e4abb8627ee040f99e7d35ef2457a/anyio-4.16.0-py3-none-any.whl", hash = "sha256:c66ae634e0b8228396b801741beb3294326d4b6102f7bba4041c0dfb58c29026", size = 134521, upload-time = "2026-11-01T11:20:05.59Z" }, +] + [[package]] name = "attrs" version = "26.1.0" @@ -444,14 +457,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/61/55/f90405bbbbd3dd8f788e92cec2d39964f5c09783f0570fc35f3bb3381485/dnspython-2.9.1-py3-none-any.whl", hash = "sha256:7c81caf8de1ed57b8cfc7e0ad4f528a0b8ceace473c7eb946df195dc9def751f", size = 360364, upload-time = "2026-10-29T18:05:10.206Z" }, ] -[[package]] -name = "events" -version = "0.5" -source = { registry = "https://pypi.org/simple" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/25/ed/e47dec0626edd468c84c04d97769e7ab4ea6457b7f54dcb3f72b17fcd876/Events-0.5-py3-none-any.whl", hash = "sha256:a7286af378ba3e46640ac9825156c93bdba7502174dd696090fdfcd4d80a1abd", size = 6758, upload-time = "2023-07-31T08:23:13.645Z" }, -] - [[package]] name = "frozenlist" version = "1.8.0" @@ -572,64 +577,40 @@ wheels = [ ] [[package]] -name = "grpcio" -version = "1.84.0" +name = "h11" +version = "0.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/01/ee/02a2c011bdab74c6fb3c75474d40b3052059d95df7e73351460c8588d963/h11-0.16.0.tar.gz", hash = "sha256:4e35b956cf45792e4caa5885e69fba00bdbc6ffafbfa020300e549b208ee5ff1", size = 101250, upload-time = "2025-04-24T03:35:25.427Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/04/4b/29cac41a4d98d144bf5f6d33995617b185d14b22401f75ca86f384e87ff1/h11-0.16.0-py3-none-any.whl", hash = "sha256:63cf8bbe7522de3bf65932fda1d9c2772064ffb3dae62d55932da54b31cb6c86", size = 37515, upload-time = "2025-04-24T03:35:24.344Z" }, +] + +[[package]] +name = "httpcore" +version = "1.0.9" source = { registry = "https://pypi.org/simple" } dependencies = [ - { name = "typing-extensions" }, + { name = "certifi" }, + { name = "h11" }, ] -sdist = { url = "https://files.pythonhosted.org/packages/3f/4f/4435c0aae54657258d9cfcba78598f3d9e5fe4c82ff18d78558567b90faf/grpcio-1.84.0.tar.gz", hash = "sha256:19aaf172fc2edbefccce3f6e92c5150975dbe56c45744e9e87cf72ebdf85bfbe", size = 13493876, upload-time = "2026-09-14T06:59:33.291Z" } +sdist = { url = "https://files.pythonhosted.org/packages/06/94/82699a10bca87a5556c9c59b5963f2d039dbd239f25bc2a63907a05a14cb/httpcore-1.0.9.tar.gz", hash = "sha256:6e34463af53fd2ab5d807f399a9b45ea31c3dfa2276f15a2c3f00afff6e176e8", size = 85484, upload-time = "2025-04-24T22:06:22.219Z" } wheels = [ - { url = "https://files.pythonhosted.org/packages/2d/b9/46146728b3f4a5c7e34c17d0ab724d58b5456b116e76dc77d3ef4e79b135/grpcio-1.84.0-cp311-cp311-linux_armv7l.whl", hash = "sha256:4aaeceeb7fa7d824c322d1ec3208c8495c88478a927295553235435fc49043ad", size = 6454572, upload-time = "2026-09-14T06:57:14.651Z" }, - { url = "https://files.pythonhosted.org/packages/e3/63/5d668b4102637410d700153fd12d6a798e3ff8308bd9dcbaeae93f191060/grpcio-1.84.0-cp311-cp311-macosx_11_0_universal2.whl", hash = "sha256:06619ba1515e5ee69fb2a514e95dd8be05ce74cb3928d5b34f87f87c86fe3c27", size = 12359529, upload-time = "2026-09-14T06:57:17.202Z" }, - { url = "https://files.pythonhosted.org/packages/18/2a/52e29c02047a493f15a78c0502bde4d3fab7c19c7813944d367cd501811c/grpcio-1.84.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:158c1c11cfb61b4849c3caf4d52de6f5ecd376e14446feb4a90dc95a90d616f5", size = 7029927, upload-time = "2026-09-14T06:57:19.767Z" }, - { url = "https://files.pythonhosted.org/packages/0a/11/9962b313553647abb091943e0721e4a1662ecc63cdfe930abf00abcce47a/grpcio-1.84.0-cp311-cp311-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:a9383401d9f116f98cacd4eba6c505a6edb80ba65badfc8e8ed8ae64983bcc44", size = 7782268, upload-time = "2026-09-14T06:57:22.381Z" }, - { url = "https://files.pythonhosted.org/packages/e2/b7/14a9413cb7d4b2e782b4f79c81a918610caedf55138ab5916f5fdd4b002f/grpcio-1.84.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:bd8ea8eb3817b226057cc1c0e7ec4b378dcda52043b972b6ff12b1152178967d", size = 7187959, upload-time = "2026-09-14T06:57:24.686Z" }, - { url = "https://files.pythonhosted.org/packages/ee/3b/6cc8e6aed8f23be40f52af341e5d4595ec3ec8d7572271a692b5c1212178/grpcio-1.84.0-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:756ea5c2da00fa65c930284892d2a9706828704ca3ba40b4c51c4834eb39fcfd", size = 7737554, upload-time = "2026-09-14T06:57:27.5Z" }, - { url = "https://files.pythonhosted.org/packages/3c/7e/6f61002a01802ca9675e1b3599c9b0f9f3cf168ded94ebacc02199309f88/grpcio-1.84.0-cp311-cp311-musllinux_1_2_i686.whl", hash = "sha256:28d2609691da93051e998495108bbddd2a9f7a561253bae94828d81290f30c15", size = 8792681, upload-time = "2026-09-14T06:57:29.731Z" }, - { url = "https://files.pythonhosted.org/packages/eb/84/8bec1ae7e6732a9b435a394ddfdfffde46c2620ae0109823f7cce1a54455/grpcio-1.84.0-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:27b8b36200a9fbee6e120246f4a8a41657549107ef19fb2c819c4b2fd524f39a", size = 8145493, upload-time = "2026-09-14T06:57:32.672Z" }, - { url = "https://files.pythonhosted.org/packages/59/84/c8c7bd210d657288f18af06522f150f61e81ea14fd3c7c135beed697c5fd/grpcio-1.84.0-cp311-cp311-win32.whl", hash = "sha256:465eef3d17e59ad22a556fc0138f7c7c799df426734344daec42c797d49fda99", size = 4495596, upload-time = "2026-09-14T06:57:34.799Z" }, - { url = "https://files.pythonhosted.org/packages/da/1e/da99356b3b573af357d059753a47fba54f1ca1a9c0e4deccd0210cb7f4ba/grpcio-1.84.0-cp311-cp311-win_amd64.whl", hash = "sha256:f9a456bdbed52a01c9ab8423bdebab04a5363c78676edc55ab9b58bd13bdf9e1", size = 5259900, upload-time = "2026-09-14T06:57:37.067Z" }, - { url = "https://files.pythonhosted.org/packages/0a/c1/4c9a2e0e6b0aaf02781404cad2f79211f989f2c827cf672a4a48d1604d3e/grpcio-1.84.0-cp312-cp312-linux_armv7l.whl", hash = "sha256:b5c6f20d657ae09ae4e30d9d3a21edd13f1219d58cc6f999b9d1bb63be9c1baa", size = 6415756, upload-time = "2026-09-14T06:57:39.345Z" }, - { url = "https://files.pythonhosted.org/packages/b1/57/131e7007bdee9acb77a8dbe8a16fa9fef75f88c1695242d8ee0993ac2d3d/grpcio-1.84.0-cp312-cp312-macosx_11_0_universal2.whl", hash = "sha256:406583b4e8fb2282ebd392e12b963e601c1f82e07125a8c2cb5b144e7e024796", size = 12339195, upload-time = "2026-09-14T06:57:42.373Z" }, - { url = "https://files.pythonhosted.org/packages/db/d1/a7b7cda98fcab9b3d2916204a872d87371158a7a34e41768f524584fb64d/grpcio-1.84.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fbdbcd06986ede3ce584083b1dc2afe6808e8943e5cf50ad11183c03aceda25a", size = 6984468, upload-time = "2026-09-14T06:57:45.035Z" }, - { url = "https://files.pythonhosted.org/packages/19/81/c5be83e3ac9416f73c4c51fe1ea9c41a0c42fc3509e3505faa46f5046abe/grpcio-1.84.0-cp312-cp312-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:23e6e8e8a75cff88e0a793bfd3becea03a13e2763ae90c1ff573bc19ca5b429a", size = 7749432, upload-time = "2026-09-14T06:57:47.395Z" }, - { url = "https://files.pythonhosted.org/packages/a0/bf/258cd7c0a7ed92745dc93c31666d462d05b702807a689744bd49fb833bde/grpcio-1.84.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:b44f0a0fc7bc6677d38cc80bca1a32814ce6c8f200fb8b3c1a61c9d77eaefbf3", size = 7156115, upload-time = "2026-09-14T06:57:49.657Z" }, - { url = "https://files.pythonhosted.org/packages/2b/4b/7f829418dbfcf91b875e55e2973f1059a95decb4f081313416317ef04ec1/grpcio-1.84.0-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:210e4c32f907045eb8158273e60c6ab69a3947697df6245dbda381f26c59485b", size = 7708010, upload-time = "2026-09-14T06:57:52.496Z" }, - { url = "https://files.pythonhosted.org/packages/34/f0/9932e2fec6a04205f8bf3f8f4d2020479dcdac88feb6f93822ed31bf0eba/grpcio-1.84.0-cp312-cp312-musllinux_1_2_i686.whl", hash = "sha256:a71d24f40b0cc6798feaa978c7411dc1135b7018e9fc0442db611c139bf58344", size = 8759980, upload-time = "2026-09-14T06:57:55.312Z" }, - { url = "https://files.pythonhosted.org/packages/2c/5c/b67407c6dbc480dfc0715f6eccdb1061e7c88d85f9a330a241d357a538c5/grpcio-1.84.0-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:f6c972474ce691aca74e58d17625450cef153dc4760364cadeb167983ea6d589", size = 8124904, upload-time = "2026-09-14T06:57:58.569Z" }, - { url = "https://files.pythonhosted.org/packages/02/37/2bfdae2df8dfcfc0df619b628e0c7153ce703adae827243f44720322ccc1/grpcio-1.84.0-cp312-cp312-win32.whl", hash = "sha256:0d532ade4486dad9b302ffa4d4683d67561051c26d17c4023322845e9fa10140", size = 4478915, upload-time = "2026-09-14T06:58:00.714Z" }, - { url = "https://files.pythonhosted.org/packages/85/2c/309268b7b39f6deb2342f634841e105623a0b67982e8b10ec516782ff1c6/grpcio-1.84.0-cp312-cp312-win_amd64.whl", hash = "sha256:49717e857899f4136d7657bf5aded61ac479110a075438290923a4d86af7cd02", size = 5253534, upload-time = "2026-09-14T06:58:03.336Z" }, - { url = "https://files.pythonhosted.org/packages/5d/51/40f99701adb01d4e5316a2aaf13838da1a24d5c879cd8c95156d7c364454/grpcio-1.84.0-cp313-cp313-linux_armv7l.whl", hash = "sha256:209414080da8c20af94df1395b635da52dd57b5edc9e917e1deca0dc1c4bb55e", size = 6427619, upload-time = "2026-09-14T06:58:06.025Z" }, - { url = "https://files.pythonhosted.org/packages/c5/4b/ed8e22a1237e6b2be6ef4f221d074a5b0e0dd8a0da8c944c04aea731f0eb/grpcio-1.84.0-cp313-cp313-macosx_11_0_universal2.whl", hash = "sha256:e41c3993eee896c617dbd8a505085d28b6e84a0445ed9a1f40f95808473cf678", size = 12336549, upload-time = "2026-09-14T06:58:08.583Z" }, - { url = "https://files.pythonhosted.org/packages/d3/50/00165b05cd73f45996748ea67ce9e55d08936f2fea94a7fd8541cc2d0e54/grpcio-1.84.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:fff5ef3fe1bba7d6147e5f19e01e5e122ac2c076486887ddcb8d42e663400fbe", size = 6989458, upload-time = "2026-09-14T06:58:11.884Z" }, - { url = "https://files.pythonhosted.org/packages/26/38/d0486230e684d916f97429a53041db88410e662a38f2a8d09e2d90375840/grpcio-1.84.0-cp313-cp313-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:b8c62888c3e49debf37ad9773e3c02f77b0c1e811f8fb0962f2b6c3bbab5b97a", size = 7757778, upload-time = "2026-09-14T06:58:14.849Z" }, - { url = "https://files.pythonhosted.org/packages/da/56/548a643decb059ca244499c675ae2c13a15f523ba94592c2774bd80a13c1/grpcio-1.84.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:986e9751d416d7a6eaa2fecdac38da63153d63a4b340ba7d624889c490451500", size = 7159572, upload-time = "2026-09-14T06:58:17.87Z" }, - { url = "https://files.pythonhosted.org/packages/db/f5/42caac81a79ec680f1f7a8eaf7ca90d2f93936ce0c3a073141ba96757f77/grpcio-1.84.0-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:5933a052946873d01a42119a05420d669bdca436aeba2d1851988ccb12b421c0", size = 7710547, upload-time = "2026-09-14T06:58:20.607Z" }, - { url = "https://files.pythonhosted.org/packages/57/a4/828ad990b2410fee0a55cc73aa1bf98eb5b911c54847374ef4f24b9e877b/grpcio-1.84.0-cp313-cp313-musllinux_1_2_i686.whl", hash = "sha256:e094dd21f077af8194923fc263cad872eaa1802bb0156fd7e5ae18e99cd86715", size = 8761519, upload-time = "2026-09-14T06:58:23.875Z" }, - { url = "https://files.pythonhosted.org/packages/d5/a5/1f91af098919eaf5d80d5a61126ad9fae074e5190c25a3014ce1d8d0d890/grpcio-1.84.0-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:08735e3d08d24ab3132cf87e2e5dea8746cabcc7d676c2b0b7362f195feef9d9", size = 8121424, upload-time = "2026-09-14T06:58:27.006Z" }, - { url = "https://files.pythonhosted.org/packages/8c/8f/77fd4a7a913b636785479922349c4cb98d94d05d15652e556b3ca0df6663/grpcio-1.84.0-cp313-cp313-win32.whl", hash = "sha256:70bb4ce8be0c5606bec259cbd7152374470396413b7863a658a08c849e6b29ff", size = 4477974, upload-time = "2026-09-14T06:58:29.528Z" }, - { url = "https://files.pythonhosted.org/packages/d0/9a/1fa59ddbfc8898e5518d1447e46f771f387f0ed6132ad531395338e51a5c/grpcio-1.84.0-cp313-cp313-win_amd64.whl", hash = "sha256:b61692f0069b3eee2fc8a3a1b7f6c044df9e03fede6ce69b3ca832e1c39f26c5", size = 5255326, upload-time = "2026-09-14T06:58:31.781Z" }, - { url = "https://files.pythonhosted.org/packages/26/6f/e25ca89ca5b0b7b95464c907a5c21a77c0ac8c4ee1dca164c4dd8f153ddb/grpcio-1.84.0-cp314-cp314-linux_armv7l.whl", hash = "sha256:026d757df86c5b7a41de8200b9a2cda454aaa5004cb0c7e3374c66eb82f61499", size = 6428207, upload-time = "2026-09-14T06:58:34.401Z" }, - { url = "https://files.pythonhosted.org/packages/cd/b4/6b76b429f3f9b901cdbc306c81364d708bc957f847a05cbd1046cd2d05d8/grpcio-1.84.0-cp314-cp314-macosx_11_0_universal2.whl", hash = "sha256:3de427b05f244ba2c2a9bdc67e7a6731c8340811524ecc4435466549f8af1d17", size = 12342420, upload-time = "2026-09-14T06:58:37.416Z" }, - { url = "https://files.pythonhosted.org/packages/af/64/ac86d638ba7f73bee0dccb608ba551d4f63adf75151f00d2c43e46d3979e/grpcio-1.84.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:e90e3bdf7b5eac005fef631adae9cafde16f922def207b80a7c46b253c18ad20", size = 6998396, upload-time = "2026-09-14T06:58:40.535Z" }, - { url = "https://files.pythonhosted.org/packages/4a/65/fa12e9ec9d7ebf8cc3e81428fa9e1ca0d30d22d546ce2baa4c64bc917cbc/grpcio-1.84.0-cp314-cp314-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:e88d304f094f4937bc27ec6a435e218a084168f11ec630c8d5d39b431d08d81d", size = 7757538, upload-time = "2026-09-14T06:58:43.297Z" }, - { url = "https://files.pythonhosted.org/packages/21/d7/94240c7fae121ff1f116dcf04a3b7ee0216a06832c704310363f72638d4c/grpcio-1.84.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:57dc36a5ab0e676f5f6e171de2917fd0aef73f32a9aaf23956bfe19997a30bd1", size = 7161480, upload-time = "2026-09-14T06:58:45.939Z" }, - { url = "https://files.pythonhosted.org/packages/23/c9/7033e95d4b344969818b09185721c7608b47fc2498d97b5e4eec4995dbf3/grpcio-1.84.0-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:5deda5b4bf62769eb98c119cca43d40e1231e34846b19db5cdea821d446a2253", size = 7720191, upload-time = "2026-09-14T06:58:48.308Z" }, - { url = "https://files.pythonhosted.org/packages/95/22/b45df2deba81d55069076859480bae7109c9eec02bce5515c799530cc2aa/grpcio-1.84.0-cp314-cp314-musllinux_1_2_i686.whl", hash = "sha256:9bab4cf571653a8afffb83ce21aa27b51dfe629b526b7b6adec35491fe1fc2ea", size = 8762792, upload-time = "2026-09-14T06:58:51.068Z" }, - { url = "https://files.pythonhosted.org/packages/de/c4/3e1c3d6155c16b8737cc31d5b477d6cf1fc7cdd10d58320cf0ec9b446f42/grpcio-1.84.0-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:c5559b492007dc09b4de9b95dab05f0b5e53547aad230cf07e46c7dd017a3be5", size = 8123299, upload-time = "2026-09-14T06:58:54.332Z" }, - { url = "https://files.pythonhosted.org/packages/56/fe/f4864de5b815e5ba18858771f99381a398fac14117f89ef5291ed43d3c4e/grpcio-1.84.0-cp314-cp314-win32.whl", hash = "sha256:2c024da73b296f040b8360e60bd73a659b230093684a438da0e1260f34cc724e", size = 4562560, upload-time = "2026-09-14T06:58:56.894Z" }, - { url = "https://files.pythonhosted.org/packages/44/03/640811d4d8c84f5e603995c5a9bab725223aa472cad9ca4286c3bbf1c3e3/grpcio-1.84.0-cp314-cp314-win_amd64.whl", hash = "sha256:800b7e00d92553313c0463c200087930aa78678ec1d528193aeb50906f55989b", size = 5394092, upload-time = "2026-09-14T06:58:59.61Z" }, - { url = "https://files.pythonhosted.org/packages/4a/1a/9e3d2c9f005f680f03308fa894b1db91d4ab3f0fe65ff630c69561e91e95/grpcio-1.84.0-cp315-cp315-linux_armv7l.whl", hash = "sha256:47ecf0d9b81d981f07b61bd89eced9d2582f5eaacc3aaa36ad27f81aef70a27f", size = 6428252, upload-time = "2026-09-14T06:59:02.597Z" }, - { url = "https://files.pythonhosted.org/packages/77/34/0bc9f52ebf091311651eeab3a452fb557985604a3088cb5406f4d6df85d3/grpcio-1.84.0-cp315-cp315-macosx_10_15_universal2.whl", hash = "sha256:61386101ecaa096b694d0dd278caf99a56aeec78440cc17e918eef0b50f2d567", size = 12359488, upload-time = "2026-09-14T06:59:05.646Z" }, - { url = "https://files.pythonhosted.org/packages/93/0e/c31052712f241cb6ecae9c226fabd519b7f8c64a7a40bac27e9ca0405b78/grpcio-1.84.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.whl", hash = "sha256:f6d178ba6dc8e82976c184b65fddde172d054c17237993a3e083efe4f134d55b", size = 7019339, upload-time = "2026-09-14T06:59:08.76Z" }, - { url = "https://files.pythonhosted.org/packages/55/b9/b9b33ea4f1eb4cad28833cade604febf357385b5ebb0c9c7562d020e167a/grpcio-1.84.0-cp315-cp315-manylinux2014_i686.manylinux_2_17_i686.whl", hash = "sha256:15bb76489e337fc492685c9758e2fd4d4ab516b901ad830dc5a91987decf00be", size = 7107974, upload-time = "2026-09-14T06:59:11.568Z" }, - { url = "https://files.pythonhosted.org/packages/0e/9e/799d4c45db91bbdcd8c54b3982932dbcf3d059f7ce67dca3e8540faa1ece/grpcio-1.84.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.whl", hash = "sha256:82da34ae4f639c73ac46e521e00c0a49bf86f717b9fb1f405f133e98731e38dc", size = 7200036, upload-time = "2026-09-14T06:59:14.401Z" }, - { url = "https://files.pythonhosted.org/packages/45/dc/dcfdd13ada41aff9098f0c2c6f260eb7debbc88b84b7e5fcbd085165427d/grpcio-1.84.0-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:9b73836ba0e16fcbb57c31cf6cbc2907c8d8c790b83679df454b74bd15e0be04", size = 7742281, upload-time = "2026-09-14T06:59:17.348Z" }, - { url = "https://files.pythonhosted.org/packages/55/31/75eab2ec77b80804bc5e21cec99b57598e726fca6484cd3e8920a97639d5/grpcio-1.84.0-cp315-cp315-musllinux_1_2_i686.whl", hash = "sha256:42959bd50dd660ffc3f2a9bec15a6da4f9aaa0dda555d59ff2d2e80b908456a8", size = 8113629, upload-time = "2026-09-14T06:59:20.584Z" }, - { url = "https://files.pythonhosted.org/packages/34/f0/fdcf6bdc1df9ca11679a1187bef8e6b81df31a2baae69497e17344f05ea3/grpcio-1.84.0-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:659728f20fc7a0933ed7b1945435e31014b97ab8a5a7edcbaa70da4794aeb191", size = 8152972, upload-time = "2026-09-14T06:59:24.523Z" }, - { url = "https://files.pythonhosted.org/packages/5c/cf/6720e720bfa80fcb1ace873f66724eb3c8b03bba2fa078a30c12cab3212e/grpcio-1.84.0-cp315-cp315-win32.whl", hash = "sha256:edb6f87fc60ff438557291501b3e16c7a77c3b01a52d782cf276dccc7c5dd89c", size = 4561981, upload-time = "2026-09-14T06:59:27.275Z" }, - { url = "https://files.pythonhosted.org/packages/7f/b9/69d8a709df225bc2e06e028e9465166b174c24b3da07cc72d9a5ddc63194/grpcio-1.84.0-cp315-cp315-win_amd64.whl", hash = "sha256:4119efa6519871719ad81f33bc95ab87857dcb1c5801f30a6e592f2c41164169", size = 5394757, upload-time = "2026-09-14T06:59:30.118Z" }, + { url = "https://files.pythonhosted.org/packages/7e/f5/f66802a942d491edb555dd61e3a9961140fd64c90bce1eafd741609d334d/httpcore-1.0.9-py3-none-any.whl", hash = "sha256:2d400746a40668fc9dec9810239072b40b4484b640a8c38fd654a024c7a1bf55", size = 78784, upload-time = "2025-04-24T22:06:20.566Z" }, +] + +[[package]] +name = "httpx" +version = "0.28.1" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "anyio" }, + { name = "certifi" }, + { name = "httpcore" }, + { name = "idna" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/b1/df/48c586a5fe32a0f01324ee087459e112ebb7224f646c0b5023f5e79e9956/httpx-0.28.1.tar.gz", hash = "sha256:75e98c5f16b0f35b567856f597f06ff2270a374470a5c2392242528e3e3e42fc", size = 141406, upload-time = "2024-12-06T15:37:23.222Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/2a/39/e50c7c3a983047577ee07d2a9e53faf5a69493943ec3f6a384bdc792deb2/httpx-0.28.1-py3-none-any.whl", hash = "sha256:d909fcccc110f8c7faf814ca82a9a4d816bc5a6dbfea25d6591d6985b8ba59ad", size = 73517, upload-time = "2024-12-06T15:37:21.509Z" }, ] [[package]] @@ -1230,40 +1211,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/12/cc/f4fe2c7ce68b92cbf5b2d379ca366e1edae38cccaad00f69f529b460c3ef/netaddr-1.3.0-py3-none-any.whl", hash = "sha256:c2c6a8ebe5554ce33b7d5b3a306b71bbb373e000bbbf2350dd5213cc56e3dbbe", size = 2262023, upload-time = "2024-05-28T21:30:34.191Z" }, ] -[[package]] -name = "opensearch-protobufs" -version = "1.2.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "grpcio" }, - { name = "protobuf" }, -] -wheels = [ - { url = "https://files.pythonhosted.org/packages/d8/2f/e0cc165af7bb7b44cb00023b9fcaa01a28d1755a059ede28d0cd970c3cec/opensearch_protobufs-1.2.0-py3-none-any.whl", hash = "sha256:e806730894d0a0c8cdaa3cdbe07e4b7c46e1823f453777b36caf39e9cba28e2c", size = 54751, upload-time = "2026-01-22T18:51:56.805Z" }, -] - -[[package]] -name = "opensearch-py" -version = "3.2.0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "certifi" }, - { name = "events" }, - { name = "opensearch-protobufs" }, - { name = "python-dateutil" }, - { name = "requests" }, - { name = "urllib3" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/82/9e/e77844cb2d625ca32331bfdd28930113b3778399c01dd5f1c350ceb55e65/opensearch_py-3.2.0.tar.gz", hash = "sha256:f40fb3a295275422df2ad6d9459f667af94472d5a9e567072e9ecf163eb22613", size = 259927, upload-time = "2026-04-27T18:17:50.467Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ef/63/7abb96bf2e3619acbd27de99e60619bfacfb7c55b68c4792a258e6d92871/opensearch_py-3.2.0-py3-none-any.whl", hash = "sha256:721a0d3b13fbed9e82278aed748285cf63a1855354ab7e73e3d4992d1b93418b", size = 387286, upload-time = "2026-04-27T18:17:48.658Z" }, -] - -[package.optional-dependencies] -async = [ - { name = "aiohttp" }, -] - [[package]] name = "packaging" version = "26.3" @@ -1419,21 +1366,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f5/cd/785c64ed382f3f04201870267b02783f63b4678c2acfddc177a3ebcc2727/propcache-0.5.4-py3-none-any.whl", hash = "sha256:62c60aec739ed00124573cce1178138fd690c7676352d67a37328c1cf51d7468", size = 16338, upload-time = "2026-09-16T00:17:13.106Z" }, ] -[[package]] -name = "protobuf" -version = "7.36.2" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/d9/89/5b8517baa72f84a67b8a307ba953c91057af618bf40bf676f3c03551f8f0/protobuf-7.36.2.tar.gz", hash = "sha256:497d0463ff3316681da6c0b9e8d06cb465d61abce00b613ab42226175644d1bb", size = 512737, upload-time = "2026-09-17T20:07:59.326Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/32/72/98342feb672507c8f3a69e34b4fa8961f608edba5c1a48a6f47156d92cb5/protobuf-7.36.2-cp310-abi3-macosx_10_9_universal2.whl", hash = "sha256:cbc70b17ee27e28894c7fee8bb04be1abead49e936bc70eb60052531eee2079e", size = 456039, upload-time = "2026-09-17T20:07:51.542Z" }, - { url = "https://files.pythonhosted.org/packages/b6/ea/91fdf7c2b8bbd49cde056f00a9df6773532987e1c00fe2830b895af95c7e/protobuf-7.36.2-cp310-abi3-manylinux2014_aarch64.whl", hash = "sha256:e11e1f0180583a2af89db6a2ecd9e8dc40aa6d2988ca175bfd0e6d12ea72d74e", size = 344219, upload-time = "2026-09-17T20:07:52.914Z" }, - { url = "https://files.pythonhosted.org/packages/17/ab/5fd5f8ece73fad885c5a09aa849b32d70472f954ba3a92d3bb5974ea953b/protobuf-7.36.2-cp310-abi3-manylinux2014_s390x.whl", hash = "sha256:f4fee11ec330d238b34a05c9b675f693c20415d1c5bd7d5320cc2f8a798eb9cf", size = 357223, upload-time = "2026-09-17T20:07:53.985Z" }, - { url = "https://files.pythonhosted.org/packages/db/f3/3996583dd2906297a637af12114deddf7658af6e683fedb83be061983fb5/protobuf-7.36.2-cp310-abi3-manylinux2014_x86_64.whl", hash = "sha256:89f23aa53c24553a2416fd4fd1ec06f74fa42b14b546d8883128813f775bbfd2", size = 343223, upload-time = "2026-09-17T20:07:54.931Z" }, - { url = "https://files.pythonhosted.org/packages/fc/1b/dcc64f358fcb51811b58ae40b3d28f820725f116d86487cc20bd4b130701/protobuf-7.36.2-cp310-abi3-win32.whl", hash = "sha256:912c1221170e16c08d1f086762f563dd61ff83c18b5fa6652952dfaded66f728", size = 442998, upload-time = "2026-09-17T20:07:55.826Z" }, - { url = "https://files.pythonhosted.org/packages/8a/55/b77bda4e5e5f5971fb51b07663694690e9afdb9402136c16a522bd621cad/protobuf-7.36.2-cp310-abi3-win_amd64.whl", hash = "sha256:a300819d441e078a5608c0d3c709796bb548136058fda017ae51d425b44fd353", size = 456514, upload-time = "2026-09-17T20:07:57.188Z" }, - { url = "https://files.pythonhosted.org/packages/e4/04/d52c7016b04b6c5108f26691f9d33ec82a9b65d041f1a9c771137693d618/protobuf-7.36.2-py3-none-any.whl", hash = "sha256:bdb3a345d48db958e6ce1f18e508beb0cc981d64f24088427549c866cd039f1e", size = 179806, upload-time = "2026-09-17T20:07:58.211Z" }, -] - [[package]] name = "pygments" version = "2.21.0" @@ -1454,11 +1386,13 @@ wheels = [ [[package]] name = "pystashtemplate" -version = "0.1.0" -source = { git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.1.0#e90cf64a3896d910a620d58690afdc45b80b91b1" } +version = "0.2.0" +source = { git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.2.0#87c5b76c572f413953829aaec34a628b34fd58c4" } dependencies = [ + { name = "aiohttp" }, { name = "dnspython" }, { name = "geoip2" }, + { name = "httpx" }, { name = "logstash-pipeline-parser" }, { name = "loguru" }, { name = "lxml" }, @@ -1499,18 +1433,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/9d/7a/d968e294073affff457b041c2be9868a40c1c71f4a35fcc1e45e5493067b/pytest_cov-7.1.0-py3-none-any.whl", hash = "sha256:a0461110b7865f9a271aa1b51e516c9a95de9d696734a2f71e3e78f46e1d4678", size = 22876, upload-time = "2026-03-21T20:11:14.438Z" }, ] -[[package]] -name = "python-dateutil" -version = "2.9.0.post0" -source = { registry = "https://pypi.org/simple" } -dependencies = [ - { name = "six" }, -] -sdist = { url = "https://files.pythonhosted.org/packages/66/c0/0c8b6ad9f17a802ee498c46e004a0eb49bc148f2fd230864601a86dcf6db/python-dateutil-2.9.0.post0.tar.gz", hash = "sha256:37dd54208da7e1cd875388217d5e00ebd4179249f90fb72437e91a35459a0ad3", size = 342432, upload-time = "2024-03-01T18:36:20.211Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/ec/57/56b9bcc3c9c6a792fcbaf139543cee77261f3651ca9da0c93f5c1221264b/python_dateutil-2.9.0.post0-py2.py3-none-any.whl", hash = "sha256:a8b2bc7bffae282281c8140a97d3aa9c14da0b136dfe83f850eea9a5f7470427", size = 229892, upload-time = "2024-03-01T18:36:18.57Z" }, -] - [[package]] name = "pyyaml" version = "6.0.3" @@ -1583,11 +1505,10 @@ wheels = [ [[package]] name = "rsyslogstach" -version = "0.9.0" +version = "0.10.0" source = { editable = "." } dependencies = [ { name = "loguru" }, - { name = "opensearch-py", extra = ["async"] }, { name = "prometheus-client" }, { name = "pystashtemplate" }, ] @@ -1604,9 +1525,8 @@ dev = [ requires-dist = [ { name = "loguru", specifier = ">=0.7" }, { name = "mmdb-writer", marker = "extra == 'dev'", specifier = ">=0.2.7" }, - { name = "opensearch-py", extras = ["async"] }, { name = "prometheus-client", specifier = "==0.26.0" }, - { name = "pystashtemplate", git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.1.0" }, + { name = "pystashtemplate", git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.2.0" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0" }, { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=7.1.0" }, { name = "ruff", marker = "extra == 'dev'" }, @@ -1638,15 +1558,6 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/fe/a0/50787329e4f20bf9dc9f6230015d46ec69c51a97ace5bc202dae4755365d/ruff-0.16.8-py3-none-win_arm64.whl", hash = "sha256:d075e820af612102ce217f07cc93e69f9490b10ec13ea85fa87bd03d996cef8a", size = 10386316, upload-time = "2026-09-16T15:54:43.332Z" }, ] -[[package]] -name = "six" -version = "1.17.0" -source = { registry = "https://pypi.org/simple" } -sdist = { url = "https://files.pythonhosted.org/packages/94/e7/b2c673351809dca68a0e064b6af791aa332cf192da575fd474ed7d6f16a2/six-1.17.0.tar.gz", hash = "sha256:ff70335d468e7eb6ec65b95b99d3a2836546063f63acc5171de367e834932a81", size = 34031, upload-time = "2024-12-04T17:35:28.174Z" } -wheels = [ - { url = "https://files.pythonhosted.org/packages/b7/ce/149a00dd41f10bc29e5921b496af8b574d8413afcd5e30dfa0ed46c2cc5e/six-1.17.0-py2.py3-none-any.whl", hash = "sha256:4721f391ed90541fddacab5acf947aa0d3dc7d27b2e1e8eda2be8970586c3274", size = 11050, upload-time = "2024-12-04T17:35:26.475Z" }, -] - [[package]] name = "tomli" version = "2.5.0"