diff --git a/CHANGELOG.md b/CHANGELOG.md index def5b05..c9289f1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,28 @@ Format : [Keep a Changelog](https://keepachangelog.com/fr/1.1.0/). Les numéros ## [Non publié] +## [0.11.0] - 2026-11-04 + +### Modifié +- **Découpage #111 corrigé (#171)** : seul `omprog` (propre à rsyslog) + reste dans ce dépôt. `indexer`, `dlq`, `metrics` et `opensearchconf` + ont rejoint PyStashTemplate (Mathilde-Team/PyStashTemplate#110) et sont + importés de `pystashtemplate.*` ; `src/indexer.py`, `src/dlq.py`, + `src/metrics.py`, `src/opensearchconf.py` et leurs tests unitaires + (`test_dlq.py`, `test_mtls.py`, parties module de `test_metrics.py` et + `test_opensearchconf.py`) sont supprimés — les tests du câblage dans + `omprog` restent. Les noms de métriques ne changent pas (préfixe + `rsyslogstach`, constante `omprog.METRICS_PREFIX`). +- Dépendance `pystashtemplate` figée sur `v0.3.0` (au lieu de `v0.2.0`) ; + `prometheus-client` n'est plus une dépendance directe (il vient avec + PyStashTemplate). +- `FilterPipeline.apply` est asynchrone depuis PyStashTemplate #36 : + `omprog` l'attend (`await`). +- Documentation : README (tableau des modules, renvois vers + `docs/indexation-metriques.md` de PyStashTemplate pour l'index, les + métriques, la DLQ, la connexion et l'`_id`), `CLAUDE.md`, `FEATURES.md`, + `PATTERNS.md`. + ## [0.10.2] - 2026-11-04 ### Modifié diff --git a/CLAUDE.md b/CLAUDE.md index 15bfe26..2327219 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -15,35 +15,30 @@ le fichier est absent sur `dev`, le chercher sur `main`). Connecteur rsyslog asynchrone en Python : il reçoit les messages syslog via le module `omprog` de rsyslog, leur applique filtres, enrichissement et pipelines `.conf` Logstash **via la bibliothèque [PyStashTemplate](https://github.com/Mathilde-Team/PyStashTemplate)** (découpage #111), puis indexe dans OpenSearch avec une Dead Letter Queue pour les échecs permanents et un fingerprint déterministe pour l'idempotence. -Ce qui relève de la sémantique Logstash (gabarits, filtres, interpréteur, enrichissement, grok, fingerprint, sorties) se développe et se documente dans PyStashTemplate ([FEATURES.md](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/FEATURES.md), [PATTERNS.md](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/PATTERNS.md)) ; les issues correspondantes s'ouvrent dans ce dépôt-là. +Découpage #111 corrigé (#171) : seul `omprog`, propre à rsyslog, reste ici. Ce qui relève de la sémantique Logstash (gabarits, filtres, interpréteur, enrichissement, grok, fingerprint, sorties) et de la livraison (indexer, DLQ, métriques, options de connexion OpenSearch) se développe et se documente dans PyStashTemplate ([FEATURES.md](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/FEATURES.md), [PATTERNS.md](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/PATTERNS.md)) ; les issues correspondantes s'ouvrent dans ce dépôt-là. ## Stack technique - Python >= 3.11, asyncio -- pystashtemplate v0.2.0, tag git figé (gabarits, filtres, `.conf`, enrichissement GeoIP/DNS, sortie `OpenSearchOutput` — et leurs propres dépendances : logstash-pipeline-parser, geoip2/maxminddb, ua-parser, lxml, dnspython…) -- prometheus-client (métriques `/metrics`) +- pystashtemplate v0.3.0, tag git figé (gabarits, filtres, `.conf`, enrichissement GeoIP/DNS, sorties, `indexer`, `dlq`, `metrics`, `opensearchconf` — et leurs propres dépendances : logstash-pipeline-parser, geoip2/maxminddb, ua-parser, lxml, dnspython, prometheus-client…) - loguru (journalisation) ## Architecture des modules ``` src/ -├── omprog.py Point d'entrée asyncio (rsyslog omprog) — dépend de tous les modules ci-dessous + pystashtemplate -├── i18n.py Domaine gettext `rsyslogstach` — dépend de pystashtemplate.tracing -├── opensearchconf.py Connexion OpenSearch lue dans output { opensearch { … } } (#125) — dépend de pystashtemplate.tracing -├── dlq.py Ré-export de pystashtemplate.dlq (LocalDeadLetterQueue, parse_size, parse_duration) -├── metrics.py Metrics Prometheus, endpoint /metrics (#35) — dépend de i18n -└── indexer.py OpenSearchIndexer — délègue à pystashtemplate.outputs.opensearch (#160) — dépend de dlq, i18n +├── omprog.py Point d'entrée asyncio (protocole rsyslog omprog) — dépend de i18n + pystashtemplate +└── i18n.py Domaine gettext `rsyslogstach` — dépend de pystashtemplate.tracing ``` +`indexer`, `dlq`, `metrics` et `opensearchconf` sont importés de `pystashtemplate.*` (voir [docs/indexation-metriques.md](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md)). + ### Graphe de dépendances (acyclique, vérifié par tests/test_no_cross_imports.py) ``` pystashtemplate (dépendance externe) ↑ -i18n, opensearchconf, dlq - ↑ -metrics (→ i18n), indexer (→ dlq, i18n) +i18n ↑ omprog (point d'entrée) ``` @@ -52,13 +47,13 @@ omprog (point d'entrée) - **Traçabilité systématique** : toute fonction de `src/` est décorée par `@traced` de `pystashtemplate.tracing` (entrée + sortie, y compris exceptions). Jamais d'arguments dans les logs (identifiants OpenSearch, clé HMAC). - **Absence de dépendances circulaires** : vérifiée mécaniquement par `tests/test_no_cross_imports.py` (analyse `ast`, pas de simple relecture). -- **Tests sans pytest-asyncio** : `asyncio.run()` direct (voir `test_dlq.py`, `test_omprog.py`). +- **Tests sans pytest-asyncio** : `asyncio.run()` direct (voir `test_omprog.py`). - **Secrets en environnement** : `pystashtemplate.util.opensearch_auth_from_env()` lit `OPENSEARCH_USER`/`OPENSEARCH_PASSWORD` (jamais en argument CLI, visible via `ps aux`). - **Package à plat** : `src/*.py` sans `__init__.py`, importé via `sys.path` (voir `conftest.py`). ## Historique des sessions -Les sessions 5 à 24 portent sur des modules partis dans PyStashTemplate au découpage #111 (templates, enrichment, interpreter, filters, fingerprint, util, tracing). +Les sessions 3 et 5 à 24 portent sur des modules partis dans PyStashTemplate au découpage #111 et à sa correction #171 (templates, enrichment, interpreter, filters, fingerprint, util, tracing, indexer, dlq). - **Session 1** — Démarrage, choix de la stack - **Session 2** — Compatibilité schéma/filtres Logstash diff --git a/FEATURES.md b/FEATURES.md index 30284e4..a5625e9 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -15,21 +15,14 @@ le découpage #111 : [FEATURES.md](https://github.com/Mathilde-Team/PyStashTempl [référence des formats](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/pipeline-logstash.md), [audit des fonctions Logstash](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/audit-fonctions-logstash.md). -### Indexation OpenSearch (module indexer.py) -- `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) - -### Dead Letter Queue (module dlq.py, session 13) -- `LocalDeadLetterQueue.write()` — JSONL append-only -- Uniquement pour erreurs permanentes (RequestError/NotFoundError, 400/404) -- Jamais pour erreurs transitoires (retenue inchangée) -- Écriture dans thread séparé (`asyncio.to_thread`) -- Rotation par taille (`max_bytes`) ou par âge de la plus ancienne entrée (`max_age`), compression gzip, purge par nombre (`backups`) et par âge (`retention`), `parse_size`/`parse_duration` pour les options CLI (issue #27) - -### Fingerprint (`--document-id-fingerprint`, session 17) -- `_id` déterministe calculé par `pystashtemplate.fingerprint` (voir « Indexer » ci-dessous pour les options) +### Indexation, DLQ, métriques, connexion OpenSearch + +Branchés par `omprog.py` (`--opensearch-host`, `--index-pattern`, +`--document-id-template`, `--document-id-fingerprint`, `--dlq-*`, +`--metrics-port`, blocs `opensearch{}` du `.conf`) ; implémentés et +documentés dans PyStashTemplate depuis la correction du découpage #111 +(#171) : modules `indexer`, `dlq`, `metrics` et `opensearchconf`, +[référence](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md). Le pont garde le préfixe de métriques `rsyslogstach`. ## Items "Proposé" — Statut @@ -40,8 +33,8 @@ le découpage #111 : [FEATURES.md](https://github.com/Mathilde-Team/PyStashTempl ## Limites connues -### DLQ (dlq.py) -- Rotation/purge : options `--dlq-max-size`, `--dlq-max-age`, `--dlq-backups`, `--dlq-retention`, `--dlq-no-compress` de `omprog.py` (issue #27) +### DLQ +- Rotation/purge : options `--dlq-max-size`, `--dlq-max-age`, `--dlq-backups`, `--dlq-retention`, `--dlq-no-compress` de `omprog.py` (issue #27), appliquées à `pystashtemplate.dlq.LocalDeadLetterQueue` ### Bibliothèque (PyStashTemplate) - Limites des gabarits, du fingerprint et de l'interpréteur `.conf` : [FEATURES.md de PyStashTemplate](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/FEATURES.md#limites-connues) @@ -52,11 +45,10 @@ le découpage #111 : [FEATURES.md](https://github.com/Mathilde-Team/PyStashTempl - Sorties `output{}` honorées : `opensearch` et `elasticsearch` (`index`, `document_id`) ; `hosts` du pipeline ignoré (nœuds de `--opensearch-host`) - `${VAR}` des pipelines `.conf` non substitués (variables d'environnement Logstash) -### Indexer (indexer.py) -- Réponse du serveur aux redirections (imprimante/série/parallèle) traitée côté serveur, jamais remontée à l'API +### Indexation (`pystashtemplate.indexer`) - **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 +- **`_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 et dans la [référence PyStashTemplate](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md#identifiant-de-document-_id) ## Backlog diff --git a/PATTERNS.md b/PATTERNS.md index 9946c85..80a6c47 100644 --- a/PATTERNS.md +++ b/PATTERNS.md @@ -5,7 +5,8 @@ Depuis le découpage #111, les conventions propres à la bibliothèque le graphe des modules acyclique : `tracing` feuille, `util.add_failure_tags`, `_build_geoip_record`, `fingerprint → templates`) sont dans le [PATTERNS.md de PyStashTemplate](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/PATTERNS.md). Restent ici celles -du connecteur. +du connecteur, qui depuis la correction du découpage (#171) se réduit à +`omprog.py` et `i18n.py`. ## Traçabilité systématique des fonctions @@ -23,12 +24,12 @@ du connecteur. ## Tests sans pytest-asyncio -**Convention :** Les tests async utilisent `asyncio.run()` directement, sans dépendance à `pytest-asyncio` (absente de `requirements-dev.txt`). Voir `test_dlq.py`, `test_indexer.py`. +**Convention :** Les tests async utilisent `asyncio.run()` directement, sans dépendance à `pytest-asyncio` (absente de `requirements-dev.txt`). Voir `test_omprog.py`, `test_integration.py`. ## Package à plat -**Convention :** `src/*.py` sans `__init__.py`, importé via `sys.path` (voir `conftest.py` et `PYTHONPATH=src` dans le déploiement rsyslog). `pyproject.toml` a `package = false` — `uv` gère uniquement l'environnement sans build PEP 517. +**Convention :** `src/*.py` sans `__init__.py`, importé via `sys.path` (voir `conftest.py` et `PYTHONPATH=src` dans le déploiement rsyslog). `pyproject.toml` a `package = true` : la roue expose `omprog` et `i18n` au niveau racine (`only-include = ["src"]`). ## Opérations disque hors boucle asyncio -**Convention :** Les écritures disque se font via `asyncio.to_thread` pour ne jamais bloquer la boucle asyncio d'`omprog` (motif introduit session 4, repris par `dlq.py` session 13). +**Convention :** Les écritures disque se font via `asyncio.to_thread` pour ne jamais bloquer la boucle asyncio d'`omprog` (motif introduit session 4, repris par `pystashtemplate.dlq`). diff --git a/README.md b/README.md index 05df604..275102e 100644 --- a/README.md +++ b/README.md @@ -11,33 +11,38 @@ Pipeline asynchrone en Python qui reçoit les messages syslog via le module `omp ``` rsyslog → omprog (asyncio) → [filters] → [enrichment] → [indexer] → OpenSearch - ↓ ↓ - blocklist DLQ (erreurs 4xx) - geoip fingerprint (_id) + └ RsysLogstach ┘ └──────── PyStashTemplate v0.3.0 ────────┘ + blocklist geoip DLQ (erreurs 4xx) + fingerprint (_id) ``` ### Modules | Module | Rôle | Dépendances | |--------|------|-------------| -| `omprog.py` | Point d'entrée asyncio (rsyslog omprog) | tous les modules du connecteur + `pystashtemplate` | +| `omprog.py` | Point d'entrée asyncio (protocole rsyslog omprog), options de ligne de commande, câblage | `i18n` + `pystashtemplate` | | `i18n.py` | Domaine gettext `rsyslogstach` (chaînes du connecteur) | `pystashtemplate.tracing` | -| `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` — 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.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`, -`multievents`, `dnslookup`, `simples`, `util`, `tracing` — chacun gardant -son rôle et ses dépendances croissantes documentés dans ce README jusqu'à -#111. RsysLogstach, lui, reste le connecteur rsyslog : omprog + livraison -(indexer, dlq) + exploitation (metrics), comme tout autre outil (…beat) -pourrait s'appuyer sur PyStashTemplate. + +Découpage #111 corrigé (#171, v0.11.0) : seul `omprog`, propre à rsyslog, +reste dans ce dépôt. Tout le reste vient de +[PyStashTemplate](https://github.com/Mathilde-Team/PyStashTemplate) +(dépendance figée `v0.3.0`), utilisable par tout autre outil (service +autonome, …beat) : + +- sémantique Logstash : `templates` (gabarits `%{field}`), `filters` + (dissect, drop, regex, kv, mutate, geoip, translate, date), `interpreter` + (`PipelineInterpreter`, `--pipeline-conf`), `enrichment` (dictionnaire + + GeoIP), `grok`, `fingerprint`, `useragent`, `xmlfilter`, `multievents`, + `dnslookup`, `simples`, `util`, `tracing` ; +- livraison et exploitation : `indexer` (`OpenSearchIndexer`, `_id`, + `SendOutcome`), `dlq` (DLQ locale, rotation), `metrics` (Prometheus, + préfixe `rsyslogstach` conservé) et `opensearchconf` (options de + connexion du `.conf`) — documentés dans + [docs/indexation-metriques.md](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md) ; +- sorties agnostiques (`outputs`, plus de vingt destinations) : voir + [docs/sorties.md](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/sorties.md). + `omprog` n'honore aujourd'hui que les blocs `opensearch{}` / + `elasticsearch{}` d'un `--pipeline-conf`. Le graphe de dépendances est acyclique, vérifié mécaniquement par `tests/test_no_cross_imports.py` (analyse `ast`). @@ -94,7 +99,7 @@ Ce qui relève du connecteur dans un `.conf` : sont honorées (`index`, `document_id`) ; `action` (`index`, `create`, `update`, `delete`), `pipeline` et `routing` acceptent des gabarits (#126), par exemple `opensearch { index => "logs" action => "update" document_id => "%{id}" doc_as_upsert => true routing => "%{host}" }`. - Les options de connexion du bloc sont lues par `opensearchconf.py` (#125, + Les options de connexion du bloc sont lues par `pystashtemplate.opensearchconf` (#125, section « Authentification OpenSearch »). - **Plusieurs événements par message** (`clone`, `split`, #141) : chacun est indexé selon ses propres sorties ; rsyslog reçoit un échec transitoire si @@ -162,7 +167,8 @@ toujours vers les nœuds de `--opensearch-host`. ### Métriques Prometheus (issue #35) -Désactivées par défaut. `--metrics-port 9464` démarre un endpoint `/metrics` sur `127.0.0.1` (`--metrics-addr 0.0.0.0` pour l'exposer au réseau) : +Module `pystashtemplate.metrics` ([référence](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md#métriques-prometheus-metrics)) ; +le pont garde le préfixe `rsyslogstach`. Désactivées par défaut. `--metrics-port 9464` démarre un endpoint `/metrics` sur `127.0.0.1` (`--metrics-addr 0.0.0.0` pour l'exposer au réseau) : | Métrique | Type | Contenu | |----------|------|---------| @@ -176,10 +182,11 @@ Désactivées par défaut. `--metrics-port 9464` démarre un endpoint `/metrics` ### Rotation de la DLQ (issue #27) -`LocalDeadLetterQueue` sait rotater et purger son fichier JSONL ; tout est -désactivé par défaut (un seul fichier qui grandit, comme avant). +`pystashtemplate.dlq.LocalDeadLetterQueue` ([référence](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md#dlq-locale-dlq)) +sait rotater et purger son fichier JSONL ; tout est désactivé par défaut +(un seul fichier qui grandit, comme avant). -| Paramètre (`dlq.py`) | Option (`omprog.py`) | Effet | +| Paramètre (`LocalDeadLetterQueue`) | Option (`omprog.py`) | Effet | |---|---|---| | `max_bytes` | `--dlq-max-size 100M` (`parse_size`) | Rotation avant qu'une écriture dépasse cette taille | | `max_age` | `--dlq-max-age 7d` (`parse_duration`) | Rotation quand la plus ancienne entrée dépasse cet âge | @@ -199,7 +206,8 @@ export OPENSEARCH_PASSWORD=secret #### Dans le `.conf` (issue #125) -Les options de connexion du plugin +Lecture assurée par `pystashtemplate.opensearchconf` +([référence](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md#options-de-connexion-du-conf-opensearchconf)). Les options de connexion du plugin [logstash-output-opensearch](https://github.com/opensearch-project/logstash-output-opensearch) sont lues dans les blocs `opensearch{}` / `elasticsearch{}` de `output{}`, y compris dans les branches `if` : @@ -263,6 +271,7 @@ seulement (`chmod 600`). ### Identifiant de document (`_id`) +Calculé par `pystashtemplate.indexer` ([référence](https://github.com/Mathilde-Team/PyStashTemplate/blob/main/docs/indexation-metriques.md#identifiant-de-document-_id)). Deux mécanismes produisent un `_id` déterministe (idempotence : la ré-émission d'un document l'écrase au lieu de le dupliquer) : @@ -353,7 +362,7 @@ Le dépôt ne reprend aucun code de Logstash (Apache-2.0). Depuis le découpage | Dépendance | Licence | |---|---| | logstash-pipeline-parser 0.0.3 | MIT | -| pystashtemplate (git, tag `v0.2.0`) | GPL-3.0-or-later | +| pystashtemplate (git, tag `v0.3.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 8925d48..a2a3cbf 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=6; plural=(n==0 ? 0 : n==1 ? 1 : n==2 ? 2 : n%100>=3 && n%100<=10 ? 3 : n%100>=11 && n%100<=99 ? 4 : 5);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "تم تكوين عدة عقد ({hosts})، ويُستخدم الأولى فقط" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "تم تكوين عدة عقد ({hosts})، ويُستخدم الأولى فقط" diff --git a/lang/bn_BD.po b/lang/bn_BD.po index dc123a2..d7b1f1f 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "একাধিক নোড কনফিগার করা হয়েছে ({hosts})، শুধুমাত্র প্রথমটি ব্যবহৃত হয়" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "একাধিক নোড কনফিগার করা হয়েছে ({hosts})، শুধুমাত্র প্রথমটি ব্যবহৃত হয়" diff --git a/lang/cs_CZ.po b/lang/cs_CZ.po index e93e6ee..45c99f1 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n>=2 && n<=4) ? 1 : 2;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Nakonfigurováno více uzlů ({hosts}), používá se jen první" diff --git a/lang/da_DK.po b/lang/da_DK.po index c2804b5..5392782 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Flere noder konfigureret ({hosts}), kun den første bruges" diff --git a/lang/de_DE.po b/lang/de_DE.po index 11f8ee6..89a1fba 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Mehrere Knoten konfiguriert ({hosts}), nur der erste wird verwendet" diff --git a/lang/el_GR.po b/lang/el_GR.po index 9b200c8..c13133c 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "Διαμορφώθηκαν πολλοί κόμβοι ({hosts}), χρησιμοποιείται μόνο ο πρώτος" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Διαμορφώθηκαν πολλοί κόμβοι ({hosts}), χρησιμοποιείται μόνο ο πρώτος" diff --git a/lang/en_US.po b/lang/en_US.po index faa00f0..ed367a8 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: deusyv\n" "Language-Team: English\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "OpenSearch indexing failed permanently error={error}" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "Prometheus metrics on http://{addr}:{port}/metrics" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "Listen address for /metrics (default: 127.0.0.1)" @@ -247,10 +232,22 @@ 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 définitivement erreur={error}" +#~ msgstr "OpenSearch indexing failed permanently error={error}" + #, python-brace-format #~ msgid "Indexation OpenSearch échouée erreur={error}" #~ msgstr "OpenSearch indexing failed error={error}" +#, python-brace-format +#~ msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" +#~ msgstr "Prometheus metrics on http://{addr}:{port}/metrics" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Several nodes configured ({hosts}), only the first one is used" + #~ msgid "base geoip illisible : {} ({})" #~ msgstr "unreadable geoip database: {} ({})" diff --git a/lang/fa_IR.po b/lang/fa_IR.po index b996625..398694f 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "چندین گره پیکربندی شده است ({hosts})، فقط اولی استفاده می‌شود" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "چندین گره پیکربندی شده است ({hosts})، فقط اولی استفاده می‌شود" diff --git a/lang/fi_FI.po b/lang/fi_FI.po index 6fb0539..c517e17 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Useita solmuja määritetty ({hosts}), vain ensimmäistä käytetään" diff --git a/lang/fr_FR.po b/lang/fr_FR.po index bde6e93..4c6a964 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" diff --git a/lang/he_IL.po b/lang/he_IL.po index 3248ba9..e82e00e 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "הוגדרו מספר צמתים ({hosts}), בשימוש רק הראשון" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "הוגדרו מספר צמתים ({hosts}), בשימוש רק הראשון" diff --git a/lang/hi_IN.po b/lang/hi_IN.po index 6c1fde0..bc77a00 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "कई नोड्स कॉन्फ़िगर किए गए हैं ({hosts}), केवल पहले का उपयोग होता है" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "कई नोड्स कॉन्फ़िगर किए गए हैं ({hosts}), केवल पहले का उपयोग होता है" diff --git a/lang/hu_HU.po b/lang/hu_HU.po index 72ccede..b882b43 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ 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" diff --git a/lang/id_ID.po b/lang/id_ID.po index 1af29f6..fe6cdf0 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Beberapa node dikonfigurasi ({hosts}), hanya yang pertama digunakan" diff --git a/lang/it_IT.po b/lang/it_IT.po index c13a6f9..9c1b47b 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Più nodi configurati ({hosts}), viene usato solo il primo" diff --git a/lang/ja_JP.po b/lang/ja_JP.po index 50cf401..6ec69a3 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "複数のノードが構成されています ({hosts})。最初のノードのみが使用されます" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "複数のノードが構成されています ({hosts})。最初のノードのみが使用されます" diff --git a/lang/ko_KR.po b/lang/ko_KR.po index c0d128b..f2cf1f6 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "여러 노드가 구성되어 있습니다 ({hosts}). 첫 번째 노드만 사용됩니다" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "여러 노드가 구성되어 있습니다 ({hosts}). 첫 번째 노드만 사용됩니다" diff --git a/lang/locale/ar_AR/LC_MESSAGES/rsyslogstach.mo b/lang/locale/ar_AR/LC_MESSAGES/rsyslogstach.mo index 18817f8..99041ad 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 fe7a3ad..1728404 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 65ceefc..0898f23 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 e7859f7..77273ab 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 450ef3f..4b3e838 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 3f3c6a2..8f03251 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 05bebe1..2ee6c64 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 fac4f33..772d8b6 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 d5cc289..61200ae 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 2d44470..7180837 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 1c59d41..0c118a9 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 0ba0f4d..bb253ab 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 bc7ad24..e9966ad 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 8346cc0..f6aa2cd 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 7065bda..e0b4ca4 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 d0d1e2c..531a220 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 4dedea3..4e28ff1 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 893f454..55b3754 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 4f8cc5f..fc8fb49 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 8cbf027..cac83cb 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 cde22a5..e78d388 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 9800bb2..65f3422 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 12aadc9..77485f7 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 5ebc169..0c6d0e3 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 c9f2462..8bdeadd 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 d03e02a..008ff76 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 04d2736..f319085 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 f3ae143..f8fd44b 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 5938462..29d2edb 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -17,21 +17,6 @@ msgstr "" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Pont rsyslog omprog -> OpenSearch, compatible schéma/filtres Logstash." msgstr "" diff --git a/lang/nb_NO.po b/lang/nb_NO.po index 5e6f32c..6270890 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Flere noder konfigurert ({hosts}), bare den første brukes" diff --git a/lang/nl_NL.po b/lang/nl_NL.po index 417885a..e2ab18b 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Meerdere knooppunten geconfigureerd ({hosts}), alleen de eerste wordt gebruikt" diff --git a/lang/pl_PL.po b/lang/pl_PL.po index cb120a8..87b3b5c 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Skonfigurowano kilka węzłów ({hosts}), używany jest tylko pierwszy" diff --git a/lang/pt_BR.po b/lang/pt_BR.po index 327cd5d..182e735 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Vários nós configurados ({hosts}), apenas o primeiro é usado" diff --git a/lang/ro_RO.po b/lang/ro_RO.po index 52967f6..27cb917 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=n==1 ? 0 : (n==0 || (n%100 > 0 && n%100 < 20)) ? 1 : 2;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Mai multe noduri configurate ({hosts}), este folosit doar primul" diff --git a/lang/ru_RU.po b/lang/ru_RU.po index 81b9fa8..1ddd090 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "Настроено несколько узлов ({hosts}), используется только первый" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Настроено несколько узлов ({hosts}), используется только первый" diff --git a/lang/sv_SE.po b/lang/sv_SE.po index 9d8531a..c533379 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Flera noder konfigurerade ({hosts}), endast den första används" diff --git a/lang/th_TH.po b/lang/th_TH.po index 752e16e..52074f1 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "กำหนดค่าโหนดหลายตัวไว้ ({hosts}) ใช้เฉพาะตัวแรกเท่านั้น" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "กำหนดค่าโหนดหลายตัวไว้ ({hosts}) ใช้เฉพาะตัวแรกเท่านั้น" diff --git a/lang/tr_TR.po b/lang/tr_TR.po index 8707bd8..7fd91e9 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ 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" diff --git a/lang/uk_UA.po b/lang/uk_UA.po index 07a93bb..035aba0 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=3; plural=(n%10==1 && n%100!=11 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2);\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "Налаштовано кілька вузлів ({hosts}), використовується лише перший" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "Налаштовано кілька вузлів ({hosts}), використовується лише перший" diff --git a/lang/vi_VN.po b/lang/vi_VN.po index f630616..027c945 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -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 -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ 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" diff --git a/lang/zh_CN.po b/lang/zh_CN.po index 8a65e65..96d48bf 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 22:21+0000\n" +"POT-Creation-Date: 2026-11-04 21:53+0000\n" "PO-Revision-Date: 2026-10-24 17:02+0000\n" "Last-Translator: Automatically generated\n" "Language-Team: none\n" @@ -17,21 +17,6 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=1; plural=0;\n" -#: src/indexer.py -#, python-brace-format -msgid "Indexation OpenSearch échouée définitivement erreur={error}" -msgstr "" - -#: src/indexer.py -#, python-brace-format -msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" -msgstr "配置了多个节点 ({hosts}),仅使用第一个" - -#: src/metrics.py -#, python-brace-format -msgid "Métriques Prometheus sur http://{addr}:{port}/metrics" -msgstr "" - #: src/omprog.py msgid "Adresse d'écoute de /metrics (défaut : 127.0.0.1)" msgstr "" @@ -246,3 +231,7 @@ msgstr "" #, python-brace-format msgid "Échec inattendu du traitement d'un message erreur={error}" msgstr "" + +#, python-brace-format +#~ msgid "Plusieurs nœuds configurés ({hosts}), seul le premier est utilisé" +#~ msgstr "配置了多个节点 ({hosts}),仅使用第一个" diff --git a/pyproject.toml b/pyproject.toml index 9387718..faafcd3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,16 +1,16 @@ [project] name = "rsyslogstach" -version = "0.10.2" +version = "0.11.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", - "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 un tag (v0.2.0) — comme tout autre outil (…beat) pourrait le faire. - "pystashtemplate @ git+https://github.com/Mathilde-Team/PyStashTemplate.git@v0.2.0", + # Découpage #111 corrigé (#171) : seul omprog (propre à rsyslog) reste ici. + # La sémantique Logstash, l'indexation, la DLQ, les métriques (et donc + # prometheus-client) et les options de connexion vivent dans + # PyStashTemplate, dépendance figée sur un tag (v0.3.0). + "pystashtemplate @ git+https://github.com/Mathilde-Team/PyStashTemplate.git@v0.3.0", ] [project.scripts] diff --git a/src/dlq.py b/src/dlq.py deleted file mode 100644 index 70ac2ae..0000000 --- a/src/dlq.py +++ /dev/null @@ -1,32 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -"""Dead letter queue locale pour les échecs d'indexation OpenSearch permanents. - -Nouveau module (session 13), réponse à l'item "Proposé" #2 de FEATURES.md : -`OpenSearchIndexer` traitait jusqu'ici tout échec (connexion refusée *ou* -erreur 4xx de mapping définitive) de la même façon — nouvelle tentative, -puis message rendu à rsyslog. Un document qui provoque une erreur de -mapping permanente (ex. un champ qui ne correspond pas au type attendu par -l'index template) ne devient jamais valide en le rejouant : le retenir -indéfiniment côté rsyslog (retenté toutes les 30 s, cf. rsyslog.conf) ne -fait que boucler pour toujours, sans jamais progresser. - -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 (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 - -from pystashtemplate.dlq import LocalDeadLetterQueue, parse_duration, parse_size - -__all__ = ["LocalDeadLetterQueue", "parse_duration", "parse_size"] diff --git a/src/indexer.py b/src/indexer.py deleted file mode 100644 index 90c7f8f..0000000 --- a/src/indexer.py +++ /dev/null @@ -1,326 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -"""Indexation OpenSearch, un index par jour, avec document_id optionnel façon gabarit Logstash. - -Extrait d'omprog.py (session 9, réorganisation selon le squelette de -Mathilde). Dépend de `tracing`, de `templates` (pour le document_id -dynamique, session 9) et de `dlq` (dead letter queue locale pour les -échecs permanents, session 13 — voir plus bas) ; jamais de `filters` ni -`enrichment` (aucune raison pour l'indexation de connaître les filtres -d'extraction ou l'enrichissement). - -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 - -import enum -from datetime import datetime, timezone -from typing import Any - -from loguru import logger -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 - -from dlq import LocalDeadLetterQueue -from i18n import _ - -OPENSEARCH_TIMEOUT = 3.0 # secondes, timeout socket du client OpenSearch - -# Issue #126 : actions `bulk` du plugin de sortie Logstash. -ACTIONS = ("index", "create", "update", "delete") - - -class ActionInvalideError(ValueError): - """Action inconnue, ou `update`/`delete` sans `_id` : échec permanent (#126).""" - - -class SendOutcome(enum.Enum): - """Résultat d'`OpenSearchIndexer.send`, distingue trois issues (session 13). - - - INDEXED : le document a été indexé avec succès. - - RETRYABLE : échec transitoire — comportement historique (avant la - session 13, seul un booléen existait) : rendre le message à rsyslog - pour qu'il le retienne et le renvoie plus tard. - - DEAD_LETTERED : échec permanent, écrit dans la DLQ locale si - `dlq` est configuré (voir `dlq.py`) — décision de routage - définitive, comme un `DropFilter` (`filters.py`) : ne JAMAIS - retenter, mais confirmer "OK" à rsyslog pour ne pas boucler - indéfiniment (voir FEATURES.md, item "Proposé" #2 avant cette - session). Si `dlq` n'est PAS configuré, ce cas n'est jamais produit : - `send` retombe alors sur RETRYABLE pour rester rétrocompatible avec - le comportement d'avant cette session. - """ - - INDEXED = "indexed" - RETRYABLE = "retryable" - DEAD_LETTERED = "dead_lettered" - - -class OpenSearchIndexer: - """Indexation asynchrone des documents dans OpenSearch, un index par jour. - - document_id : si `document_id_template` est fourni, un gabarit façon - Logstash (`templates.py`, ex. "%{[event_id]}" ou - "%{host}-%{+YYYY.MM.dd}") est rendu contre chaque document pour - produire un `_id` déterministe — même usage que `document_id => - "%{event_id}"` dans un output elasticsearch/opensearch de Logstash - (voir le document de référence, section 5, "Identifiant de document - dynamique"). Sans ce gabarit, OpenSearch génère un `_id` aléatoire - comme avant cette session (comportement par défaut inchangé). Un - gabarit qui rend une chaîne vide (tous ses champs référencés absents) - revient au comportement par défaut pour CE document plutôt que - d'indexer avec un `_id` vide. - - dlq (session 13) : si fourni, un échec d'indexation identifié comme - 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 - HASH du contenu (voir `fingerprint.compute_fingerprint`) plutôt que du - gabarit `document_id_template` — répond à l'item "Proposé" #4 de - FEATURES.md, pour les documents sans champ identifiant naturel. `None` - (défaut) désactive ce mécanisme et laisse `document_id_template` seul - décider, comportement historique inchangé. Les deux options ne sont - PAS combinées : si `document_id_fingerprint_fields` est fourni, il a - priorité sur `document_id_template` pour CE document (voir - `_document_id`) — cohérent avec le fait qu'un fingerprint EST déjà un - identifiant déterministe, inutile de le combiner à un gabarit. - """ - - @traced - def __init__( - self, - hosts: list[dict[str, str | int]], - auth: tuple[str, str] | None, - index_pattern: str, - use_ssl: bool, - verify_certs: bool, - document_id_template: str | None = None, - dlq: LocalDeadLetterQueue | None = None, - document_id_fingerprint_fields: list[str] | None = None, - document_id_fingerprint_method: str = "sha256", - document_id_fingerprint_key: str | None = None, - ca_certs: str | None = None, - client_cert: str | None = None, - client_key: str | None = None, - ) -> None: - """Initialise la sortie OpenSearch de PyStashTemplate. - - Args: - 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 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 - docstring de la classe) pour un `_id` déterministe. - dlq: Dead letter queue locale optionnelle (session 13, voir la - docstring de la classe) pour les échecs permanents. - document_id_fingerprint_fields: Liste de chemins de champs - (session 17, voir la docstring de la classe) pour un `_id` - dérivé d'un hash du contenu, au lieu de - `document_id_template`. `None` (défaut) désactive ce - mécanisme ; une liste VIDE empreint le document entier - (voir `fingerprint.compute_fingerprint`). - document_id_fingerprint_method: Algorithme de hachage - (`sha256` par défaut, voir `fingerprint.py`). - ca_certs: Fichier PEM (ou dossier) de l'autorité qui a signé le - certificat du cluster ; `cacert` du plugin - logstash-output-opensearch (issue #100). `None` : magasin - système / certifi. - client_cert: Certificat client PEM présenté au cluster (mTLS) ; - `tls_certificate` du plugin Logstash (issue #100). - client_key: Clé privée PEM non chiffrée de `client_cert` ; - `tls_key` du plugin Logstash (issue #100). - """ - self._index_pattern = index_pattern - self._document_id_template: CompiledTemplate | None = ( - compile_template(document_id_template) if document_id_template else None - ) - self._document_id_fingerprint_fields = document_id_fingerprint_fields - self._document_id_fingerprint_method = document_id_fingerprint_method - self._document_id_fingerprint_key = document_id_fingerprint_key - self._dlq = dlq - 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) — - délégue à `OpenSearchOutput.health`. - """ - return await self.sortie.health() - - @traced - def _current_index(self) -> str: - """Calcule le nom de l'index du jour à partir du motif configuré.""" - return datetime.now(timezone.utc).strftime(self._index_pattern) - - @traced - def _document_id(self, doc: dict) -> str | None: - """Calcule l'`_id` statique de `doc` : fingerprint si configuré, sinon gabarit, sinon None. - - Priorité (session 17, explicitée par l'issue #33) : - `document_id_fingerprint_fields` d'abord (si non `None`, même une - liste vide), sinon `document_id_template`. Configurer les deux à - la fois est AUTORISÉ (le fingerprint est alors prioritaire — un - gabarit peut servir de repli en changeant de configuration, sans - rien retirer) ; les deux ne sont jamais combinés dans un MÊME - `_id`. Ni l'un ni l'autre configuré, ou empreinte/gabarit rendu - vide pour CE document : `None` (retombe sur un `_id` aléatoire). - """ - if self._document_id_fingerprint_fields is not None: - return compute_fingerprint( - doc, - self._document_id_fingerprint_fields, - self._document_id_fingerprint_method, - key=self._document_id_fingerprint_key, - ) - if self._document_id_template is None: - return None - rendered = render(self._document_id_template, doc, on_missing="empty") - return rendered or None - - @traced - async def _client(self): - """Client httpx paresseux de la sortie (couture d'omprog : template d'index). - - 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. - """ - return self.sortie._client_http() - - @traced - async def send( - self, - doc: dict, - *, - index: str | None = None, - document_id: str | None = None, - action: str = "index", - pipeline: str | None = None, - routing: str | None = None, - doc_as_upsert: bool = False, - ) -> SendOutcome: - """Indexe un document dans OpenSearch (via `OpenSearchOutput.envoyer`). - - Args: - doc: Document déjà enrichi, prêt à indexer. - index: Nom d'index à utiliser pour CE document, au lieu du - motif quotidien statique (`index_pattern`) — surcharge - ponctuelle (session 12) produite par exemple par un output - `elasticsearch`/`opensearch` d'un pipeline `.conf` - interprété (`interpreter.PipelineInterpreter`). `None` - (par défaut) conserve le comportement historique. - document_id: `_id` à utiliser pour CE document, au lieu du - gabarit statique (`document_id_template`) — même logique - de surcharge ponctuelle. Une chaîne vide est traitée comme - `None` (retombe sur `document_id_template`/`_id` - aléatoire), même convention que `_document_id` pour un - gabarit qui rend une chaîne vide. - - action: `index` (défaut), `create`, `update` ou `delete` (#126), - comme l'option `action` du plugin de sortie Logstash. - pipeline: Pipeline d'ingestion OpenSearch (`index`, `create`). - routing: Valeur de routage (`_routing`). - doc_as_upsert: Pour `update` : crée le document s'il manque. - - Returns: - `SendOutcome` (session 13, voir sa docstring) : `INDEXED` si - l'indexation a réussi, `DEAD_LETTERED` si l'échec est permanent - ET qu'une `dlq` est configurée, `RETRYABLE` sinon (échec - transitoire, ou permanent sans `dlq` configurée — comportement - historique). - """ - resolved_index = index or self._current_index() - resolved_id = document_id or self._document_id(doc) - try: - 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 - 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 la sortie (et son client HTTP).""" - await self.sortie.close() diff --git a/src/metrics.py b/src/metrics.py deleted file mode 100644 index 337cd54..0000000 --- a/src/metrics.py +++ /dev/null @@ -1,137 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -"""Métriques Prometheus du pont (issue #35). - -Le pont tournait sans aucune métrique : impossible de suivre en production le -débit, le taux d'erreur ou la taille de la DLQ. Ce module expose, sur un -registre PROPRE à chaque `Metrics` (jamais le registre global de -`prometheus_client`, pour que plusieurs ponts, ou les tests, ne se -marchent pas dessus) : - -- compteurs : `rsyslogstach_messages_received_total`, - `rsyslogstach_messages_total{outcome=...}` (issue d'un message : - `indexed`, `dropped`, `dead_lettered`, `retryable`) et - `rsyslogstach_errors_total{cause=...}` (`invalid_json`, `not_an_object`, - `exception`) ; -- histogrammes : `rsyslogstach_index_latency_seconds` (durée d'un appel - à `indexer.send`) et `rsyslogstach_message_size_bytes` (ligne reçue de - rsyslog, en octets UTF-8) ; -- jauges : `rsyslogstach_dlq_size_bytes` (taille du fichier DLQ courant, - lue à chaque collecte) et `rsyslogstach_retry_pending` (échecs - transitoires consécutifs : messages refusés à rsyslog depuis la dernière - indexation réussie, donc en attente de renvoi). - -L'endpoint HTTP `/metrics` n'est démarré que sur demande -(`--metrics-port`, voir `omprog`) : sans option, le comportement du pont -ne change pas. Dépend seulement de `tracing` (feuille du graphe). -""" - -from __future__ import annotations - -import os -from collections.abc import Callable -from typing import Any - -from loguru import logger -from prometheus_client import CollectorRegistry, Counter, Gauge, Histogram, generate_latest, start_http_server -from pystashtemplate.tracing import traced - -from i18n import _ - -OUTCOMES = ("indexed", "dropped", "dead_lettered", "retryable") -ERROR_CAUSES = ("invalid_json", "not_an_object", "exception") - -# Bornes en secondes : une indexation locale prend quelques ms, un cluster -# lent ou un failover peut dépasser la seconde. -_LATENCY_BUCKETS = (0.005, 0.01, 0.025, 0.05, 0.1, 0.25, 0.5, 1.0, 2.5, 5.0, 10.0) -# Bornes en octets : un message syslog tient d'ordinaire sous 1 Kio, la -# limite de lecture de stdin est de 16 Mio (`omprog._stdin_reader`). -_SIZE_BUCKETS = (128, 256, 512, 1024, 2048, 4096, 8192, 16384, 65536, 262144, 1048576) - - -class Metrics: - """Ensemble des métriques d'un pont, sur son propre registre Prometheus.""" - - @traced - def __init__(self, *, dlq_path: str | None = None) -> None: - """Crée les métriques ; `dlq_path` alimente la jauge de taille de la DLQ (0 sans DLQ).""" - self.registry = CollectorRegistry() - self._dlq_path = dlq_path - self.received = Counter("rsyslogstach_messages_received", "Lignes reçues de rsyslog", registry=self.registry) - self.outcomes = Counter( - "rsyslogstach_messages", "Messages traités, par issue", ["outcome"], registry=self.registry - ) - self.errors = Counter( - "rsyslogstach_errors", "Erreurs de traitement, par cause", ["cause"], registry=self.registry - ) - for outcome in OUTCOMES: - self.outcomes.labels(outcome=outcome) - for cause in ERROR_CAUSES: - self.errors.labels(cause=cause) - self.index_latency = Histogram( - "rsyslogstach_index_latency_seconds", - "Durée d'un envoi à OpenSearch", - buckets=_LATENCY_BUCKETS, - registry=self.registry, - ) - self.message_size = Histogram( - "rsyslogstach_message_size_bytes", - "Taille des lignes reçues de rsyslog", - buckets=_SIZE_BUCKETS, - registry=self.registry, - ) - self.dlq_size = Gauge("rsyslogstach_dlq_size_bytes", "Taille du fichier DLQ courant", registry=self.registry) - self.dlq_size.set_function(self._dlq_size_bytes) - self.retry_pending = Gauge( - "rsyslogstach_retry_pending", - "Échecs transitoires consécutifs depuis la dernière indexation réussie", - registry=self.registry, - ) - - @traced - def _dlq_size_bytes(self) -> float: - """Taille du fichier DLQ courant ; 0 sans DLQ ou tant que le fichier n'existe pas.""" - if not self._dlq_path: - return 0.0 - try: - return float(os.path.getsize(self._dlq_path)) - except OSError as exc: - logger.debug("taille de la DLQ illisible, 0 retenu : {}", exc) - return 0.0 - - @traced - def message_received(self, line: str) -> None: - """Compte une ligne reçue et observe sa taille en octets.""" - self.received.inc() - self.message_size.observe(len(line.encode("utf-8"))) - - @traced - def outcome(self, name: str) -> None: - """Compte l'issue d'un message (`OUTCOMES`) et tient la jauge des renvois à jour.""" - self.outcomes.labels(outcome=name).inc() - if name == "retryable": - self.retry_pending.inc() - elif name == "indexed": - self.retry_pending.set(0) - - @traced - def error(self, cause: str) -> None: - """Compte une erreur de traitement (`ERROR_CAUSES`).""" - self.errors.labels(cause=cause).inc() - - @traced - def render(self) -> bytes: - """Exposition texte Prometheus du registre (contenu de `/metrics`).""" - return generate_latest(self.registry) - - @traced - def serve( - self, port: int, addr: str = "127.0.0.1", *, server_factory: Callable[..., Any] = start_http_server - ) -> Any: - """Démarre l'endpoint HTTP `/metrics` (thread de `prometheus_client`) et le renvoie. - - `server_factory` est injectable pour les tests. Écoute sur la boucle - locale par défaut : exposer les métriques au réseau est un choix - explicite (`--metrics-addr 0.0.0.0`). - """ - logger.info(_("Métriques Prometheus sur http://{addr}:{port}/metrics"), addr=addr, port=port) - return server_factory(port, addr=addr, registry=self.registry) diff --git a/src/omprog.py b/src/omprog.py index 667aa65..26f19dc 100644 --- a/src/omprog.py +++ b/src/omprog.py @@ -29,8 +29,14 @@ ces fichiers sont des chemins, pas des secrets en clair. Ces options peuvent aussi venir du bloc `opensearch{}` du `.conf` (#125, -`opensearchconf`) : la ligne de commande et l'environnement restent -prioritaires. +`pystashtemplate.opensearchconf`) : la ligne de commande et l'environnement +restent prioritaires. + +Découpage #111 corrigé (#171) : `omprog` est le seul module propre à +rsyslog. L'indexation (`pystashtemplate.indexer`), la DLQ +(`pystashtemplate.dlq`), les métriques (`pystashtemplate.metrics`, préfixe +`rsyslogstach` conservé) et les options de connexion +(`pystashtemplate.opensearchconf`) viennent de PyStashTemplate. """ from __future__ import annotations @@ -49,26 +55,36 @@ from urllib.parse import urlsplit from loguru import logger +from pystashtemplate.dlq import LocalDeadLetterQueue, parse_duration, parse_size from pystashtemplate.enrichment import DictEnricher, GeoIPEnricher from pystashtemplate.filters import FilterPipeline +from pystashtemplate.indexer import OpenSearchIndexer, SendOutcome from pystashtemplate.interpreter import PipelineInterpreter +from pystashtemplate.metrics import Metrics +from pystashtemplate.opensearchconf import ( + INDEX_PLUGINS, + apply_connection_options, + collect_connection_options, + conf_auth, +) from pystashtemplate.templates import ESCAPE_STYLES, set_escape_style from pystashtemplate.tracing import traced from pystashtemplate.util import load_json_file, opensearch_auth_from_env -from dlq import LocalDeadLetterQueue, parse_duration, parse_size from i18n import _ -from indexer import OpenSearchIndexer, SendOutcome -from metrics import Metrics -from opensearchconf import apply_connection_options, collect_connection_options, conf_auth ACK_OK = "OK" # Toute réponse autre que « OK » est un échec pour rsyslog : il suspend # l'action puis renvoie le message. Le texte est journalisé par rsyslog. ACK_RETRY = "Erreur : indexation OpenSearch temporairement impossible, message à renvoyer" -# Plugins `output {}` d'un pipeline `.conf` que ce pont sait honorer. -_INDEX_PLUGINS = frozenset({"opensearch", "elasticsearch"}) +# Plugins `output {}` d'un pipeline `.conf` que ce pont sait honorer +# (définis par `pystashtemplate.opensearchconf`, découpage #111 corrigé, #171). +_INDEX_PLUGINS = INDEX_PLUGINS + +# Préfixe historique des métriques du pont (#35), conservé depuis que +# `Metrics` vit dans PyStashTemplate (préfixe `pystashtemplate` par défaut). +METRICS_PREFIX = "rsyslogstach" DEFAULT_INDEX_PATTERN = "switch-logs-%Y.%m.%d" DEFAULT_INDEX_TEMPLATE_NAME = "switch-logs" @@ -273,7 +289,7 @@ class Bridge: interpreter: PipelineInterpreter | None = None pipeline_on_missing: str = "keep" dlq: LocalDeadLetterQueue | None = None - metrics: Metrics = field(default_factory=Metrics) + metrics: Metrics = field(default_factory=lambda: Metrics(prefixe=METRICS_PREFIX)) @traced async def handle_line(self, line: str) -> str: @@ -303,7 +319,8 @@ async def handle_line(self, line: str) -> str: @traced async def handle_doc(self, doc: dict[str, Any]) -> SendOutcome | None: """Filtres, enrichissement, pipeline, indexation. `None` : document abandonné (drop) ou sans sortie.""" - if self.filters is not None and not self.filters.apply(doc, on_missing=self.filters_on_missing): + # FilterPipeline.apply est asynchrone depuis PyStashTemplate #36 (v0.3.0). + if self.filters is not None and not await self.filters.apply(doc, on_missing=self.filters_on_missing): return None for enricher in self.enrichers: enricher.enrich(doc) @@ -460,7 +477,7 @@ def build_bridge(args: argparse.Namespace, *, indexer_factory: Callable[..., Any interpreter=interpreter, pipeline_on_missing=args.pipeline_on_missing, dlq=dlq, - metrics=Metrics(dlq_path=args.dlq_path), + metrics=Metrics(dlq_path=args.dlq_path, prefixe=METRICS_PREFIX), ) diff --git a/src/opensearchconf.py b/src/opensearchconf.py deleted file mode 100644 index 05a2c0c..0000000 --- a/src/opensearchconf.py +++ /dev/null @@ -1,159 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -"""Options de connexion lues dans le bloc `opensearch{}` du `.conf` (issue #125). - -`output { opensearch { hosts => ["os1:9200"] ssl => true user => "u" ... } }` -reprend les options de connexion de logstash-output-opensearch -(`lib/logstash/plugin_mixins/opensearch/api_configs.rb`) : - -- `hosts` : URL ou liste d'URLs ; sans schéma, `https` si `ssl => true`, - `http` sinon (défaut Logstash) ; port 9200 par défaut ; -- `ssl` : booléen ; s'il est donné et contredit le schéma d'une URL - (`ssl => true` avec `http://`), erreur de configuration comme Logstash ; -- `ssl_certificate_verification => false` : certificats non vérifiés ; -- `user` / `password` : authentification basique (les deux ensemble) ; -- `cacert`, `tls_certificate`, `tls_key` : chemins PEM (mTLS, #100). - -Le pont n'a qu'un client OpenSearch : si plusieurs blocs `opensearch{}` / -`elasticsearch{}` donnent des valeurs différentes pour une même option, -le démarrage échoue. La ligne de commande reste prioritaire, de même que -`OPENSEARCH_USER` / `OPENSEARCH_PASSWORD` sur `user` / `password`. -Les valeurs ne sont pas des gabarits sprintf (Logstash ne les rend pas). -Une valeur qui contient encore `${VAR}` (variable d'environnement non -remplacée, issue #122) est refusée plutôt que de se connecter à un hôte -nommé littéralement `${VAR}`. -""" - -from __future__ import annotations - -import argparse -from typing import Any - -from loguru import logger -from pystashtemplate.tracing import traced - -INDEX_PLUGINS = frozenset({"opensearch", "elasticsearch"}) -CONNECTION_OPTIONS = ( - "hosts", - "user", - "password", - "ssl", - "ssl_certificate_verification", - "cacert", - "tls_certificate", - "tls_key", -) -_BOOLEAN_OPTIONS = ("ssl", "ssl_certificate_verification") - - -@traced -def collect_connection_options(plugins: list[tuple[str, dict[str, Any]]]) -> dict[str, Any]: - """Options de connexion des plugins `opensearch` / `elasticsearch`, validées et fusionnées. - - Raises: - ValueError: type invalide, `${VAR}` non remplacée, `user` sans - `password` (ou l'inverse), ou valeurs différentes d'un bloc à l'autre. - """ - merged: dict[str, Any] = {} - for name, options in plugins: - if name not in INDEX_PLUGINS: - continue - for option in CONNECTION_OPTIONS: - if option not in options: - continue - value = _check_value(name, option, options[option]) - if option in merged and merged[option] != value: - raise ValueError( - f"output {name} : option {option!r} différente d'un bloc à l'autre ; " - "le pont n'a qu'une connexion OpenSearch" - ) - merged[option] = value - if ("user" in merged) != ("password" in merged): - raise ValueError("output opensearch : 'user' et 'password' vont ensemble") - logger.debug("collect_connection_options | options={}", sorted(merged)) - return merged - - -@traced -def _check_value(plugin: str, option: str, value: Any) -> Any: - """Contrôle le type d'une option de connexion et la normalise (`hosts` en liste).""" - if option == "hosts": - hosts = [value] if isinstance(value, str) else value - if not isinstance(hosts, list) or not hosts or not all(isinstance(h, str) and h for h in hosts): - raise ValueError(f"output {plugin} : 'hosts' attend une URL ou une liste d'URLs") - checked: Any = hosts - elif option in _BOOLEAN_OPTIONS: - checked = _to_bool(plugin, option, value) - else: - if not isinstance(value, str) or not value: - raise ValueError(f"output {plugin} : {option!r} attend une chaîne non vide") - checked = value - texts = checked if isinstance(checked, list) else [checked] - if any(isinstance(t, str) and "${" in t for t in texts): - raise ValueError(f"output {plugin} : {option!r} contient une variable ${{…}} non remplacée") - logger.debug("_check_value | {} {}", plugin, option) - return checked - - -@traced -def _to_bool(plugin: str, option: str, value: Any) -> bool: - """Booléen Logstash : `true` / `false`, littéral ou chaîne.""" - if isinstance(value, bool): - logger.debug("_to_bool | {}={}", option, value) - return value - if isinstance(value, str) and value.lower() in ("true", "false"): - logger.debug("_to_bool | {}={!r} (chaîne)", option, value) - return value.lower() == "true" - raise ValueError(f"output {plugin} : {option!r} attend true ou false") - - -@traced -def conf_host_urls(options: dict[str, Any]) -> list[str] | None: - """URLs complètes (avec schéma) des `hosts` du `.conf`, ou None s'il n'y en a pas. - - Raises: - ValueError: `ssl` explicite qui contredit le schéma d'une URL. - """ - if "hosts" not in options: - logger.debug("conf_host_urls | pas de hosts") - return None - ssl = options.get("ssl") - default_scheme = "https" if ssl else "http" - urls: list[str] = [] - for host in options["hosts"]: - if "://" in host: - url = host - elif host.startswith("//"): - url = f"{default_scheme}:{host}" - else: - url = f"{default_scheme}://{host}" - scheme = url.split("://", 1)[0].lower() - if ssl is not None and (scheme == "https") != ssl: - raise ValueError(f"output opensearch : ssl => {str(ssl).lower()} mais l'URL {host!r} est en {scheme}://") - urls.append(url) - logger.debug("conf_host_urls | {} URL(s)", len(urls)) - return urls - - -@traced -def apply_connection_options(args: argparse.Namespace, options: dict[str, Any]) -> argparse.Namespace: - """Copie de `args` complétée par les options du `.conf` absentes de la ligne de commande.""" - effective = argparse.Namespace(**vars(args)) - if args.opensearch_host is None: - effective.opensearch_host = conf_host_urls(options) - if options.get("ssl_certificate_verification") is False: - effective.no_verify_certs = True - for option, attribute in (("cacert", "cacert"), ("tls_certificate", "tls_certificate"), ("tls_key", "tls_key")): - if getattr(args, attribute) is None and option in options: - setattr(effective, attribute, options[option]) - logger.debug("apply_connection_options | hosts={}", effective.opensearch_host) - return effective - - -@traced -def conf_auth(options: dict[str, Any]) -> tuple[str, str] | None: - """Couple (`user`, `password`) du `.conf`, ou None.""" - if "user" in options: - logger.debug("conf_auth | user et password présents") - return (options["user"], options["password"]) - logger.debug("conf_auth | aucune") - return None diff --git a/tests/conftest.py b/tests/conftest.py index 02f36d0..3c14eef 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -1,7 +1,6 @@ # SPDX-License-Identifier: GPL-3.0-or-later """Ajoute `src/` au sys.path pour que les tests importent les modules -applicatifs (`templates`, `filters`, `enrichment`, `indexer`, `util`, -`tracing`) sans installation préalable — motif repris du squelette de +applicatifs (`omprog`, `i18n`) sans installation préalable — motif repris du squelette de Mathilde. """ diff --git a/tests/test_actions_sortie.py b/tests/test_actions_sortie.py index 4de723f..639d43e 100644 --- a/tests/test_actions_sortie.py +++ b/tests/test_actions_sortie.py @@ -18,9 +18,9 @@ import httpx import pytest +from pystashtemplate.indexer import ACTIONS, SendOutcome from test_integration import _read_dlq, make_bridge -from indexer import ACTIONS, SendOutcome from omprog import _options_envoi diff --git a/tests/test_dlq.py b/tests/test_dlq.py deleted file mode 100644 index 6bf7e00..0000000 --- a/tests/test_dlq.py +++ /dev/null @@ -1,291 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -"""Tests pytest pour dlq.py::LocalDeadLetterQueue (session 13). - -Pas de dépendance à pytest-asyncio (absente de requirements-dev.txt, -même convention que test_indexer.py) : `write` est piloté via -`asyncio.run()` directement. -""" - -from __future__ import annotations - -import asyncio -import json - -from dlq import LocalDeadLetterQueue - - -class TestWrite: - def test_creates_parent_directory_if_missing(self, tmp_path) -> None: - path = tmp_path / "nested" / "dir" / "dlq.jsonl" - LocalDeadLetterQueue(str(path)) # ne doit pas lever, même si "nested/dir" n'existe pas encore - assert path.parent.is_dir() - assert not path.exists() # le fichier lui-même n'est créé qu'au premier write - - def test_writes_one_json_line_per_call(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path)) - asyncio.run(dlq.write({"message": "un"}, index="idx-1", error="boom")) - asyncio.run(dlq.write({"message": "deux"}, index="idx-1", error="boom encore")) - - lines = path.read_text(encoding="utf-8").splitlines() - assert len(lines) == 2 - assert json.loads(lines[0])["document"] == {"message": "un"} - assert json.loads(lines[1])["document"] == {"message": "deux"} - - def test_entry_contains_expected_keys(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path)) - asyncio.run(dlq.write({"message": "hello"}, index="switch-logs-2026.09.14", error="mapper_parsing_exception")) - - entry = json.loads(path.read_text(encoding="utf-8").splitlines()[0]) - assert entry["@dlq_index"] == "switch-logs-2026.09.14" - assert entry["@dlq_error"] == "mapper_parsing_exception" - assert entry["document"] == {"message": "hello"} - assert "@dlq_timestamp" in entry - - def test_timestamp_is_iso8601_utc(self, tmp_path) -> None: - from datetime import datetime - - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path)) - asyncio.run(dlq.write({"message": "hello"}, index="idx-1", error="boom")) - - entry = json.loads(path.read_text(encoding="utf-8").splitlines()[0]) - parsed = datetime.fromisoformat(entry["@dlq_timestamp"]) - assert parsed.tzinfo is not None # timezone-aware, pas un timestamp naïf - - def test_non_ascii_content_preserved(self, tmp_path) -> None: - """`ensure_ascii=False` : un champ accentué reste lisible tel quel dans le fichier.""" - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path)) - asyncio.run(dlq.write({"message": "événement réseau"}, index="idx-1", error="erreur")) - - raw = path.read_text(encoding="utf-8") - assert "événement réseau" in raw - - def test_appends_without_truncating_existing_content(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - path.write_text(json.dumps({"pre_existing": True}) + "\n", encoding="utf-8") - dlq = LocalDeadLetterQueue(str(path)) - asyncio.run(dlq.write({"message": "nouveau"}, index="idx-1", error="boom")) - - lines = path.read_text(encoding="utf-8").splitlines() - assert len(lines) == 2 - assert json.loads(lines[0]) == {"pre_existing": True} - assert json.loads(lines[1])["document"] == {"message": "nouveau"} - - -# --------------------------------------------------------------------------- # -# Rotation et purge (issue #27) -# --------------------------------------------------------------------------- # - -import gzip # noqa: E402 -import os # noqa: E402 -import time # noqa: E402 -from datetime import datetime, timedelta, timezone # noqa: E402 - -import pytest # noqa: E402 - -from dlq import parse_duration, parse_size # noqa: E402 - - -def _write(dlq: LocalDeadLetterQueue, message: str = "x") -> None: - asyncio.run(dlq.write({"message": message}, index="idx", error="boom")) - - -def _lines(path) -> list[dict]: - opener = gzip.open if str(path).endswith(".gz") else open - with opener(path, "rt", encoding="utf-8") as handle: - return [json.loads(line) for line in handle] - - -class TestParse: - @pytest.mark.parametrize( - ("text", "expected"), - [ - ("0", 0), - ("1048576", 1048576), - ("100M", 100 * 1024**2), - ("100mb", 100 * 1024**2), - ("512k", 512 * 1024), - ("1G", 1024**3), - ("1.5k", 1536), - (" 2 KB ", 2048), - ], - ) - def test_parse_size(self, text, expected) -> None: - assert parse_size(text) == expected - - @pytest.mark.parametrize("text", ["", "-1", "10x", "M", "1 T"]) - def test_parse_size_invalide(self, text) -> None: - with pytest.raises(ValueError, match="taille invalide"): - parse_size(text) - - @pytest.mark.parametrize( - ("text", "expected"), - [ - ("0", timedelta(0)), - ("90", timedelta(seconds=90)), - ("90s", timedelta(seconds=90)), - ("30m", timedelta(minutes=30)), - ("12h", timedelta(hours=12)), - ("7d", timedelta(days=7)), - ("2W", timedelta(weeks=2)), - ], - ) - def test_parse_duration(self, text, expected) -> None: - assert parse_duration(text) == expected - - @pytest.mark.parametrize("text", ["", "7j", "-1d", "1.5h"]) - def test_parse_duration_invalide(self, text) -> None: - with pytest.raises(ValueError, match="durée invalide"): - parse_duration(text) - - -class TestRotation: - def test_desactivee_par_defaut(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path)) - for i in range(50): - _write(dlq, "m" * 200 + str(i)) - assert len(_lines(path)) == 50 - assert dlq.rotated_files() == [] - - def test_valeurs_negatives_refusees(self, tmp_path) -> None: - for kwargs in ( - {"max_bytes": -1}, - {"backups": -1}, - {"max_age": timedelta(seconds=-1)}, - {"retention": timedelta(days=-1)}, - ): - with pytest.raises(ValueError): - LocalDeadLetterQueue(str(tmp_path / "d.jsonl"), **kwargs) - - def test_rotation_par_taille_compressee(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path), max_bytes=400) - for i in range(6): - _write(dlq, f"message {i} " + "x" * 100) - rotated = dlq.rotated_files() - assert rotated and all(p.name.endswith(".gz") for p in rotated) - assert path.stat().st_size <= 400 - messages = [e["document"]["message"] for p in rotated for e in _lines(p)] + [ - e["document"]["message"] for e in _lines(path) - ] - # aucune perte, ordre conservé (rotation avant l'écriture qui dépasserait) - assert [m.split()[1] for m in messages] == [str(i) for i in range(6)] - - def test_une_ligne_plus_grosse_que_le_seuil_reste_ecrite(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path), max_bytes=10) - _write(dlq, "long" * 20) - assert len(_lines(path)) == 1 and dlq.rotated_files() == [] - _write(dlq, "suivant") - assert len(dlq.rotated_files()) == 1 and len(_lines(path)) == 1 - - def test_rotation_sans_compression(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path), compress=False) - _write(dlq) - target = dlq.rotate() - assert target is not None and not target.name.endswith(".gz") - assert _lines(target)[0]["document"] == {"message": "x"} - assert not path.exists() - - def test_rotate_sur_fichier_absent_ou_vide(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path)) - assert dlq.rotate() is None - path.write_text("", encoding="utf-8") - assert dlq.rotate() is None - - def test_rotations_dans_la_meme_seconde_sans_ecrasement(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path)) - names = set() - for i in range(3): - _write(dlq, str(i)) - names.add(dlq.rotate().name) - assert len(names) == 3 - assert [e["document"]["message"] for p in dlq.rotated_files() for e in _lines(p)] == ["0", "1", "2"] - - def test_rotation_par_age_de_la_plus_ancienne_entree(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - old = (datetime.now(timezone.utc) - timedelta(days=8)).isoformat() - path.write_text(json.dumps({"@dlq_timestamp": old, "document": {"message": "vieux"}}) + "\n", encoding="utf-8") - dlq = LocalDeadLetterQueue(str(path), max_age=timedelta(days=7)) - _write(dlq, "neuf") - assert [e["document"]["message"] for e in _lines(path)] == ["neuf"] - assert _lines(dlq.rotated_files()[0])[0]["document"] == {"message": "vieux"} - - def test_pas_de_rotation_si_entree_recente(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path), max_age=timedelta(days=7)) - _write(dlq, "a") - _write(dlq, "b") - assert len(_lines(path)) == 2 and dlq.rotated_files() == [] - - def test_age_par_date_de_modification_si_premiere_ligne_illisible(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - path.write_text("pas du json\n", encoding="utf-8") - old = time.time() - 3600 - os.utime(path, (old, old)) - dlq = LocalDeadLetterQueue(str(path), max_age=timedelta(minutes=30)) - _write(dlq, "neuf") - assert len(dlq.rotated_files()) == 1 - - def test_horodatage_naif_considere_utc(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - naive = (datetime.now(timezone.utc) - timedelta(hours=2)).replace(tzinfo=None).isoformat() - path.write_text(json.dumps({"@dlq_timestamp": naive}) + "\n", encoding="utf-8") - dlq = LocalDeadLetterQueue(str(path), max_age=timedelta(hours=1)) - _write(dlq) - assert len(dlq.rotated_files()) == 1 - - -class TestPurge: - def _rotated(self, tmp_path, *stamps: str) -> LocalDeadLetterQueue: - for stamp in stamps: - (tmp_path / f"dlq.jsonl.{stamp}.gz").write_bytes(gzip.compress(b"{}\n")) - return tmp_path / "dlq.jsonl" - - def test_backups_garde_les_plus_recents(self, tmp_path) -> None: - path = self._rotated(tmp_path, "20260101T000000Z", "20260102T000000Z", "20260103T000000Z") - dlq = LocalDeadLetterQueue(str(path), backups=2) - removed = dlq.purge() - assert [p.name for p in removed] == ["dlq.jsonl.20260101T000000Z.gz"] - assert [p.name for p in dlq.rotated_files()] == [ - "dlq.jsonl.20260102T000000Z.gz", - "dlq.jsonl.20260103T000000Z.gz", - ] - - def test_retention_par_age(self, tmp_path) -> None: - recent = (datetime.now(timezone.utc) - timedelta(days=1)).strftime("%Y%m%dT%H%M%SZ") - path = self._rotated(tmp_path, "20200101T000000Z", recent) - dlq = LocalDeadLetterQueue(str(path), retention=timedelta(days=7)) - assert [p.name for p in dlq.purge()] == ["dlq.jsonl.20200101T000000Z.gz"] - assert [p.name for p in dlq.rotated_files()] == [f"dlq.jsonl.{recent}.gz"] - - def test_purge_apres_rotation(self, tmp_path) -> None: - path = tmp_path / "dlq.jsonl" - dlq = LocalDeadLetterQueue(str(path), backups=2) - for i in range(5): - _write(dlq, str(i)) - dlq.rotate() - kept = dlq.rotated_files() - assert len(kept) == 2 - assert [e["document"]["message"] for p in kept for e in _lines(p)] == ["3", "4"] - - def test_fichiers_etrangers_ignores(self, tmp_path) -> None: - path = self._rotated(tmp_path, "20200101T000000Z") - (tmp_path / "dlq.jsonl.bak").write_text("garde", encoding="utf-8") - (tmp_path / "autre.jsonl.20200101T000000Z.gz").write_bytes(b"") - dlq = LocalDeadLetterQueue(str(path), backups=1, retention=timedelta(days=1)) - assert [p.name for p in dlq.purge()] == ["dlq.jsonl.20200101T000000Z.gz"] - assert (tmp_path / "dlq.jsonl.bak").exists() and (tmp_path / "autre.jsonl.20200101T000000Z.gz").exists() - - def test_sans_reglage_rien_n_est_purge(self, tmp_path) -> None: - path = self._rotated(tmp_path, "20200101T000000Z", "20200102T000000Z") - dlq = LocalDeadLetterQueue(str(path)) - assert dlq.purge() == [] - assert len(dlq.rotated_files()) == 2 diff --git a/tests/test_integration.py b/tests/test_integration.py index dbddbbd..d861453 100644 --- a/tests/test_integration.py +++ b/tests/test_integration.py @@ -33,8 +33,8 @@ import httpx import pytest from loguru import logger +from pystashtemplate.indexer import OpenSearchIndexer, SendOutcome -from indexer import OpenSearchIndexer, SendOutcome from omprog import ACK_OK, ACK_RETRY, build_bridge, build_parser, health_check_loop diff --git a/tests/test_metrics.py b/tests/test_metrics.py index 006f075..cd2a32e 100644 --- a/tests/test_metrics.py +++ b/tests/test_metrics.py @@ -1,5 +1,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later -"""Tests des métriques Prometheus (issue #35) : `src/metrics.py` et leur câblage dans `omprog`. +"""Câblage des métriques Prometheus (issue #35) dans `omprog`. + +Le module `Metrics` vit dans PyStashTemplate (`pystashtemplate.metrics`, +découpage #111 corrigé, #171) où il est testé ; ici, on vérifie que le +pont l'alimente et garde le préfixe historique `rsyslogstach`. Sans pytest-asyncio (CLAUDE.md) : `asyncio.run()` direct. L'endpoint HTTP est démarré pour de vrai sur un port libre de la boucle locale (port 0). @@ -7,15 +11,13 @@ from __future__ import annotations -import urllib.request - from prometheus_client.parser import text_string_to_metric_families +from pystashtemplate.indexer import SendOutcome +from pystashtemplate.metrics import Metrics from test_omprog import FakeIndexer, _args, _bridge, _run from test_omprog_complements import pont_de_test # noqa: F401 - fixture réutilisée import omprog -from indexer import SendOutcome -from metrics import ERROR_CAUSES, OUTCOMES, Metrics def _valeurs(metrics: Metrics) -> dict[tuple[str, tuple], float]: @@ -35,78 +37,6 @@ def _erreur(metrics: Metrics, cause: str) -> float: return _valeurs(metrics)[("rsyslogstach_errors_total", (("cause", cause),))] -# --- module metrics -------------------------------------------------------- - - -def test_series_presentes_a_zero_des_le_depart(): - metrics = Metrics() - valeurs = _valeurs(metrics) - assert valeurs[("rsyslogstach_messages_received_total", ())] == 0 - for outcome in OUTCOMES: - assert _issue(metrics, outcome) == 0 - for cause in ERROR_CAUSES: - assert _erreur(metrics, cause) == 0 - assert valeurs[("rsyslogstach_dlq_size_bytes", ())] == 0 - assert valeurs[("rsyslogstach_retry_pending", ())] == 0 - assert valeurs[("rsyslogstach_index_latency_seconds_count", ())] == 0 - - -def test_registres_independants(): - a, b = Metrics(), Metrics() - a.message_received("x") - assert _valeurs(a)[("rsyslogstach_messages_received_total", ())] == 1 - assert _valeurs(b)[("rsyslogstach_messages_received_total", ())] == 0 - - -def test_taille_des_messages_en_octets_utf8(): - metrics = Metrics() - metrics.message_received("é" * 100) # 200 octets - valeurs = _valeurs(metrics) - assert valeurs[("rsyslogstach_message_size_bytes_sum", ())] == 200 - assert valeurs[("rsyslogstach_message_size_bytes_bucket", (("le", "128.0"),))] == 0 - assert valeurs[("rsyslogstach_message_size_bytes_bucket", (("le", "256.0"),))] == 1 - - -def test_renvois_en_attente_remis_a_zero_par_une_indexation(): - metrics = Metrics() - metrics.outcome("retryable") - metrics.outcome("retryable") - metrics.outcome("dropped") - assert _valeurs(metrics)[("rsyslogstach_retry_pending", ())] == 2 - metrics.outcome("indexed") - assert _valeurs(metrics)[("rsyslogstach_retry_pending", ())] == 0 - assert _issue(metrics, "retryable") == 2 - - -def test_taille_de_la_dlq(tmp_path): - dlq = tmp_path / "dlq.jsonl" - metrics = Metrics(dlq_path=str(dlq)) - assert _valeurs(metrics)[("rsyslogstach_dlq_size_bytes", ())] == 0 # fichier pas encore créé - dlq.write_text("0123456789", encoding="utf-8") - assert _valeurs(metrics)[("rsyslogstach_dlq_size_bytes", ())] == 10 - - -def test_endpoint_http_reel(): - metrics = Metrics() - metrics.error("exception") - server, thread = metrics.serve(0) - try: - port = server.server_port - with urllib.request.urlopen(f"http://127.0.0.1:{port}/metrics", timeout=5) as reponse: - texte = reponse.read().decode("utf-8") - finally: - server.shutdown() - thread.join(timeout=5) - assert 'rsyslogstach_errors_total{cause="exception"} 1.0' in texte - - -def test_serve_transmet_adresse_et_registre(): - appels = [] - metrics = Metrics() - assert metrics.serve(9464, "0.0.0.0", server_factory=lambda *a, **kw: appels.append((a, kw)) or "srv") == "srv" - assert appels == [((9464,), {"addr": "0.0.0.0", "registry": metrics.registry})] - - # --- câblage dans omprog ---------------------------------------------------- diff --git a/tests/test_modules_import.py b/tests/test_modules_import.py index 66a2665..daf4067 100644 --- a/tests/test_modules_import.py +++ b/tests/test_modules_import.py @@ -1,7 +1,9 @@ # SPDX-License-Identifier: GPL-3.0-or-later """Issue #40 : les modules du connecteur s'importent avec les dépendances du projet, sans réseau ni OpenSearch — et, depuis le découpage #111, avec la -bibliothèque PyStashTemplate (dépendance figée v0.1.0).""" +bibliothèque PyStashTemplate (dépendance figée). Découpage corrigé (#171) : +seuls `omprog` et `i18n` restent dans `src/` ; indexer, dlq, metrics et +opensearchconf viennent du paquet.""" from __future__ import annotations @@ -10,7 +12,7 @@ import pytest -@pytest.mark.parametrize("module", ["dlq", "indexer", "metrics", "omprog", "opensearchconf"]) +@pytest.mark.parametrize("module", ["i18n", "omprog"]) def test_import(module): assert importlib.import_module(module) @@ -18,10 +20,14 @@ def test_import(module): @pytest.mark.parametrize( "module", [ + "pystashtemplate.dlq", "pystashtemplate.dnslookup", "pystashtemplate.enrichment", "pystashtemplate.filters", + "pystashtemplate.indexer", "pystashtemplate.interpreter", + "pystashtemplate.metrics", + "pystashtemplate.opensearchconf", "pystashtemplate.templates", ], ) diff --git a/tests/test_mtls.py b/tests/test_mtls.py deleted file mode 100644 index 23a7a37..0000000 --- a/tests/test_mtls.py +++ /dev/null @@ -1,105 +0,0 @@ -# SPDX-License-Identifier: GPL-3.0-or-later -"""Authentification par certificat client (mTLS) vers OpenSearch (issue #100). - -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 - -import asyncio -import shutil -import ssl -import subprocess -from pathlib import Path - -import pytest - -from indexer import OpenSearchIndexer, SendOutcome - -pytestmark = pytest.mark.skipif(shutil.which("openssl") is None, reason="openssl absent") - - -def _openssl(*args: str, cwd: Path) -> None: - subprocess.run(["openssl", *args], cwd=cwd, check=True, capture_output=True) - - -@pytest.fixture(scope="module") -def pki(tmp_path_factory: pytest.TempPathFactory) -> Path: - """Autorité de test, certificat serveur (127.0.0.1) et certificat client.""" - d = tmp_path_factory.mktemp("pki") - _openssl("req", "-x509", "-newkey", "rsa:2048", "-nodes", "-days", "1", "-subj", "/CN=ca-test", - "-addext", "basicConstraints=critical,CA:TRUE", "-addext", "keyUsage=critical,keyCertSign,cRLSign", - "-keyout", "ca.key", "-out", "ca.pem", cwd=d) # fmt: skip - (d / "san.ext").write_text("subjectAltName=IP:127.0.0.1\n", encoding="utf-8") - for nom, ext in (("serveur", ["-extfile", "san.ext"]), ("client", [])): - _openssl("req", "-newkey", "rsa:2048", "-nodes", "-subj", f"/CN={nom}", - "-keyout", f"{nom}.key", "-out", f"{nom}.csr", cwd=d) # fmt: skip - _openssl("x509", "-req", "-in", f"{nom}.csr", "-CA", "ca.pem", "-CAkey", "ca.key", "-CAcreateserial", - "-days", "1", "-out", f"{nom}.pem", *ext, cwd=d) # fmt: skip - return d - - -async def _serveur_mtls(pki: Path) -> tuple[asyncio.Server, int, list[str]]: - """Serveur HTTPS minimal, certificat client obligatoire ; note le CN présenté.""" - contexte = ssl.create_default_context(ssl.Purpose.CLIENT_AUTH, cafile=str(pki / "ca.pem")) - contexte.load_cert_chain(pki / "serveur.pem", pki / "serveur.key") - contexte.verify_mode = ssl.CERT_REQUIRED - clients: list[str] = [] - - async def handle(reader: asyncio.StreamReader, writer: asyncio.StreamWriter) -> None: - 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) - # 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() - + 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, ssl=contexte) - return server, server.sockets[0].getsockname()[1], clients - - -async def _envoyer(pki: Path, *, avec_certificat: bool) -> tuple[SendOutcome, list[str]]: - server, port, clients = await _serveur_mtls(pki) - try: - indexer = OpenSearchIndexer( - hosts=[{"host": "127.0.0.1", "port": port}], - auth=None, - index_pattern="switch-logs-%Y.%m.%d", - use_ssl=True, - verify_certs=True, - ca_certs=str(pki / "ca.pem"), - client_cert=str(pki / "client.pem") if avec_certificat else None, - client_key=str(pki / "client.key") if avec_certificat else None, - ) - try: - return await indexer.send({"a": 1}), clients - finally: - await indexer.close() - finally: - server.close() - await server.wait_closed() - - -def test_certificat_client_accepte(pki: Path) -> None: - """Avec --tls-certificate / --tls-key : document indexé, sans utilisateur ni mot de passe.""" - outcome, clients = asyncio.run(_envoyer(pki, avec_certificat=True)) - assert outcome is SendOutcome.INDEXED - assert "client" in clients - - -def test_sans_certificat_client_refuse(pki: Path) -> None: - """Sans certificat client, le serveur coupe la poignée de main : rien n'est indexé.""" - outcome, clients = asyncio.run(_envoyer(pki, avec_certificat=False)) - assert outcome is not SendOutcome.INDEXED - assert clients == [] diff --git a/tests/test_no_cross_imports.py b/tests/test_no_cross_imports.py index 69885a1..44f884a 100644 --- a/tests/test_no_cross_imports.py +++ b/tests/test_no_cross_imports.py @@ -6,8 +6,8 @@ entre modules » : le graphe des imports internes ne doit contenir aucun cycle. -Depuis le découpage #111, `src/` ne contient plus que le connecteur -(omprog, indexer, dlq, metrics, opensearchconf) : les invariants de la +Depuis le découpage #111 corrigé (#171), `src/` ne contient plus que le +connecteur rsyslog (`omprog`, et son `i18n`) : les invariants de la bibliothèque (tracing feuille, util/enrichment/i18n…) sont vérifiés dans PyStashTemplate. Ici, on vérifie en plus que le connecteur ne dépend que de lui-même et du paquet `pystashtemplate` — et qu'aucun module de @@ -35,6 +35,11 @@ "simples", "filters", "interpreter", + # Découpage #111 corrigé (#171) : passés dans PyStashTemplate. + "dlq", + "indexer", + "metrics", + "opensearchconf", } # Exception #111 : chaque dépôt garde SON module i18n (domaine gettext propre) ; # celui de RsysLogstach traduit les chaînes du connecteur. @@ -48,7 +53,7 @@ def _imports_of(module_name: str) -> set[str]: if isinstance(node, ast.Import): internal.update(alias.name.split(".")[0] for alias in node.names) elif isinstance(node, ast.ImportFrom) and node.module: - # `from dlq import ...` → dlq ; `from pystashtemplate.X import ...` + # `from i18n import ...` → i18n ; `from pystashtemplate.X import ...` # → pystashtemplate.X (hors périmètre de ce graphe). internal.add(node.module) return internal & set(MODULES) @@ -80,8 +85,7 @@ def test_src_ne_contient_que_le_connecteur() -> None: # aucun ne doit revenir (ni exister encore) dans src/. restants = set(MODULES) & MODULES_BIBLIOTHEQUE assert restants == set(), f"modules bibliothèque encore présents dans src/ : {restants}" - for attendu in ("omprog.py", "indexer.py", "dlq.py", "metrics.py", "opensearchconf.py"): - assert (SRC / attendu).is_file(), f"{attendu} manque dans src/" + assert set(MODULES) == {"i18n", "omprog"}, f"src/ ne doit contenir que omprog et i18n : {MODULES}" def test_bibliotheque_importee_via_le_paquet() -> None: diff --git a/tests/test_omprog.py b/tests/test_omprog.py index 2e0bcfb..19f7cc7 100644 --- a/tests/test_omprog.py +++ b/tests/test_omprog.py @@ -16,10 +16,10 @@ from pathlib import Path import pytest +from pystashtemplate.indexer import SendOutcome from pystashtemplate.interpreter import PipelineInterpreter import omprog -from indexer import SendOutcome ROOT = Path(__file__).resolve().parents[1] diff --git a/tests/test_omprog_complements.py b/tests/test_omprog_complements.py index 1d5af84..8a55f0f 100644 --- a/tests/test_omprog_complements.py +++ b/tests/test_omprog_complements.py @@ -20,10 +20,10 @@ import pytest from conftest import IP_STRASBOURG from loguru import logger +from pystashtemplate.indexer import SendOutcome from test_omprog import FakeIndexer, _args, _bridge, _run import omprog -from indexer import SendOutcome ROOT = Path(__file__).resolve().parents[1] diff --git a/tests/test_opensearchconf.py b/tests/test_opensearchconf.py index 7653c33..e5ab23c 100644 --- a/tests/test_opensearchconf.py +++ b/tests/test_opensearchconf.py @@ -7,9 +7,9 @@ import pytest from pystashtemplate.interpreter import PipelineInterpreter +from pystashtemplate.opensearchconf import apply_connection_options, conf_auth import omprog -from opensearchconf import apply_connection_options, collect_connection_options, conf_auth, conf_host_urls class FakeIndexer: @@ -87,58 +87,6 @@ def test_no_verify_certs_cli_reste_actif(tmp_path): assert kw.kwargs["verify_certs"] is False -def test_booleen_en_chaine(): - assert collect_connection_options([("opensearch", {"ssl": "TRUE", "ssl_certificate_verification": "false"})]) == { - "ssl": True, - "ssl_certificate_verification": False, - } - - -@pytest.mark.parametrize( - ("options", "message"), - [ - ({"ssl": "oui"}, "true ou false"), - ({"hosts": []}, "liste d'URLs"), - ({"hosts": [1]}, "liste d'URLs"), - ({"cacert": ""}, "chaîne non vide"), - ({"user": "u"}, "vont ensemble"), - ({"password": "p"}, "vont ensemble"), - ({"hosts": ["${OS_HOST}"]}, "non remplacée"), - ({"password": "${PW}", "user": "u"}, "non remplacée"), - ], -) -def test_options_invalides(options, message): - with pytest.raises(ValueError, match=message): - collect_connection_options([("opensearch", options)]) - - -def test_blocs_contradictoires_refuses(): - with pytest.raises(ValueError, match="différente"): - collect_connection_options([("opensearch", {"hosts": "a"}), ("elasticsearch", {"hosts": ["b"]})]) - - -def test_blocs_identiques_et_autres_plugins_acceptes(): - plugins = [ - ("opensearch", {"hosts": "a", "index": "x"}), - ("stdout", {"hosts": "z"}), - ("opensearch", {"hosts": ["a"]}), - ] - assert collect_connection_options(plugins) == {"hosts": ["a"]} - - -def test_ssl_contredit_le_schema(): - with pytest.raises(ValueError, match="https"): - conf_host_urls({"hosts": ["https://a"], "ssl": False}) - with pytest.raises(ValueError, match="http://"): - conf_host_urls({"hosts": ["http://a"], "ssl": True}) - - -def test_urls_normalisees(): - assert conf_host_urls({}) is None - assert conf_host_urls({"hosts": ["//a:1", "b", "HTTP://c"]}) == ["http://a:1", "http://b", "HTTP://c"] - assert conf_host_urls({"hosts": ["//a"], "ssl": True}) == ["https://a"] - - def test_conf_auth_et_apply_sans_options(): assert conf_auth({}) is None args = omprog.build_parser().parse_args([]) diff --git a/uv.lock b/uv.lock index 47619d1..719272b 100644 --- a/uv.lock +++ b/uv.lock @@ -2,6 +2,19 @@ version = 1 revision = 5 requires-python = ">=3.11" +[[package]] +name = "aio-pika" +version = "10.2.2" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "aiormq" }, + { name = "yarl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/1c/7d/515983f5ffda3801990c5b2cf3635129f30cb419c754830c3abc2ceacf96/aio_pika-10.2.2.tar.gz", hash = "sha256:80db36df038cc183c8e7e2f75c5991af6e0ad6a7a5c2e5c9a81d6bdde5488621", size = 101535, upload-time = "2026-11-02T08:02:48.659Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/75/59/388bbe0aee1e9972f777da35ade716213f66eb929179710aafc18a4c332f/aio_pika-10.2.2-py3-none-any.whl", hash = "sha256:578a12b71c1d8bd4ca526f413dfc17f9224b9d5176c2edc778eaf9de90857a1e", size = 61704, upload-time = "2026-11-02T08:02:46.961Z" }, +] + [[package]] name = "aiohappyeyeballs" version = "2.7.1" @@ -129,6 +142,65 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/a4/37/cfd1ed540a4d318da025590d96b728e63713c09e9377950fc655dadeb856/aiohttp-3.14.3-cp314-cp314t-win_arm64.whl", hash = "sha256:2e1161602f45a54de2ce0905243a95f58cb42dcd378402f3697f5e0b21e9d2e7", size = 469280, upload-time = "2026-07-23T01:57:24.241Z" }, ] +[[package]] +name = "aiokafka" +version = "0.15.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "typing-extensions", marker = "python_full_version < '3.12'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a5/4f/36c64527c239c847a35915e38a4a50b6a7bb0f7e569bfde377d60a2011f3/aiokafka-0.15.0.tar.gz", hash = "sha256:8457e45565544c0888679943a0de2a284526d2ce489ad861f4b740f2f58b5dd0", size = 633412, upload-time = "2026-10-28T17:05:25.935Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/83/fc/9563ed73effa2572bf5dabfa11b54cac535de7f0e0772cbd4860ba48edc7/aiokafka-0.15.0-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:bc9f5afaeaab11fa1d82c0e40d6ae8bde8006912118427bd76b59d12ad1403cf", size = 367762, upload-time = "2026-10-28T17:04:26.365Z" }, + { url = "https://files.pythonhosted.org/packages/7c/d5/97dae65d71424b8fac9e5b9bc7b7a69815802edfc6e4564fae8473d168b8/aiokafka-0.15.0-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:395f84f0cf4ed55af46e799eee394073f2a02b460e3921e9cb010c94afc15374", size = 371857, upload-time = "2026-10-28T17:04:28.172Z" }, + { url = "https://files.pythonhosted.org/packages/ae/f5/f398b439436cbc2c346523aad24fe9ed6f692d402deee3b0ca64a14fb35f/aiokafka-0.15.0-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:64cfcbd8459c9156f60071c420a92c9993c153896b4c1bccc64bb49a8e84d255", size = 1192822, upload-time = "2026-10-28T17:04:29.8Z" }, + { url = "https://files.pythonhosted.org/packages/43/54/f1eae1f885929ac3a6d41a767d7b35396e543e9cca45a5afbe5eef53cc4a/aiokafka-0.15.0-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5135f0abe9cd4218dc6171d02c12cd76258854489b5be21fb3bc9f2cd7cb33f7", size = 1173981, upload-time = "2026-10-28T17:04:31.503Z" }, + { url = "https://files.pythonhosted.org/packages/3a/54/b4e33cc229974fc141bcdc987398b0f2333fa96d637e192c68274c897b64/aiokafka-0.15.0-cp311-cp311-win32.whl", hash = "sha256:9baf427fcad30744a221d221e0efbcf544e9d0a1e93e223dfe2a6ce024e96290", size = 320056, upload-time = "2026-10-28T17:04:33.062Z" }, + { url = "https://files.pythonhosted.org/packages/fa/82/e4d9bcf2216625d7642c6ac1031759963abb50bcac9b8d76835778a76434/aiokafka-0.15.0-cp311-cp311-win_amd64.whl", hash = "sha256:4fee1a68043e4c78cdc173a5bd3e8dbaaf87ff2ef8f08c998859292b48c6d3b8", size = 339401, upload-time = "2026-10-28T17:04:34.788Z" }, + { url = "https://files.pythonhosted.org/packages/16/20/2922672d944f6eea5c4d42b6e0167a4fc2cbb6efa191d89f7442ae16fb10/aiokafka-0.15.0-cp311-cp311-win_arm64.whl", hash = "sha256:1faccf072cdecfd342a439ce4914e90bca75120e8b120fa34ce8f91b68fffdad", size = 330505, upload-time = "2026-10-28T17:04:36.275Z" }, + { url = "https://files.pythonhosted.org/packages/5d/89/0aa7c0deda8a4b607d229b042ed3a32f1bf2c9af9dbddaea3480ef41b65f/aiokafka-0.15.0-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:569d27eb1543819db1d35c0ba7a779a4992575debb3dcb012922efa5568de7ca", size = 370995, upload-time = "2026-10-28T17:04:37.887Z" }, + { url = "https://files.pythonhosted.org/packages/d6/40/8251071571e9e0ace4a9b186e98064463009079023126dfe847a69482d9a/aiokafka-0.15.0-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:e726472daef51682b8e2045aab3cdcd68e4a0569492ddae91b162c39bbbb6682", size = 374198, upload-time = "2026-10-28T17:04:39.6Z" }, + { url = "https://files.pythonhosted.org/packages/3c/e0/4dda411739c635beb4c4cd89e344c98ea2d0aca1a0cac6678913c665211f/aiokafka-0.15.0-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:7f2f2084b6e1981cfc4a12600753ac2b6340029769bf058c69d58684a3ae7db4", size = 1255775, upload-time = "2026-10-28T17:04:41.239Z" }, + { url = "https://files.pythonhosted.org/packages/5f/3e/110f8e583af841c2489f770336abda23dcbe8353fbc09be64d75b728c89d/aiokafka-0.15.0-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:79a7b0110e377faf1932d91bea1f442d18e769241809a0b25df88552ad82a3b1", size = 1244651, upload-time = "2026-10-28T17:04:44.062Z" }, + { url = "https://files.pythonhosted.org/packages/f6/c1/66481fe97b15c9cae270141a9efcc5171cca464db360e9fafedea1d99f97/aiokafka-0.15.0-cp312-cp312-win32.whl", hash = "sha256:a4dab06d9d93cf7cf45cae295850273dc4cfcf055194a4b3baefe25d93235813", size = 320329, upload-time = "2026-10-28T17:04:45.55Z" }, + { url = "https://files.pythonhosted.org/packages/62/6d/73c82e63854d5e714cefc5fd19bfab029ec750e065c592f3a611a1846c2e/aiokafka-0.15.0-cp312-cp312-win_amd64.whl", hash = "sha256:88acb9bdf8aaf2fe47de220ea218fa4646ed1cc8b23eb8337676f2c1b82d3618", size = 337252, upload-time = "2026-10-28T17:04:47.516Z" }, + { url = "https://files.pythonhosted.org/packages/4b/e3/e482fb144ba6b405b57b94482cf0e48f65b0aba5a69ed2dcdf1d9eab91da/aiokafka-0.15.0-cp312-cp312-win_arm64.whl", hash = "sha256:0dcb23b7d4dbdaed542307e3bd0b7b96b6a8493ca645d56c00c7680c666b74cf", size = 328737, upload-time = "2026-10-28T17:04:49.025Z" }, + { url = "https://files.pythonhosted.org/packages/9f/a9/e81f08131066c82b567e0ad3610a78804bd37e7a4647600766ccebe0533d/aiokafka-0.15.0-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:9ea881f33371358cf5de399a50607d57f66280d969efe2c75a38a5d7837103f6", size = 368262, upload-time = "2026-10-28T17:04:50.544Z" }, + { url = "https://files.pythonhosted.org/packages/02/9d/6d998691abde9c343265bdf9b87f1f0464743f2093805c61ac2894943ea2/aiokafka-0.15.0-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:29a919268979e6f5dd68221e3df9de9dbf4db31aea24c8e6f1e75733605d9bae", size = 371185, upload-time = "2026-10-28T17:04:52.999Z" }, + { url = "https://files.pythonhosted.org/packages/62/4c/6cd7f1fdc7888f0d3649e45a6fc9edc174528b6bd8f0e7135c6a5beddfd7/aiokafka-0.15.0-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:08fe870205ce05b5198c05e38a7617e9fe9bf9cb04a2eb67c4defdfcee212277", size = 1236113, upload-time = "2026-10-28T17:04:54.714Z" }, + { url = "https://files.pythonhosted.org/packages/76/32/79bbe0f37a99dd404a4f5fd6c1080a95b3aa61369f7688f77878bbcf7c73/aiokafka-0.15.0-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:d3e34a77da9aa2f2c7db77df240b321964da8a8042a9c35d318e885a57bb42e4", size = 1225417, upload-time = "2026-10-28T17:04:56.172Z" }, + { url = "https://files.pythonhosted.org/packages/9f/f1/03b527bba6436ba7b353f29a0710be4c7547201137bcf07ea9cd554867b2/aiokafka-0.15.0-cp313-cp313-win32.whl", hash = "sha256:5bd1eae658c1e19c68d903d952ed90fa22a5378be43dc95d0bd0869d158df8b3", size = 319007, upload-time = "2026-10-28T17:04:57.732Z" }, + { url = "https://files.pythonhosted.org/packages/ce/d7/a0ff769e20b1d83c904c41505babf4ee2481d38c61d1319046aea0214c56/aiokafka-0.15.0-cp313-cp313-win_amd64.whl", hash = "sha256:e4979bc1335c1bd02d1ed71c5fd3d7eff58effc87f55cf081937f7b82594b54a", size = 334400, upload-time = "2026-10-28T17:04:59.145Z" }, + { url = "https://files.pythonhosted.org/packages/46/14/6124d3c9e14ffbadd7c658576b556e2f63b0d83329f90b9cb7ad603d85fe/aiokafka-0.15.0-cp313-cp313-win_arm64.whl", hash = "sha256:1af146dfe9af17c6f6d275e67bd1e4a7e423e1101d89dc7140d943a00cb6a495", size = 326671, upload-time = "2026-10-28T17:05:00.633Z" }, + { url = "https://files.pythonhosted.org/packages/b0/1c/86fb264bc535a4ddccebe96a7e4816792a8d85fb1fe3b21742b72281b5aa/aiokafka-0.15.0-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:85c93160c2a46f2d4ae9b12c7c4f2ee6b0751802e458cdf70263643f9e22658b", size = 369167, upload-time = "2026-10-28T17:05:02.379Z" }, + { url = "https://files.pythonhosted.org/packages/15/15/eb6a67017370d77a90fd3e926f069b7e7eaa486f405b5427e621187d6932/aiokafka-0.15.0-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:1f2206257c623e4d33a540dbc051763ff9a946ebd76095df5684b7eb19dd5691", size = 372222, upload-time = "2026-10-28T17:05:04.237Z" }, + { url = "https://files.pythonhosted.org/packages/29/fd/24939034ccec013b473c7637589979ece3fd908333785f21b767cffd9021/aiokafka-0.15.0-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:bc028df26d700b32a4549658bcb9e9694109945460d1716c406e2d3ce035b0ec", size = 1233197, upload-time = "2026-10-28T17:05:05.9Z" }, + { url = "https://files.pythonhosted.org/packages/0f/c3/86138eda9303e19e5c04b9b904490d33bfec4a0a5b15010972b1c0fa3938/aiokafka-0.15.0-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:f208274b4e4e852bad1763fd3c62884673021513f080b736a01c119d4792c63a", size = 1214948, upload-time = "2026-10-28T17:05:07.753Z" }, + { url = "https://files.pythonhosted.org/packages/ef/22/c5a446da5af5a42c0850c87f973619cbab396727e87711d01a2634c78e19/aiokafka-0.15.0-cp314-cp314-win32.whl", hash = "sha256:aebb59af49e216f6147888be66e7b04a4075f7ec857db9376801d7f1845c9a77", size = 321994, upload-time = "2026-10-28T17:05:09.34Z" }, + { url = "https://files.pythonhosted.org/packages/c1/4b/9a5391a1c1807edda3c80a9a6c0078af83f291cbc3b0ca5e477becf4c043/aiokafka-0.15.0-cp314-cp314-win_amd64.whl", hash = "sha256:2db1a5074691b1794d22943262124e2711704b27624765db792b4b80d57d58f4", size = 338337, upload-time = "2026-10-28T17:05:10.797Z" }, + { url = "https://files.pythonhosted.org/packages/65/b0/f8973328bfb8e585c35cb499d1bbbfe3dd0d73258f05ac0ba706da63504e/aiokafka-0.15.0-cp314-cp314-win_arm64.whl", hash = "sha256:26d76a3b3171ef9d3b62a6a682c16ed887a7f3392a832db3aab26aa786355252", size = 331121, upload-time = "2026-10-28T17:05:12.823Z" }, + { url = "https://files.pythonhosted.org/packages/75/e9/ff64de628ca7fc5f2cd1c897f23bb6b9385f592a661ae2ac34d657df4da4/aiokafka-0.15.0-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:742fe221d62ef49a5d32ac1cedecda4e132de6cb4aafc806c0e5c34fda35c47b", size = 369092, upload-time = "2026-10-28T17:05:14.407Z" }, + { url = "https://files.pythonhosted.org/packages/a7/4a/ea053f98aab7253673ac10dba6ab0a3c6e3b31044973668e324b1fa7ec04/aiokafka-0.15.0-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:4bc41591dec727225799a7683e4b58ec653a172c46c383447bcb5e9904cb22ae", size = 371726, upload-time = "2026-10-28T17:05:15.938Z" }, + { url = "https://files.pythonhosted.org/packages/8a/67/94182b970f972cf2a23032982762ce597192c18e2936a9b899013ed60098/aiokafka-0.15.0-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:538d4609567d22db59a5d2a3a35a6c3fa9c5d27f63c0c177748580c53b6ec86a", size = 1233823, upload-time = "2026-10-28T17:05:17.581Z" }, + { url = "https://files.pythonhosted.org/packages/5e/e2/0fe112e0f2a2676d77f019b67dd104036283971b24c08182c95e3e89c9f1/aiokafka-0.15.0-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:6189daaa842e4c65c37a92e7c66f67968181f56935a9f82a82e4c37a32d9750f", size = 1238664, upload-time = "2026-10-28T17:05:19.325Z" }, + { url = "https://files.pythonhosted.org/packages/91/d3/0acfd85d00f3abf1b1de663fdc0e41f542ec9390cbf097fa064a673bc64a/aiokafka-0.15.0-cp315-cp315-win32.whl", hash = "sha256:418a0e25c65c258c91c07c2e88537a8615b6deef65c380344116da9e52fbbf1a", size = 321896, upload-time = "2026-10-28T17:05:21.13Z" }, + { url = "https://files.pythonhosted.org/packages/28/44/b6fcf0445f0c29a61c82172903927f206adcc1d80fe8e9446bf1e1bd2c9d/aiokafka-0.15.0-cp315-cp315-win_amd64.whl", hash = "sha256:27f476c53c1c9f5d51c7d353419911ba48fe93ff6f276a43ae5ca5c18c9293fc", size = 338146, upload-time = "2026-10-28T17:05:22.577Z" }, + { url = "https://files.pythonhosted.org/packages/8b/46/9a41fda4bdded7e30bb4f8e07121dc440c74c7f931afb192d44356312749/aiokafka-0.15.0-cp315-cp315-win_arm64.whl", hash = "sha256:342a2441776bebe0f9377f44e9482358e673252ef20dd869a8b5877c803abb6b", size = 330950, upload-time = "2026-10-28T17:05:24.375Z" }, +] + +[[package]] +name = "aiormq" +version = "7.2.5" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "pamqp" }, + { name = "yarl" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a8/c3/18ca94e389ba11a17778160780fa25da5e153a1deb787c5158fa48fdbff6/aiormq-7.2.5.tar.gz", hash = "sha256:250dc99381c004e0b9c3a58a38b0fc04564339aa1e05740fcf3a9578fe810fc2", size = 81592, upload-time = "2026-11-01T12:01:44.908Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/4e/2e4e274d4f717aa38e536dc23388f0e4a3c2929a9d07b941ca539021d417/aiormq-7.2.5-py3-none-any.whl", hash = "sha256:c408686d190d10788ca132899c5ede6b123541bee2ce54ea7167404fac11d779", size = 40696, upload-time = "2026-11-01T12:01:43.45Z" }, +] + [[package]] name = "aiosignal" version = "1.4.0" @@ -155,6 +227,15 @@ 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 = "async-timeout" +version = "5.0.1" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/a5/ae/136395dfbfe00dfc94da3f3e136d0b13f394cba8f4841120e34226265780/async_timeout-5.0.1.tar.gz", hash = "sha256:d9321a7a3d5a6a5e187e824d2fa0793ce379a202935782d555d6e9d2735677d3", size = 9274, upload-time = "2024-11-06T16:41:39.6Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/fe/ba/e2081de779ca30d473f21f5b30e0e737c438205440784c7dfc81efc2b029/async_timeout-5.0.1-py3-none-any.whl", hash = "sha256:39e3809566ff85354557ec2398b55e096c8364bacac9405a7a1fa429e77fe76c", size = 6233, upload-time = "2024-11-06T16:41:37.9Z" }, +] + [[package]] name = "attrs" version = "26.1.0" @@ -1044,6 +1125,94 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/c2/6f/727d4255c2ca4957f87400852449f22f148b4278529701c67c6c65dadafb/mmh3-5.3.1-cp315-cp315t-win_arm64.whl", hash = "sha256:c90b3503675892e7496bec63e2e18e413798a062e5d54e6cf220c2bf0bb7fe69", size = 41323, upload-time = "2026-09-30T17:38:08.405Z" }, ] +[[package]] +name = "msgpack" +version = "1.2.4" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/cc/52/1ec7ead2c7528bf3d1db73e886fa4df10f9e6f0eb7854a448b7090cfcef7/msgpack-1.2.4.tar.gz", hash = "sha256:475c44e12f2a5de766a8448783f149c9b33f3f49b88953c6cd739a77d93c732c", size = 197764, upload-time = "2026-10-26T17:55:48.593Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/64/cb/a3bd4d234c0f2f7e646b9be259b801c5d6a35c97f93dded4f722e6b80acd/msgpack-1.2.4-cp311-cp311-macosx_10_9_x86_64.whl", hash = "sha256:1095b1ebcc8c9d3e70c51240b7160d8e9da66044e0a45c3ef8403d3a9ef0c5ad", size = 90935, upload-time = "2026-10-26T17:53:46.588Z" }, + { url = "https://files.pythonhosted.org/packages/56/3c/fc87d06bdfc99b302f4379f0eb34bb8695b6ecd90b965652d0a3195d1acd/msgpack-1.2.4-cp311-cp311-macosx_11_0_arm64.whl", hash = "sha256:a4b47ec7422bef149223786a87df80067ac65bfc7c0565e5cf1dfbdc40acee50", size = 90187, upload-time = "2026-10-26T17:53:48.151Z" }, + { url = "https://files.pythonhosted.org/packages/05/a3/abebe12c1b589b7eeab60cb87dd5eb398fcf549bdafca8c30d8d73e48493/msgpack-1.2.4-cp311-cp311-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0c75cfda0d3ccb1f6abc20e0608ad6b226e11f317b5ac297721504d2509e2bd9", size = 466911, upload-time = "2026-10-26T17:53:49.536Z" }, + { url = "https://files.pythonhosted.org/packages/03/41/ed5517a107628f6f7f3a1f46f19de3aca979bd1fc95861cb56ce0e4bcc02/msgpack-1.2.4-cp311-cp311-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:a45ceb5f199d5e388f28b550ba881096a3740d4bda10e661d77f59d9a2e8187a", size = 480247, upload-time = "2026-10-26T17:53:51.211Z" }, + { url = "https://files.pythonhosted.org/packages/31/71/14c39858380e11408fcf75aeab1cda0afb253cd8f62a01fbe4ae1838b66f/msgpack-1.2.4-cp311-cp311-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7ca62b31a873c70b73f367bb2c1efec1d143016642c5191405549578184ff6ff", size = 438298, upload-time = "2026-10-26T17:53:52.919Z" }, + { url = "https://files.pythonhosted.org/packages/3b/73/ba40b91632e011851e1a397d53e0bd031848751902424a5b37c33f7de412/msgpack-1.2.4-cp311-cp311-musllinux_1_2_aarch64.whl", hash = "sha256:f641971d3eec89ffca57fa36d151ad1cf1b6a214b47faca16cb165c7d45ef8be", size = 461600, upload-time = "2026-10-26T17:53:54.8Z" }, + { url = "https://files.pythonhosted.org/packages/51/f0/c13ce7e7a7d8dabc1a48eecf61eb789084dbcc64374a7f19770eaf96f2c3/msgpack-1.2.4-cp311-cp311-musllinux_1_2_riscv64.whl", hash = "sha256:b9eff629190a4b118549b654df32a56ed535351819f690d0c935d185500cc90b", size = 435020, upload-time = "2026-10-26T17:53:56.433Z" }, + { url = "https://files.pythonhosted.org/packages/b4/d2/2a4e254f8ee5d5dd5019bd9f99164d79704788dbe16d9d6de77fda4e6727/msgpack-1.2.4-cp311-cp311-musllinux_1_2_x86_64.whl", hash = "sha256:4e22c6571ab6ac9036da87d8a6fddb4baf86981844b480c0c60a4a4be417ee48", size = 479138, upload-time = "2026-10-26T17:53:57.918Z" }, + { url = "https://files.pythonhosted.org/packages/70/b6/28f7eb3f38e3b6ea1f87f36c44cc25ab0eeb451147b5ff61637ce3d0b839/msgpack-1.2.4-cp311-cp311-win32.whl", hash = "sha256:5d7d4d2a5fc6a604f20c546ee1e8327bed1e9329be2417cef9af1f799f3e55e0", size = 67926, upload-time = "2026-10-26T17:53:59.172Z" }, + { url = "https://files.pythonhosted.org/packages/b9/9e/67a97d5caa41bcbdbb4fae7bf5009b60222c72d0748364ac9e32de334a4e/msgpack-1.2.4-cp311-cp311-win_amd64.whl", hash = "sha256:9db832747bd05834530189e564a3fe31e2617547dc1f3a005f835eafc2b8e048", size = 76117, upload-time = "2026-10-26T17:54:00.403Z" }, + { url = "https://files.pythonhosted.org/packages/32/43/890b028b2cdb6b75fd56bd9388466c9fea9f10a31ebb685c489c5cb32fa9/msgpack-1.2.4-cp311-cp311-win_arm64.whl", hash = "sha256:deb1730c4c0c1a8c975be2f43efea6ee4834d35031a39075f78917d0ba8b3c04", size = 72632, upload-time = "2026-10-26T17:54:01.798Z" }, + { url = "https://files.pythonhosted.org/packages/27/fd/45f6cd13cefbb659a8e0128ea64d51b349571163fec3c9c20f99792dc42a/msgpack-1.2.4-cp312-cp312-macosx_10_13_x86_64.whl", hash = "sha256:90cba4996b18ec1201fcaabd01ec48ff4b9755416bcd52105ded2f89fe145c49", size = 91903, upload-time = "2026-10-26T17:54:03.097Z" }, + { url = "https://files.pythonhosted.org/packages/7f/89/169c2a0b1ffeafe68a4f13d8d96b6ed1cd8d40d8262b3a6690851da7eda1/msgpack-1.2.4-cp312-cp312-macosx_11_0_arm64.whl", hash = "sha256:112933726919f4239646cca9572e2c2fa5626358c670da8440aac09403100a48", size = 90573, upload-time = "2026-10-26T17:54:04.383Z" }, + { url = "https://files.pythonhosted.org/packages/cf/8e/272a384f2a001cfced1baab0a8abdd912d6281432670f4609d1aab718d7b/msgpack-1.2.4-cp312-cp312-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:9ca1e78106675f2aed07dc37b842ce19be70010ab22c5c5c04688f0840d48539", size = 461057, upload-time = "2026-10-26T17:54:05.821Z" }, + { url = "https://files.pythonhosted.org/packages/1e/d9/f59bd841fc2fd2b74dc50ce85860a6a25f58e588dd48946aeaf2862cf990/msgpack-1.2.4-cp312-cp312-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:c4d5bbdbea8f5669b3a734d6c226772804fb120848f99cbe63a0ddee63b049c9", size = 475652, upload-time = "2026-10-26T17:54:07.414Z" }, + { url = "https://files.pythonhosted.org/packages/00/03/afd000e1b1e28fd535dc8c7bc21ebb88923bc1964a2429fe660fb313ace3/msgpack-1.2.4-cp312-cp312-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:0d9ff7f3aaffd84010f1c501b05406a497584f5cab2f732eb9d89bf960e12f6f", size = 427082, upload-time = "2026-10-26T17:54:09.1Z" }, + { url = "https://files.pythonhosted.org/packages/f7/7a/e2890b272883c496faad777324ddb70e9cc4a6c63731962a4a39a6a40f44/msgpack-1.2.4-cp312-cp312-musllinux_1_2_aarch64.whl", hash = "sha256:aa10dc04c03408f31948ac1896a942141fd8d7a954b3612edac79f19663e4076", size = 451956, upload-time = "2026-10-26T17:54:10.476Z" }, + { url = "https://files.pythonhosted.org/packages/c2/46/0c1b240b8a580af3e72139c33b018025440a1a42c2579e82e39b1195ee36/msgpack-1.2.4-cp312-cp312-musllinux_1_2_riscv64.whl", hash = "sha256:472a25463678f2795143a7cb42e88a1b59cc2375e9881917e69a9323bde42114", size = 423833, upload-time = "2026-10-26T17:54:12.195Z" }, + { url = "https://files.pythonhosted.org/packages/80/8e/851415b1a9264e6abf64d8a9617d856769d59e247fb9470106f133aedbae/msgpack-1.2.4-cp312-cp312-musllinux_1_2_x86_64.whl", hash = "sha256:cbb8a677da3e845713925e9a203b8a120b1e9da9989836890ba4a4a187902701", size = 470951, upload-time = "2026-10-26T17:54:13.764Z" }, + { url = "https://files.pythonhosted.org/packages/c9/74/d75bf61aab9cb88b84f7d3a8eca8dd92e19a742b77ded300a1177e88d031/msgpack-1.2.4-cp312-cp312-win32.whl", hash = "sha256:2b0b7dff5beddc10f16ecea6b28c6b98014d1135d7015bd83adff5037f35848d", size = 68786, upload-time = "2026-10-26T17:54:15.049Z" }, + { url = "https://files.pythonhosted.org/packages/81/c5/dd0e78eb04f9a0773a810d25ef2cd8f16bb941487567d0c63f814881133c/msgpack-1.2.4-cp312-cp312-win_amd64.whl", hash = "sha256:6e38b123681df22373d545520f54bbeddc4706d9235a1161061f12bd6648497d", size = 77272, upload-time = "2026-10-26T17:54:16.491Z" }, + { url = "https://files.pythonhosted.org/packages/65/e7/b38f63ae82777c0077daa56c4b09af39d29dcb8927ab2ff59268094069c5/msgpack-1.2.4-cp312-cp312-win_arm64.whl", hash = "sha256:6795c588b210b2f13d62c8fcc23bf779b509b839ec5c197a7ab4f5191459e126", size = 71884, upload-time = "2026-10-26T17:54:17.995Z" }, + { url = "https://files.pythonhosted.org/packages/2d/26/16eaad5fe6e199334fa5bd66070778665717c86e9a273525dc706ddb06a7/msgpack-1.2.4-cp313-cp313-macosx_10_13_x86_64.whl", hash = "sha256:fb811ac3d463a75013b234d2aae56b9f0bdb0105caf4dd2ee65305b6a8a6078d", size = 92057, upload-time = "2026-10-26T17:54:19.616Z" }, + { url = "https://files.pythonhosted.org/packages/9c/b8/9660be6d120820bc05106f291e824c73d35f4ab77d927788ae67ea80889c/msgpack-1.2.4-cp313-cp313-macosx_11_0_arm64.whl", hash = "sha256:36258fd0909e1bf26e94604439108846432abe4ffa9a23c9dc2f6f1c60f94b60", size = 90542, upload-time = "2026-10-26T17:54:20.965Z" }, + { url = "https://files.pythonhosted.org/packages/6c/10/cd55a69fec29df26884b178dc4b1803442ec82abf929604aac619881917a/msgpack-1.2.4-cp313-cp313-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:e9c5ba0f053a7e98f013f083c9d1b2dffb26cad8c897c533d8286e44ed24c669", size = 455798, upload-time = "2026-10-26T17:54:22.434Z" }, + { url = "https://files.pythonhosted.org/packages/c9/94/562e0733593a780c70b0b18994f30c205149f7f9f4efbe3e9b00b88612c5/msgpack-1.2.4-cp313-cp313-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:7fabd415c41e62006c6641fcdf5b3e866f581c4e11c58328c0d0f69584b9577d", size = 469262, upload-time = "2026-10-26T17:54:24.043Z" }, + { url = "https://files.pythonhosted.org/packages/bb/92/76d1a5c597e04e1d360b05573d150bdb4502f5a014e6e9cf089c9537c156/msgpack-1.2.4-cp313-cp313-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:7433d340de45003db3ed909a642c9469b598d175530f7a707cbaba64287d27ce", size = 420789, upload-time = "2026-10-26T17:54:25.587Z" }, + { url = "https://files.pythonhosted.org/packages/8a/c6/b72b8d8022718380db459ced8ffbabc7570ad2d22c7f2fa659c872cb6734/msgpack-1.2.4-cp313-cp313-musllinux_1_2_aarch64.whl", hash = "sha256:ccd6e4af5347eb9828147320449bcd30e3321f6397d4583ff16047485dd8be3d", size = 447068, upload-time = "2026-10-26T17:54:27.721Z" }, + { url = "https://files.pythonhosted.org/packages/cb/dc/f378ef1def4aa135e70325c09e22457f3203ae2a390a192e892267906f33/msgpack-1.2.4-cp313-cp313-musllinux_1_2_riscv64.whl", hash = "sha256:23d1459a1d0b4c9f6629df072d592eb74424b3ed3656b69af507bc9023cc027f", size = 418896, upload-time = "2026-10-26T17:54:29.325Z" }, + { url = "https://files.pythonhosted.org/packages/62/93/a7e507378f43e91415cb6fda47e0ded0c9de1618a1f4ac4f2887912a92dd/msgpack-1.2.4-cp313-cp313-musllinux_1_2_x86_64.whl", hash = "sha256:9e73761fe9fc55a4e9d2df8e8f59b0979231af4dbf80b8bf90cd64c74173d779", size = 465764, upload-time = "2026-10-26T17:54:30.719Z" }, + { url = "https://files.pythonhosted.org/packages/60/76/7f39f49cbcdaa4aafe64b4941b2640772dbdc1cac3a9332f4c9ba6994da9/msgpack-1.2.4-cp313-cp313-pyemscripten_2025_0_wasm32.whl", hash = "sha256:d088d1f552e129859db830692268747aba0a1ee3e6e0fe6344dbb3aab1df9f6c", size = 53615, upload-time = "2026-10-26T17:54:32.213Z" }, + { url = "https://files.pythonhosted.org/packages/67/9b/85b93350dbd7b52b358882f7f17a88a03664a7a59a359406e6315c162634/msgpack-1.2.4-cp313-cp313-win32.whl", hash = "sha256:892d4f17d7962bfd2c2928b0a47542bf2948f074a7c04721b73d4138b70481e4", size = 68724, upload-time = "2026-10-26T17:54:33.484Z" }, + { url = "https://files.pythonhosted.org/packages/02/4a/a7e2778ce09a943c17b6f91c7acb2f9488357657c01f2cccb278297621c4/msgpack-1.2.4-cp313-cp313-win_amd64.whl", hash = "sha256:318d4e634d2b320be10decd9968ad1ae0be1d80cba23b5528c37b429eeb0e3e0", size = 77039, upload-time = "2026-10-26T17:54:35.016Z" }, + { url = "https://files.pythonhosted.org/packages/64/16/9ff7495a9853e9d7de74965fdadce15017e7213ce564bb5dafc5403c9108/msgpack-1.2.4-cp313-cp313-win_arm64.whl", hash = "sha256:bec3e34749b90cfcf116149aad11295c720ff4a74a7d0a35abdb968a396c1524", size = 71873, upload-time = "2026-10-26T17:54:36.19Z" }, + { url = "https://files.pythonhosted.org/packages/86/34/747f9ea2b428088201c73fcb3a885cebcbedcd71def0f1f3c36896294b27/msgpack-1.2.4-cp314-cp314-macosx_10_15_x86_64.whl", hash = "sha256:895e9369185df4a874768849405c30cba7990caceb3fcb1692ebe62bb050f55e", size = 92449, upload-time = "2026-10-26T17:54:37.503Z" }, + { url = "https://files.pythonhosted.org/packages/83/7e/52d208cb1561f869762c17be0e2c004e4d34f2842d239a450492d6246d62/msgpack-1.2.4-cp314-cp314-macosx_11_0_arm64.whl", hash = "sha256:c97f5f17407e1761f23f1944be33cbf1d5ce67017db32544dcd5e16e0b1b4a3b", size = 91202, upload-time = "2026-10-26T17:54:38.797Z" }, + { url = "https://files.pythonhosted.org/packages/2e/58/5516cabb60da83506024015c669622a0277979aef51eb611308cebaf4cc9/msgpack-1.2.4-cp314-cp314-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:2444a4e04f924630d059ae6eae8f91fdfcd28ed9fd17b21bacf4e74550a091f7", size = 455185, upload-time = "2026-10-26T17:54:40.213Z" }, + { url = "https://files.pythonhosted.org/packages/39/8f/bf975b5d2111e4954a0f8567fc6b60bab22c8766dd4fa509af1334c91a4f/msgpack-1.2.4-cp314-cp314-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:5d65b791ce4283e02b6267742ad540899155e1b32887b9cbdda47f38f5a076b5", size = 465078, upload-time = "2026-10-26T17:54:41.971Z" }, + { url = "https://files.pythonhosted.org/packages/32/2f/c74baeafc53d1c1fadfbeb774444d0e6354778d12b40b827e437a7a35856/msgpack-1.2.4-cp314-cp314-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:5e4c67dbac05dce90a3fa1d845137617383c415e6b319062baac9734540706ae", size = 420144, upload-time = "2026-10-26T17:54:44.994Z" }, + { url = "https://files.pythonhosted.org/packages/b0/f2/bdf2ce9e284821397dc5549101824c7607ee6ba6e0635390d168a77ac49c/msgpack-1.2.4-cp314-cp314-musllinux_1_2_aarch64.whl", hash = "sha256:781e856db4f2cb398e4992e2a74305295d3ebf694eec26fa0f4bc766eb9fa0a0", size = 446479, upload-time = "2026-10-26T17:54:46.484Z" }, + { url = "https://files.pythonhosted.org/packages/76/8d/b4572d24bb75d98bcbbd031a934a3a1d03494ea88a100cd51ab16c4c7d57/msgpack-1.2.4-cp314-cp314-musllinux_1_2_riscv64.whl", hash = "sha256:cfc1cc237792f9a5664002b66acb961027d4184528ec9d10e0e42330f7972383", size = 418780, upload-time = "2026-10-26T17:54:48.04Z" }, + { url = "https://files.pythonhosted.org/packages/55/8e/4493bef4422730cfd3420b84094652fabd27ef8aadc8b443a8995b524d08/msgpack-1.2.4-cp314-cp314-musllinux_1_2_x86_64.whl", hash = "sha256:f60de6ae13d4d2a12a483f15c5e47cb6fa2731aa32d92fb31178e2017d6574a8", size = 462009, upload-time = "2026-10-26T17:54:49.433Z" }, + { url = "https://files.pythonhosted.org/packages/41/29/efdc3d1d09e4e0e45955b0aad559b4c1f5d908767c9fb1021990c52182a5/msgpack-1.2.4-cp314-cp314-pyemscripten_2026_0_wasm32.whl", hash = "sha256:06a0657a4110d563255006b7cb7147432f67827144e429c2cdb1c967548d1817", size = 53714, upload-time = "2026-10-26T17:54:50.753Z" }, + { url = "https://files.pythonhosted.org/packages/df/0b/08794c65e0a752acf20aa44e193e61dfb552b48fe6c27ba6023c146f9e77/msgpack-1.2.4-cp314-cp314-win32.whl", hash = "sha256:727a65b35db9f5ef516fc0229c4b05cab983092b1ae274a8a769b2d517fb0499", size = 70726, upload-time = "2026-10-26T17:54:52.397Z" }, + { url = "https://files.pythonhosted.org/packages/b5/da/e2cc63ec61e7ac05595b391cba01c10cb4657f4e517da1512e4a75d2d12e/msgpack-1.2.4-cp314-cp314-win_amd64.whl", hash = "sha256:80f5d4fda1ba373d95933f98e6c1d18247feffac839fda3930bdd85e6561bb5f", size = 78346, upload-time = "2026-10-26T17:54:54.662Z" }, + { url = "https://files.pythonhosted.org/packages/93/e4/1b0eb49887009dc2c530171d659cf2aa37202b5f79c0b784e63777554b37/msgpack-1.2.4-cp314-cp314-win_arm64.whl", hash = "sha256:e5f67f0286f2ba2c6dbb4998404ed880112ca204ceda729cf239879cd89d3acf", size = 74152, upload-time = "2026-10-26T17:54:55.915Z" }, + { url = "https://files.pythonhosted.org/packages/d0/4a/6defc8fd0270c4ba675e6625f4f76ce936fd0c48733395fd7ba912cd423e/msgpack-1.2.4-cp314-cp314t-macosx_10_15_x86_64.whl", hash = "sha256:45506bfb902cde24a0d33fb0581f58497ddb2682686dd1f6aa07e7b769df7ca4", size = 94083, upload-time = "2026-10-26T17:54:57.108Z" }, + { url = "https://files.pythonhosted.org/packages/c8/e8/59f7e076739048864710a4de3403ae1c1b43ed5077b796cd9e8cbce9b3f6/msgpack-1.2.4-cp314-cp314t-macosx_11_0_arm64.whl", hash = "sha256:dc9dc681958e69f46b9f37def3e7fd6cc5dcfaa5943fb00bfe9c223a1a1052f6", size = 95037, upload-time = "2026-10-26T17:54:58.489Z" }, + { url = "https://files.pythonhosted.org/packages/2c/dd/dbae250b23b831cd0571eb664089f80de3249a39e98c6ef55f9a0efe928d/msgpack-1.2.4-cp314-cp314t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:0bef691e2a95119cc6bf3ded29325dbd89c4b6f8ff233070431948ed70902421", size = 472722, upload-time = "2026-10-26T17:54:59.924Z" }, + { url = "https://files.pythonhosted.org/packages/a9/e2/383ece1c1b27c1ed322055fce8ab8972bc6d529ede881592065ce0c461bf/msgpack-1.2.4-cp314-cp314t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:55e6106d2d085af42b2de72efeb38ed255241a24b32295ca889707c1d679c442", size = 468726, upload-time = "2026-10-26T17:55:01.492Z" }, + { url = "https://files.pythonhosted.org/packages/37/2f/5410a8815ae74a824ac87543c612e40cb6674851b70a6ad858bb32813203/msgpack-1.2.4-cp314-cp314t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:996dfc4774c240c8e6adf1166ae102141cfbed33c8856fde821bd6c0bd35ee41", size = 420488, upload-time = "2026-10-26T17:55:02.848Z" }, + { url = "https://files.pythonhosted.org/packages/39/8e/16fdf02b4f91dff9c1480433c1bf80756c2fedc0b74fc6a231f02dfed007/msgpack-1.2.4-cp314-cp314t-musllinux_1_2_aarch64.whl", hash = "sha256:efa1357fb0c7201e833de28638be371ee127476f7ccff9e7a94211b0afc33ddf", size = 455541, upload-time = "2026-10-26T17:55:04.564Z" }, + { url = "https://files.pythonhosted.org/packages/c4/76/2454ef54d780a167667552d02e7bc977a3d419943bcbdf6a96a4da6786ad/msgpack-1.2.4-cp314-cp314t-musllinux_1_2_riscv64.whl", hash = "sha256:b9270b63409e70c8c6deb5faedc81fc27c6bd0196b38084a8773f68286abf034", size = 419514, upload-time = "2026-10-26T17:55:06.257Z" }, + { url = "https://files.pythonhosted.org/packages/ac/8b/2af9bf378def33c24875f250421b0d0b1b06f72a1c2c3f964749fc4cdee1/msgpack-1.2.4-cp314-cp314t-musllinux_1_2_x86_64.whl", hash = "sha256:2b597bb01aff61d65e305c2cf2589c93c86609929d42d575bfc359f3c54ea8e1", size = 461910, upload-time = "2026-10-26T17:55:08.05Z" }, + { url = "https://files.pythonhosted.org/packages/0e/46/a133ac6c4cef4d3939383c00cc19baa16ee85fd70af0c5990e7a9ca8767f/msgpack-1.2.4-cp314-cp314t-win32.whl", hash = "sha256:ad5bc540cbc34db236f8535721a9a872d12a9d88d1322470f1fc7c5e9dadfdb2", size = 76441, upload-time = "2026-10-26T17:55:09.711Z" }, + { url = "https://files.pythonhosted.org/packages/d4/f5/8d22ec454c188f1795107a3fd9f68ada485076ebf394a4aaaa5fbb6093e7/msgpack-1.2.4-cp314-cp314t-win_amd64.whl", hash = "sha256:287e52c2ebaa94f8eca045628374859f51584e77bc07086e6835a9bb2204c774", size = 84321, upload-time = "2026-10-26T17:55:10.947Z" }, + { url = "https://files.pythonhosted.org/packages/41/52/1390514aee47d14ca3fe6ea0cf236fddc55021867ace30daf8761deba36f/msgpack-1.2.4-cp314-cp314t-win_arm64.whl", hash = "sha256:f3f19fe5decd348b35b003ae5f32d3fa90877413a0183da676f748a3a7ab9270", size = 78589, upload-time = "2026-10-26T17:55:12.425Z" }, + { url = "https://files.pythonhosted.org/packages/d0/d8/0465d475c1a7063af1a1fb4f8c69e0dd661c4dd172055c9757a343a07d5d/msgpack-1.2.4-cp315-cp315-macosx_10_15_x86_64.whl", hash = "sha256:765584b93ed6f0b561f0c56e9735f24945c0682f857c9b3ee3b4caad9c32f66a", size = 92449, upload-time = "2026-10-26T17:55:13.665Z" }, + { url = "https://files.pythonhosted.org/packages/b2/d0/5220a8a53579dda39f3526394ba5b7eafc28736085f2626deda7fcd22cd1/msgpack-1.2.4-cp315-cp315-macosx_11_0_arm64.whl", hash = "sha256:0221748c30ace75fde0dec8c470abe65fb5374cd4f37adb9db6aca7a3c362c0a", size = 91209, upload-time = "2026-10-26T17:55:14.913Z" }, + { url = "https://files.pythonhosted.org/packages/b2/98/f151742eba413503074a10d8f636bf03dd4f3f7cba29689767a35d19bd1c/msgpack-1.2.4-cp315-cp315-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:c5917972ce1bf5f85f761031e00dab6fe0ad9f880cb3d2d43ed74b330c850400", size = 455713, upload-time = "2026-10-26T17:55:16.406Z" }, + { url = "https://files.pythonhosted.org/packages/b0/54/890510a2c9841aff63258e085d15d4e140c7eef559d4da81ef2d2d867436/msgpack-1.2.4-cp315-cp315-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:e7ae8cf6012372cecb43016132d1b87ccc2ebb8ae5ab5078687399e82423386a", size = 466177, upload-time = "2026-10-26T17:55:18.351Z" }, + { url = "https://files.pythonhosted.org/packages/3d/41/a6f20d7c2c380fb072b95ffc5b865a1d62eaf49d77fbee44466c45a1a8de/msgpack-1.2.4-cp315-cp315-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:e78c66cf97ac5675037f705ca433ad98ac9177f9523e7fdbb34e486ae29044c8", size = 424398, upload-time = "2026-10-26T17:55:19.979Z" }, + { url = "https://files.pythonhosted.org/packages/89/86/fa9559961f2b0d498e6cefa226298ddee2b896cb223449c211702bc34071/msgpack-1.2.4-cp315-cp315-musllinux_1_2_aarch64.whl", hash = "sha256:59887281c3c163a7afff7dffaaad2f78cd2b513b7e1a7843f1ee8e7cd6a94231", size = 445686, upload-time = "2026-10-26T17:55:21.775Z" }, + { url = "https://files.pythonhosted.org/packages/39/23/5a9d94036cdd77d4310bbb7cfaf3ccd1f087c4a5d5a4befec4361c5fc0dc/msgpack-1.2.4-cp315-cp315-musllinux_1_2_riscv64.whl", hash = "sha256:9f46e70c8d22e96856967ab9d80c51dcf5bc63133e4da2d66fab64c0d4119b82", size = 422096, upload-time = "2026-10-26T17:55:24Z" }, + { url = "https://files.pythonhosted.org/packages/6e/4b/86a5384112509a94ff6e20028aba6845138743effb7c6617e959ad1256ab/msgpack-1.2.4-cp315-cp315-musllinux_1_2_x86_64.whl", hash = "sha256:0a1fd6c31952155b7cd01061288c70303e6554ae855244dfb38a897fd94f8749", size = 463407, upload-time = "2026-10-26T17:55:26.146Z" }, + { url = "https://files.pythonhosted.org/packages/f4/cf/14db289e0ad531e22ce0f03284865f81d14fbc80bf3f79d3b1714bcf76cf/msgpack-1.2.4-cp315-cp315-pyemscripten_2026_5_wasm32.whl", hash = "sha256:b1f08ec826417e3c8dc3edadb50f38debba033af6cb849229f0eac72f80f2342", size = 53743, upload-time = "2026-10-26T17:55:27.497Z" }, + { url = "https://files.pythonhosted.org/packages/46/72/a76fc90b51503c0bdacbc7fc823aa6fa62d40596ac47f9ea8492d6f95a34/msgpack-1.2.4-cp315-cp315-win32.whl", hash = "sha256:e8ba23c838739fe929e868095171e71f2f38d6ce0fcf5840b576fb82648e58e6", size = 70780, upload-time = "2026-10-26T17:55:28.705Z" }, + { url = "https://files.pythonhosted.org/packages/58/a7/fa9d4a1b5dfead83ea6e03b4007041a5da988c25eb941d42612e0211d3c0/msgpack-1.2.4-cp315-cp315-win_amd64.whl", hash = "sha256:67310606cf2528a6dc3ece1298dcd5cc6c57add148b16d22c5111138aa84820c", size = 78288, upload-time = "2026-10-26T17:55:29.928Z" }, + { url = "https://files.pythonhosted.org/packages/b5/f3/8163d7938a8fe003952fe2719ddb31da71998559bbe290c55ffe622b886b/msgpack-1.2.4-cp315-cp315-win_arm64.whl", hash = "sha256:ce76e7a7c11459157887a8dadf07c107ff74eca98cf914f0de6ee7ab4b47104d", size = 74235, upload-time = "2026-10-26T17:55:31.112Z" }, + { url = "https://files.pythonhosted.org/packages/b4/fa/37c3219b250d81bee788c0dd78ae2fc673db2da1c21ae51f7982d85698f7/msgpack-1.2.4-cp315-cp315t-macosx_10_15_x86_64.whl", hash = "sha256:fb9ddbf23b8c6e89752af399fcf4daed60055e239cda44c6acfaa76d19331e8c", size = 93793, upload-time = "2026-10-26T17:55:32.304Z" }, + { url = "https://files.pythonhosted.org/packages/83/9f/b8afcd20d32cf4be1fa3c327e997656d6d446e667452b0fcc66b91710e82/msgpack-1.2.4-cp315-cp315t-macosx_11_0_arm64.whl", hash = "sha256:e283cf563166c21762131b88e3870ee2ec57757b08a8736929757b5a67541061", size = 94746, upload-time = "2026-10-26T17:55:33.624Z" }, + { url = "https://files.pythonhosted.org/packages/e6/4f/03348d381fcbbc2685356833408cc7e9d2af0fe0775926935a2889650f64/msgpack-1.2.4-cp315-cp315t-manylinux2014_aarch64.manylinux_2_17_aarch64.manylinux_2_28_aarch64.whl", hash = "sha256:40e91bf8325f492e8eb3c3aa6de06b20593c225336bb52b585c913d7c1da025b", size = 468480, upload-time = "2026-10-26T17:55:34.991Z" }, + { url = "https://files.pythonhosted.org/packages/16/46/e54af8d9a51fb562e068e69a0d75a51e9c2fedec49f911f888515f5477ab/msgpack-1.2.4-cp315-cp315t-manylinux2014_x86_64.manylinux_2_17_x86_64.manylinux_2_28_x86_64.whl", hash = "sha256:cfa86432bf329d6b976f5a00ad4c9064fd51736e4967a52526750236345cc2da", size = 470064, upload-time = "2026-10-26T17:55:36.615Z" }, + { url = "https://files.pythonhosted.org/packages/74/f5/8f9a6b3af1d803e832b11017c8dad44d761fefdb91dba04ee58cb51838da/msgpack-1.2.4-cp315-cp315t-manylinux_2_31_riscv64.manylinux_2_39_riscv64.whl", hash = "sha256:42e0a7dc26df739149478585d4264338b4d330f24b3e3b57d5aa89e48866e8ab", size = 421267, upload-time = "2026-10-26T17:55:38.076Z" }, + { url = "https://files.pythonhosted.org/packages/4b/8f/7302b0d18eadbbfef9be1dbbdc49905f7f3b847200c3e47068d093976be4/msgpack-1.2.4-cp315-cp315t-musllinux_1_2_aarch64.whl", hash = "sha256:8e680367090a58c966052d61418cc943111863538fd82471d61fca5271d911e1", size = 451244, upload-time = "2026-10-26T17:55:39.639Z" }, + { url = "https://files.pythonhosted.org/packages/36/c6/05717fb56b510b5e974446f2cb8e9b26fa4347fafc0c5927745b176939b3/msgpack-1.2.4-cp315-cp315t-musllinux_1_2_riscv64.whl", hash = "sha256:a6c9926f8871b261622fe6b599db72c69be5bca8fdc0976886f9a531a301dee9", size = 420273, upload-time = "2026-10-26T17:55:41.488Z" }, + { url = "https://files.pythonhosted.org/packages/05/d9/a19077d664c37319097e16ba8de14e6b3a2edcc8ee78a2069c0808e38960/msgpack-1.2.4-cp315-cp315t-musllinux_1_2_x86_64.whl", hash = "sha256:c50bac325dbf1a9c80e10da6dbd1100d7082f6b12e153084501e18e86cd3a037", size = 460421, upload-time = "2026-10-26T17:55:43.223Z" }, + { url = "https://files.pythonhosted.org/packages/a2/bd/0e2033a7435f8d2311be37363fedc88bdfa9fd95c364ee8ac3216eb63e36/msgpack-1.2.4-cp315-cp315t-win32.whl", hash = "sha256:34051de19ae532ba47fcab5b0abd08c25c7a64ff763ad819f18764d45f3c2c81", size = 76256, upload-time = "2026-10-26T17:55:44.588Z" }, + { url = "https://files.pythonhosted.org/packages/b3/3f/aa7265f25dafb6af7567a1a7d0a95c5566803db2226c5e084dc5850cfd96/msgpack-1.2.4-cp315-cp315t-win_amd64.whl", hash = "sha256:6ad2f0808099d4281208ff2c756efa958a55a7c8eb21fe1c7052b95c584f02f1", size = 83939, upload-time = "2026-10-26T17:55:45.773Z" }, + { url = "https://files.pythonhosted.org/packages/bf/f2/c53904c4bc3da828fb75678bf489ece808a277affa73f8a7a91dfb7c5851/msgpack-1.2.4-cp315-cp315t-win_arm64.whl", hash = "sha256:e38d854f1c60e94f46d998765201126338bde3fe1b029be0d849094bcbef72c2", size = 77995, upload-time = "2026-10-26T17:55:47.016Z" }, +] + [[package]] name = "multidict" version = "6.9.1" @@ -1202,6 +1371,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/be/59/e26cb779be4c591d1a910f59d29aca9fba4de70349840a833beba2652371/multidict-6.9.1-py3-none-any.whl", hash = "sha256:7bf6478188f4e47bf5686e8a33da4ae28bf43b1b2528d9ee144d28492bfac60b", size = 19176, upload-time = "2026-09-21T17:59:03.501Z" }, ] +[[package]] +name = "nats-py" +version = "2.16.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/2c/c8/739b72c9201081e48000884d476231873ac82f7247c43b33823eaf3c0bfb/nats_py-2.16.0.tar.gz", hash = "sha256:1d137ed7afc9b59033b3199324c6237df2016a5091935871344a787eba6b72fc", size = 79731, upload-time = "2026-09-16T07:47:21.843Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/48/a3/16cec37172144d3362d7551bb823a098b2b2903281fc095dfe4480b8c2fd/nats_py-2.16.0-py3-none-any.whl", hash = "sha256:aeb1ff123966c05833d26c7df7e1d54c1c6d32b612428b21677a2e921f1fecae", size = 93578, upload-time = "2026-09-16T07:47:20.799Z" }, +] + [[package]] name = "netaddr" version = "1.3.0" @@ -1220,6 +1398,15 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/63/34/ba1c580383c9eada3711951fef0795c80b829a078d72188184bcab9dd527/packaging-26.3-py3-none-any.whl", hash = "sha256:d7193f7c8e4e93f444fde0262bf90af30e16fa0ad0ad44cb553c87339b23cd1c", size = 129956, upload-time = "2026-08-04T18:15:27.159Z" }, ] +[[package]] +name = "pamqp" +version = "5.0.0" +source = { registry = "https://pypi.org/simple" } +sdist = { url = "https://files.pythonhosted.org/packages/db/10/3a0d1040a1bac414ef1b4cb9b6f53344b6bc33e57eef287ac58d6dc1d1de/pamqp-5.0.0.tar.gz", hash = "sha256:d76dd4af900802483cda5f318a5328c86a1e9b127159f5455b17d9a0bb658b89", size = 137474, upload-time = "2026-10-30T15:41:57.894Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/ed/ac/fd44d9085dc1270e9f6a9eae0a08bbc69d8354c66623c647fe45ecd4b97d/pamqp-5.0.0-py3-none-any.whl", hash = "sha256:f426351b57f6a9e453ee27682431e532c44771cb61b4f74018b8a7088f4cac20", size = 32793, upload-time = "2026-10-30T15:41:56.381Z" }, +] + [[package]] name = "pluggy" version = "1.6.0" @@ -1386,10 +1573,12 @@ wheels = [ [[package]] name = "pystashtemplate" -version = "0.2.0" -source = { git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.2.0#87c5b76c572f413953829aaec34a628b34fd58c4" } +version = "0.3.0" +source = { git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.3.0#5888e8c27035ad8cbc2c0f99bc342e36fc1d4e77" } dependencies = [ + { name = "aio-pika" }, { name = "aiohttp" }, + { name = "aiokafka" }, { name = "dnspython" }, { name = "geoip2" }, { name = "httpx" }, @@ -1398,7 +1587,11 @@ dependencies = [ { name = "lxml" }, { name = "maxminddb" }, { name = "mmh3" }, + { name = "msgpack" }, + { name = "nats-py" }, + { name = "prometheus-client" }, { name = "pyyaml" }, + { name = "redis" }, { name = "ua-parser" }, { name = "ua-parser-builtins" }, ] @@ -1488,6 +1681,18 @@ wheels = [ { url = "https://files.pythonhosted.org/packages/f1/12/de94a39c2ef588c7e6455cfbe7343d3b2dc9d6b6b2f40c4c6565744c873d/pyyaml-6.0.3-cp314-cp314t-win_arm64.whl", hash = "sha256:ebc55a14a21cb14062aa4162f906cd962b28e2e9ea38f9b4391244cd8de4ae0b", size = 149341, upload-time = "2025-09-25T21:32:56.828Z" }, ] +[[package]] +name = "redis" +version = "8.1.0" +source = { registry = "https://pypi.org/simple" } +dependencies = [ + { name = "async-timeout", marker = "python_full_version < '3.11.3'" }, +] +sdist = { url = "https://files.pythonhosted.org/packages/a8/99/604f0b666d4c616d891cf77ebb9db6bb21601344c051aebf1b72b9ff915f/redis-8.1.0.tar.gz", hash = "sha256:6e1a19beef9225c83efd689c7e6b7da2d5215b1f42cd13b7fc3714d0a09c7b25", size = 5254356, upload-time = "2026-07-30T08:51:00.269Z" } +wheels = [ + { url = "https://files.pythonhosted.org/packages/66/9d/c5731f6e3608663d4d3656fd8d3aecee8b509c3082818f5a13eae925baea/redis-8.1.0-py3-none-any.whl", hash = "sha256:a4fe1aac3d3b3cc791d4b3d5931c5a956045dc951ee74d1c913ee3ac4d2ee9fb", size = 560618, upload-time = "2026-07-30T08:50:58.497Z" }, +] + [[package]] name = "requests" version = "2.34.2" @@ -1505,11 +1710,10 @@ wheels = [ [[package]] name = "rsyslogstach" -version = "0.10.2" +version = "0.11.0" source = { editable = "." } dependencies = [ { name = "loguru" }, - { name = "prometheus-client" }, { name = "pystashtemplate" }, ] @@ -1525,8 +1729,7 @@ dev = [ requires-dist = [ { name = "loguru", specifier = ">=0.7" }, { name = "mmdb-writer", marker = "extra == 'dev'", specifier = ">=0.2.7" }, - { name = "prometheus-client", specifier = "==0.26.0" }, - { name = "pystashtemplate", git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.2.0" }, + { name = "pystashtemplate", git = "https://github.com/Mathilde-Team/PyStashTemplate.git?rev=v0.3.0" }, { name = "pytest", marker = "extra == 'dev'", specifier = ">=7.0" }, { name = "pytest-cov", marker = "extra == 'dev'", specifier = ">=7.1.0" }, { name = "ruff", marker = "extra == 'dev'" },