Systemd journal reader and exporter
Project description
Propagation Exporter
A small tool that watches systemd journal entries from opendnssec-signer.service, parses zone update stats, checks downstream DNS SOA serial propagation, and exposes Prometheus metrics.
Install
This project uses pyproject.toml. Install in your environment of choice.
Run
-
As a console script (recommended):
propagation-exporter -c /etc/coralogix-exporter/zones.yaml --metrics-port 8000
-
As a module:
python -m propagation_exporter -c /etc/coralogix-exporter/zones.yaml
-
Legacy script (still supported):
python main.py -c /etc/coralogix-exporter/zones.yaml
Testing with uv
This project uses uv for Python environment and dependency management in development.
-
Install dev deps (once):
uv sync --extra dev
-
Run tests with coverage:
uv run pytest -q --cov=propagation_exporter --cov-report=term-missing
-
Optional: type and style checks:
uv run mypy propagation_exporter uv run flake8 propagation_exporter
CLI options
- -c, --config-file: YAML with zones and nameservers
- --metrics-port: Prometheus HTTP port (default 8000)
- --zone / --ns: Ad-hoc SOA serial checks without systemd
- --stats-regex: Override the regex used to parse journal "[STATS]" lines.
Regex parsing
By default, the parser extracts zone, serial, and RR count from lines like:
[STATS] example.com 2024072826 RR[count=4 time=0(sec)] ...
Default pattern:
^\[STATS\]\s+(?P<zone>\S+)\s+(?P<serial>\d+)\s+RR\[count=(?P<rr_count>\d+)
You can override it via CLI --stats-regex or programmatically when creating ZoneManager.
Module layout
- propagation_exporter/
- init.py: public exports
- main.py:
python -mentry - cli.py: argument parsing and app wiring
- journal.py: systemd journal reader
- zone.py: ZoneInfo, ZoneConfig, ZoneManager, and parsing
- dns_utils.py: DNSChecker utilities
- metrics.py: Prometheus metrics
Prometheus metrics
- zone_out_of_sync{zone}
- zone_propagation_delay_seconds{zone, nameserver, serial}
Config file
YAML example:
zones:
example.com.:
primary_nameserver: 192.0.2.1
downstream_nameservers:
- 192.0.2.2
- 192.0.2.3
Notes
- Ensure
systemd-python,dnspython,PyYAML, andprometheus-clientare available in the runtime environment.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file propagation_exporter-0.9.2.tar.gz.
File metadata
- Download URL: propagation_exporter-0.9.2.tar.gz
- Upload date:
- Size: 17.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2c17e58c2473b599d761444eadb50e5dc56378e98c82c21b4c2440a826024c45
|
|
| MD5 |
bd1f25d01bef12f3d5e9cec25864ed79
|
|
| BLAKE2b-256 |
231ae67a1bca62e284c072cb5d0ddd05803f520d7545e63d052b5b917f0f246f
|
Provenance
The following attestation bundles were made for propagation_exporter-0.9.2.tar.gz:
Publisher:
build.yml on icann-dns/zone_propagation_exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
propagation_exporter-0.9.2.tar.gz -
Subject digest:
2c17e58c2473b599d761444eadb50e5dc56378e98c82c21b4c2440a826024c45 - Sigstore transparency entry: 985086004
- Sigstore integration time:
-
Permalink:
icann-dns/zone_propagation_exporter@86a369487762b0359617394cd2546c0d30a49330 -
Branch / Tag:
refs/tags/v0.9.2 - Owner: https://github.com/icann-dns
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@86a369487762b0359617394cd2546c0d30a49330 -
Trigger Event:
push
-
Statement type:
File details
Details for the file propagation_exporter-0.9.2-py3-none-any.whl.
File metadata
- Download URL: propagation_exporter-0.9.2-py3-none-any.whl
- Upload date:
- Size: 11.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9e1a7f8cbfd9b6b61c77bea7d6aa343e4065a7729489b981c001d9aa16923bf6
|
|
| MD5 |
0ac4f3abdc812a31addfdff2b174425b
|
|
| BLAKE2b-256 |
306b927d752235a7b26ed46778dacd87b494503f654cc060aa96a4204ebc3357
|
Provenance
The following attestation bundles were made for propagation_exporter-0.9.2-py3-none-any.whl:
Publisher:
build.yml on icann-dns/zone_propagation_exporter
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
propagation_exporter-0.9.2-py3-none-any.whl -
Subject digest:
9e1a7f8cbfd9b6b61c77bea7d6aa343e4065a7729489b981c001d9aa16923bf6 - Sigstore transparency entry: 985086008
- Sigstore integration time:
-
Permalink:
icann-dns/zone_propagation_exporter@86a369487762b0359617394cd2546c0d30a49330 -
Branch / Tag:
refs/tags/v0.9.2 - Owner: https://github.com/icann-dns
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
build.yml@86a369487762b0359617394cd2546c0d30a49330 -
Trigger Event:
push
-
Statement type: