iperf3-monitor/exporter
google-labs-jules[bot] 8887ff6afc feat: Implement iperf3 exporter core logic and log level configuration
This commit completes the core functionality of the iperf3 exporter and adds flexible log level configuration.

Key changes:
- Added command-line (`--log-level`) and environment variable (`LOG_LEVEL`) options to configure the logging level.
- Implemented the main test orchestration loop (`main_loop`) which:
    - Discovers iperf3 server pods via the Kubernetes API.
    - Periodically runs iperf3 tests (TCP/UDP) between the exporter pod and discovered server pods.
    - Avoids self-testing.
    - Uses configurable test intervals, server ports, and protocols.
    - Requires `SOURCE_NODE_NAME` to be set.
- Refined the `parse_and_publish_metrics` function to:
    - Accurately parse iperf3 results for bandwidth, jitter, packets, and lost packets.
    - Set `IPERF_TEST_SUCCESS` metric (0 for failure, 1 for success).
    - Zero out all relevant metrics for a given path upon test failure to prevent stale data.
    - Handle UDP-specific metrics correctly, zeroing them for TCP tests.
    - Improved robustness in accessing iperf3 result attributes.
- Updated the main execution block to initialize logging, start the Prometheus HTTP server, and invoke the main loop.
- Added comprehensive docstrings and inline comments throughout `exporter/exporter.py` for improved readability and maintainability.

These changes align the exporter's implementation with the details specified in the design document (docs/DESIGN.MD).
2025-06-20 18:48:37 +00:00
..
Dockerfile feat: Add support for arm64 architecture (#11) 2025-06-20 19:07:36 +05:30
exporter.py feat: Implement iperf3 exporter core logic and log level configuration 2025-06-20 18:48:37 +00:00
requirements.txt feat: Introduce iperf3 Kubernetes network monitor 2025-06-18 20:26:47 +05:30