Skip to content

Add CLI validation and DNS options to Connectivity Monitor#9

Draft
Codex wants to merge 1 commit intomainfrom
codex/audit-fix-documentation
Draft

Add CLI validation and DNS options to Connectivity Monitor#9
Codex wants to merge 1 commit intomainfrom
codex/audit-fix-documentation

Conversation

@Codex
Copy link
Copy Markdown

@Codex Codex AI commented Apr 6, 2026

Summary

  • add CLI switches for latency warning threshold, DNS enable/disable, and DNS target to the Python monitor
  • validate config inputs (positive intervals, port range, required targets) and surface clear errors before running
  • document the new options in python/README.md with examples

Testing

  • python -m connectivity_monitor --help
  • python - <<'PY'
    from argparse import Namespace
    from connectivity_monitor.config import headless_config, validate_config
    args = Namespace(targets="1.1.1.1,8.8.8.8", poll=5, threshold=3, lat_warn=80, enable_dns=False, dns_target="example.com", web_port=9000)
    cfg = validate_config(headless_config(args))
    print({k: cfg[k] for k in sorted(cfg) if k not in {"headless"}})
    bad_args = Namespace(targets="", poll=0, threshold=0, lat_warn=0, enable_dns=True, dns_target="", web_port=70000)
    try:
    validate_config(headless_config(bad_args))
    except ValueError as exc:
    print("Validation error:", exc)
    PY

Co-authored-by: nexuspcs <69493073+nexuspcs@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants