Operator diagnostics and inventory
All commands below use existing Python standard library, Requests and PyYAML packages. No additional runtime dependencies are required.
Runtime diagnostics: --doctor
python3 ipsonic-probe.py --doctor
Prints JSON with Python, OpenSSL, resolver path, proxy variable names only (not values), and local readiness checks. Does not contact monitoring targets. Exit code 0 means ready; 3 means an environmental check failed. The existing --self-test remains supported.
Configuration policy: --lint
python3 ipsonic-probe.py --lint examples/177-lint-healthy.yaml --strict
python3 ipsonic-probe.py --lint examples/
Static validation followed by advisory findings: TOTAL_TIMEOUT if timeouts.total is absent, TLS_VERIFY if HTTPS verification is disabled, and informational OWNER / RUNBOOK findings when metadata is missing. No network access. Exit 0 means no warnings, 1 means warnings, 3 means invalid YAML/configuration or a path error. INFO findings alone do not cause a nonzero exit. --strict additionally rejects unsupported keys and literal authentication secrets.
Ad-hoc checks: --probe
python3 ipsonic-probe.py --probe tcp://127.0.0.1:22
python3 ipsonic-probe.py --probe https://example.org/ --output nagios
Uses the existing TCP/HTTP(S) check engine with default connect=3s, response=10s and total=20s timeouts. Performs real network requests. This is a reachability check, not a comprehensive TLS/DNS diagnostic or a replacement for YAML assertions. Returns monitoring exit codes 0 OK, 1 WARNING, 2 CRITICAL, 3 UNKNOWN.
Inventory: --inventory
python3 ipsonic-probe.py --inventory examples/ --format tsv
python3 ipsonic-probe.py --inventory examples/ --format json
python3 ipsonic-probe.py --inventory examples/ --format text
Reads YAML files non-recursively and exports file, service name, protocol, target, owner, environment, description, runbook and tags. Does not contact targets. --strict is supported. Exit 3 when at least one configuration is invalid. Inventory exports targets and metadata: review before sharing, especially when URLs include sensitive query parameters. Existing --list-checks remains available.
Example index
176-doctor-runtime.yaml: companion check for--doctor.177-lint-healthy.yaml: lint-compliant check.178-probe-adhoc.yaml: companion check for--probe.179-inventory-owned.yaml: service ownership inventory.180-lint-insecure-tls.yaml: deliberately unsafe TLS example for lint warnings.181-lint-missing-timeout.yaml: missing total timeout lint warning.
All six YAML files are executable checks in their own right; CLI-only actions do not require YAML input. See the example catalog.