// IPSonic MONITORING TOOLKIT / DOCUMENTATION
ipsonic-probe rainbow unicorn

ipsonic-probe ✦

YAML-driven infrastructure validation. Platform-agnostic checks. Zero cloud dependencies.

DNSTCPHTTP / TLSYAML CONFIGCLI FIRSTKISSOFFLINE READY

Part of the ipsonic project ↗ Visit the main website

Complete user and operator guide

This is the central documentation for ipsonic-probe. It covers installation, every CLI action, monitoring behavior, operational workflows, security, releases, and links to the annotated YAML examples. All examples are intended for Linux/POSIX-style deployments using distribution packages; no pip, daemon, database, or cloud service is required.

AWX and credential management

For AWX / Ansible Automation Controller Job Templates, Machine credentials, encrypted Ansible Vault files, custom environment-injected API credentials, and secure no_log execution, see AWX Tutorial. Example playbooks and a strict-validating API check are in ansible/.

Documentation map

TopicDetailed guide
Download, package verification, first TCP checkFirst Test
AWX / Ansible Automation ControllerAWX Tutorial
Installation and native OS packagesREADME, Ansible Installation, Raspberry Pi OS
YAML configuration and monitoring featuresREADME, Examples
Design, alerting and deployment principlesBest Practices
CLI inventory, dry run, directory execution, TSVOperator Workflow
Self-test, strict validation, secret safety, timeoutsProduction Hardening
Owner, runbook, diff, baseline, output formatsMonitoring Contracts
Application acceptance and lifecycleWeb Project Acceptance
Exchange checksExchange Monitoring
All example configurations and explanationsExample Catalog

Direct installation without extracting an archive

Download the latest standalone ipsonic-probe-latest.py, verify its SHA-256 checksum, and run it with Python 3. See the direct installation tutorial. The standalone script includes the local DNS helper but still requires distribution-managed Requests and PyYAML.

Installation from the official download

Use the latest version listed at Downloads. Set VERSION to the release shown on the download page. The .sha256 file must be in the same directory as the archive when verifying it.

VERSION="<release-from-downloads-page>"
BASE=https://ipsonic.com/probe/downloads
wget "$BASE/ipsonic-probe-$VERSION.tar.gz"
wget "$BASE/ipsonic-probe-$VERSION.tar.gz.sha256"
sha256sum -c "ipsonic-probe-$VERSION.tar.gz.sha256"
tar -xzf "ipsonic-probe-$VERSION.tar.gz"
cd "ipsonic-probe-$VERSION"
python3 ipsonic-probe.py --self-test

Install the native python3, Requests and PyYAML packages from your OS repository. On Debian/Ubuntu/Raspberry Pi OS these are commonly python3, python3-requests, python3-yaml; on AlmaLinux/Rocky Linux the PyYAML package is commonly python3-pyyaml (repository availability may vary). See requirements-linux.txt and requirements.txt in the archive. The commands above assume the release has been published at the official URL.

First check: localhost SSH

python3 ipsonic-probe.py --validate --strict examples/138-hello-first-tcp-ssh.yaml
python3 ipsonic-probe.py --explain examples/138-hello-first-tcp-ssh.yaml
python3 ipsonic-probe.py examples/138-hello-first-tcp-ssh.yaml

The YAML targets tcp://127.0.0.1:22. A failure is expected when no local SSH listener is running. A successful TCP connection does not establish SSH authentication or application correctness.

Complete CLI reference

CommandEffectNetwork activity
python3 ipsonic-probe.py --helpCLI usage and optionsNo
python3 ipsonic-probe.py --versionProgram version, Python and OSNo
python3 ipsonic-probe.py --self-testCheck local Python modules and trust storeNo
python3 ipsonic-probe.py --validate FILE.yamlValidate YAML and supported valuesNo
python3 ipsonic-probe.py --validate --strict FILE.yamlAlso reject unknown keys and literal auth secretsNo
python3 ipsonic-probe.py --explain FILE.yamlExplain target, settings and metadataNo
python3 ipsonic-probe.py --dry-run FILE.yamlPreview intended checkNo
python3 ipsonic-probe.py --list-checks DIRInventory YAML files in a directoryNo
python3 ipsonic-probe.py --list-checks DIR --format tsvTab-separated inventoryNo
python3 ipsonic-probe.py --list-checks DIR --format jsonJSON inventoryNo
python3 ipsonic-probe.py FILE.yamlExecute a checkYes
python3 ipsonic-probe.py --check-dir DIRExecute YAML files sequentially, non-recursivelyYes
python3 ipsonic-probe.py --output nagios FILE.yamlOverride configured output formatYes
python3 ipsonic-probe.py --diff OLD.yaml NEW.yamlMasked offline configuration diffNo
python3 ipsonic-probe.py FILE.yaml --baseline-save FILE.jsonSave known-good result stateYes
python3 ipsonic-probe.py FILE.yaml --baseline-compare FILE.jsonCompare current result stateYes

--format applies to --list-checks only. --output applies to check output and accepts text, json, nagios, icinga2, and checkmk. --strict may be used with supported config-loading actions. Baseline actions require exactly one YAML file and cannot be combined with other actions.

Configuration and supported checks

Each YAML file defines either a url target (tcp://, http://, https://) or a dns mapping, not both. Typical configuration sections include request, auth, tls, proxy, connection, timeouts, execution, monitoring, and metadata. The example catalog contains complete configurations with plain-English descriptions and operational notes. Do not assume an option is supported merely because it appears in another monitoring product: use --validate --strict.

The checks cover TCP connectivity; HTTP methods, status, headers, response bodies and redirects; TLS verification and certificate checks; DNS record assertions and DNSSEC-related information; backend comparison; and retry/quorum logic. Proxy configuration affects HTTP(S) checks, not arbitrary TCP or DNS checks. For private PKI, configure the appropriate CA bundle rather than disabling TLS verification. Consult the example catalog for exact YAML syntax.

Timeouts and retries

timeouts:
  connect: 3
  response: 5
  total: 15

timeouts.total budgets the complete check including retries and backend checks, but cannot forcibly interrupt an already-running blocking network call. Use a process supervisor when a hard wall-clock termination is required. Retry counts are configured in execution; excessive retries increase load and alert latency.

Optional operational metadata

metadata:
  owner: application-operations
  environment: production
  description: Check the local SSH listener
  runbook: https://docs.example.org/runbooks/ssh
  tags:
    - infrastructure
    - ssh

Metadata helps developers hand checks to operators. On non-OK results, owner, environment and runbook are included in human-readable monitoring output; JSON includes the metadata object. Runbook URLs are informational and are not fetched by the tool.

Monitoring output and exit-code contract

Exit codeMeaning
0OK
1WARNING
2CRITICAL
3UNKNOWN, including configuration/runtime errors

When executing multiple checks, the process returns the highest status code. nagios and icinga2 emit plugin-style status/performance-data lines; checkmk emits local-check format; json provides structured fields; text is human-readable. A non-monitoring action can have action-specific exit semantics: --diff returns 1 when differences are found, while baseline comparison returns 2 when the saved state differs. These codes must not be interpreted as ordinary check alerts in those workflows.

Production workflow: develop, operate, secure

  1. Developers create a YAML check from the examples, including expected behavior and optional ownership/runbook metadata.
  2. Run --validate --strict, --explain and --dry-run locally; these actions do not contact targets.
  3. Review changes using --diff OLD NEW; treat the diff as helpful redaction, not a guarantee that arbitrary custom secrets are hidden.
  4. Deploy configuration and OS-packaged dependencies with Ansible, shell, or existing configuration management.
  5. Operators run a single check or --check-dir and integrate the chosen output format with their existing monitoring system.
  6. Diagnose problems using the owner/runbook information, then adjust YAML as the application changes. Retest and review the change before rollout.

Ansible: validate before execution

- name: Validate ipsonic-probe configuration
  ansible.builtin.command:
    argv:
      - /usr/bin/python3
      - /opt/ipsonic-probe/ipsonic-probe.py
      - --validate
      - --strict
      - /etc/ipsonic-probe/api.yaml
  changed_when: false

- name: Run ipsonic-probe checks
  ansible.builtin.command:
    argv:
      - /usr/bin/python3
      - /opt/ipsonic-probe/ipsonic-probe.py
      - /etc/ipsonic-probe/api.yaml
  environment:
    HTTPTEST_API_TOKEN: "{{ vault_api_token }}"
  register: ipsonic_probe_result
  changed_when: false
  no_log: true

This example assumes the Python script and configuration are deployed at the paths shown. no_log: true protects sensitive task data; ensure Ansible Vault and operating-system file permissions are also configured appropriately.

Security and baseline limitations

Prefer auth.password_env and auth.token_env over literal credentials. --strict rejects certain plaintext auth fields and known sensitive request headers. Output redaction targets known secrets; custom YAML fields, error strings and third-party responses still require review. Do not publish production configurations containing secrets. Avoid disabling TLS validation. --diff masks typical secret-like fields, but is not a complete secret-scanning boundary.

python3 ipsonic-probe.py checks/api.yaml --baseline-save api-baseline.json
python3 ipsonic-probe.py checks/api.yaml --baseline-compare api-baseline.json

Baseline saving requires an OK check and refuses to overwrite an existing baseline. The file is created with permissions 0600. The baseline captures only result status, exit code and stable assertion identifiers; it does not capture DNS answer sets, TLS fingerprints or HTTP response headers. Comparison returns 0 unchanged, 2 changed, 3 invalid or missing baseline.

Release and offline website build

python3 -m unittest discover -s tests -q
sh tools/generate-site.sh --output site-output
VERSION="<new-release-version>"
sh tools/build-release.sh "$VERSION"
(cd releases && sha256sum -c ipsonic-probe-${VERSION}.tar.gz.sha256)

The release script creates a deterministic source tar.gz, its .sha256, and a .manifest.json containing the version, artifact name, digest and reproducible build metadata. The static website is generated locally without a CDN or framework. Choose a new version for new changes and do not overwrite an existing published release.

Support and disclaimer

Maintainer: mati peterson — ipsonic@mailbox.org. Official project: https://ipsonic.com/probe/. Main project: https://ipsonic.com/.

Software and examples are provided AS IS, without warranty. Validate checks, permissions, credentials and expected service behavior before production use. See DISCLAIMER.md.

New feature examples

See Feature Examples for runnable examples of strict validation, inventory, directory checks, baseline comparison, diff, runbooks, monitoring outputs, and release verification.

Infrastructure and operator integration examples

See Integration Examples for examples 149–179, exact commands, monitoring integration files and explicit feature limitations.

Operator diagnostics and inventory

See Operator diagnostics and inventory for --doctor, --lint, --probe, --inventory, exit codes, security caveats, and examples 176–181.

Assertions and evidence

See Assertions & Evidence for structured assertions, JSON result schema, opt-in HTTP/TLS/DNS evidence, baseline drift detection, perfdata, security limitations and examples.

Kubernetes

See Kubernetes operator examples for service discovery, Ingress, API server readiness, and scoped ServiceAccount authentication.

YAML protocol reference

See YAML configuration reference for DNS, TCP, HTTP, HTTPS and TLS options.