Skip to content

Remote probes ​

A remote probe is the same probeward binary started as probeward probe on a Linux or Windows machine near the devices it polls. It dials out to the core, so the remote site needs no inbound rule and can sit behind NAT. It has no database: it keeps a small state directory and a disk buffer. This page describes probes in general and on Linux. Windows probes are installed by an MSI as a service, and the probe protocol describes the wire format.

Architecture ​

text
 remote site                                   core
 +-------------------------+   TLS 1.3, mutual   +----------------------------------+
 | probeward probe         | ------------------> | probe listener (PROBEWARD_PROBE_ |
 |  sensors (same code)    |   WebSocket, JSON   |   LISTEN), probe hub             |
 |  scheduler (offline)    | <------------------ | engine (the single decider)      |
 |  disk buffer            |                     | PostgreSQL                       |
 +-------------------------+                     +----------------------------------+
  • The engine stays the only decider. While a probe is connected the core schedules every poll of the probe's sensors exactly as it does for the local probe and sends a poll message; the probe runs the sensor and answers with the result. The engine evaluates it like a local one: limits, failure counts, incidents, dependencies and notifications are all decided in the core.
  • While disconnected the probe keeps polling on the same schedule the core uses (each sensor's interval and fixed offset), and writes each result to its disk buffer with a stable id and its original timestamps. Nothing is decided on the probe.
  • When it reconnects the probe replays the buffer, oldest first. Replayed samples fill the history with their original timestamps but do not drive alerting: an outage that happened and ended while the probe was cut off does not page. A failure that is still there when the probe is back is counted afresh from the live polls and pages after the sensor's own failure_count.
  • A lost probe is one incident, not many. When a probe's session ends the core waits for a grace period (60 s by default) and then opens one probe incident ("the probe stopped reporting") and notifies the probe's destinations once. The probe's sensors become unknown ("the probe is not reporting"), never down: nothing is known about the targets. The incident closes when the probe is back. A maintenance window on the probe holds this incident, and notification schedules apply to its destinations; see schedules and maintenance.
  • Schedules and windows hold the probe's own polling too. A sensor outside its monitoring schedule or in a window that stops polling is not polled by a cut-off probe either.
  • Scan now on a remote sensor is sent to the probe at once, like any other poll.
  • Configuration changes are pushed live. Whenever the tree, settings or credentials change, the core sends the probe a fresh assignment (only when it actually differs for that probe).

The probe and the core run the same sensor code from the same build, so a sensor behaves the same wherever it runs.

Setting it up ​

On the core ​

Turn the probe listener on:

sh
PROBEWARD_PROBE_LISTEN=0.0.0.0:8443
VariableDefaultMeaning
PROBEWARD_PROBE_LISTENunset (no listener)Address and port of the probe listener. Probes connect here, not to the HTTP port.
PROBEWARD_PROBE_GRACE_SECS60How long a probe may be gone before its probe incident opens. 0 to 3600.
PROBEWARD_PROBE_BINARIES_DIRunset (no updates)Directory with probe binaries and manifest.json, see updating.

Firewall and port. Open the chosen TCP port (8443 above) inbound on the core, from the remote sites' addresses where you can. The remote site needs only outbound TCP to that port. The listener speaks TLS 1.3 with client certificates and nothing else, so it must not sit behind a TLS-terminating proxy: forward the TCP connection as it is (HAProxy mode tcp, or a plain port mapping).

Reference Compose install. The listener is off by default; install says how to turn it on. It is published straight from the probeward container, not through Caddy, which would end the TLS session the probes authenticate with.

Pairing ​

  1. In Settings, Probes, choose Add probe, give it a name, and create it. The page shows a pairing token once, like PWP1-<secret>-<pin>. It is valid for one hour and for one pairing. Only its hash is stored; creating and pairing are recorded in the audit log, the token never is. The same is available as POST /api/v1/probes (administrators).

  2. On the probe machine, start the probe with the token:

    sh
    PROBEWARD_PROBE_CORE_URL=core.example.org:8443 \
    PROBEWARD_PROBE_STATE_DIR=/var/lib/probeward-probe \
    PROBEWARD_PROBE_PAIRING_TOKEN=PWP1-... \
    probeward probe

    The probe generates its own key (ECDSA P-256) in its state directory; the key never leaves it. It sends a certificate request with the token; the core checks the token, uses it up, and signs a client certificate with its probe CA. The probe checks that the CA it got matches the pin in the token, so it cannot be talked into trusting another server, even on first contact.

  3. The token is needed on the first start only. Remove it from the unit file afterwards; a token that was used is refused anyway.

  4. Move devices or groups under the new probe in the tree (drag, or POST /api/v1/devices/{id}/move with the probe as parent). Their sensors are polled from the probe from then on.

Probe variableDefaultMeaning
PROBEWARD_PROBE_CORE_URLrequiredThe core's probe listener, host:port.
PROBEWARD_PROBE_STATE_DIR./probe-stateIdentity, assignment, clock estimate and buffer. Mode 0700; the probe refuses a directory others can read.
PROBEWARD_PROBE_PAIRING_TOKENunsetThe pairing token, first start only.
PROBEWARD_PROBE_BUFFER_MAX_MB256Upper bound of the disk buffer, in MiB.
PROBEWARD_PROBE_AUTO_UPDATEtruefalse makes this machine refuse updates whatever the core says.
PROBEWARD_PROBE_LOG_DIRunset (standard error only)Also write probe.log there, a new file at 10 MiB, the five newest kept.
PROBEWARD_LOG, PROBEWARD_LOG_FORMATas on the coreLogging.

The token can also be left in a file pairing-token in the state directory, readable only by the probe; the probe deletes it once it has paired. The Windows installer does it this way.

systemd ​

deploy/probe/ holds a unit and an environment file for a remote Linux host:

  • probeward-probe.service: runs /opt/probeward-probe/probeward probe as the dedicated system user probeward-probe, with its state in /var/lib/probeward-probe (StateDirectory, mode 0700), settings from /etc/probeward-probe/probe.env, and hardening: NoNewPrivileges, ProtectSystem=strict, ProtectHome, PrivateTmp, PrivateDevices, the kernel and control-group protections, restricted address families, namespaces and SUID, no capabilities. The install commands are at the top of the file.
  • probe.env.example: the settings, with the core address and the pairing token.

Where the binary lives, and self-update. The binary is /opt/probeward-probe/probeward, in a directory owned by probeward-probe and listed in ReadWritePaths; everything else is read-only to the probe. Self-update writes the new file into that directory, keeps the old one as probeward.previous next to it and renames the new one over it, then the process replaces itself: same PID, so systemd sees no restart. This was tried under these settings (as a user unit with the same sandbox options): a 0.9.0 probe paired, was offered 0.9.1, installed it and re-executed in place, with no restart counted. To update with your own tooling instead, set PROBEWARD_PROBE_AUTO_UPDATE=false, make the directory root-owned and drop it from ReadWritePaths.

From the deb package ​

The deb package (install) ships a probe unit too, so a Debian or Ubuntu host needs one package whether it runs the core, a probe, or both. It differs from the standalone unit above where a package install needs it to:

Standalone unit (deploy/probe/)probeward-probe.service in the package
Binary/opt/probeward-probe/probeward, owned by the probe user/usr/bin/probeward, owned by root
Self-updateon; the probe replaces its own binaryoff (PROBEWARD_PROBE_AUTO_UPDATE=false is set in the unit): the probe could not write the file, and the package manager owns it. Update the probe by updating the package
User and stateprobeward-probe, /var/lib/probeward-probe (0700)the same
Settings/etc/probeward-probe/probe.env/etc/probeward/probeward-probe.env, a conffile readable by root only, because it holds the pairing token
Enabled by installingno, you do itno: neither enabled nor started, so a machine that installs the package to run the core never gets a probe that tries to pair
Hardeningas abovethe same, without ReadWritePaths

To make a host a probe: install the package, put the core's host:port and a pairing token in /etc/probeward/probeward-probe.env, and run

sh
sudo systemctl enable --now probeward-probe
journalctl -u probeward-probe -f

Once the probe shows as connected, delete the token line from the file. A host that is only a probe never sets PROBEWARD_DATABASE_URL: the core service is then not enabled and not started, nothing fails, and the journal says nothing about it. The probe uses the same ping setting as the core (/usr/lib/sysctl.d/60-probeward.conf, see install).

What the package does to the probe later:

  • Upgrade stops the probe, replaces the binary and starts it again if, and only if, it was running. The key and certificate in the state directory are untouched, so it reconnects without pairing.
  • apt remove stops it and leaves its state and settings, so a reinstall picks up where it was.
  • apt purge also deletes /var/lib/probeward-probe (its key, certificate, assignment and buffer, including samples not yet sent), /etc/probeward/probeward-probe.env and the probeward-probe user, without asking: the key and certificate are of no use without the package, and a new pairing makes new ones. The core still lists the probe; delete it there or pair a new one.

ICMP. Ping sensors use unprivileged ICMP sockets, which the kernel allows only for groups inside net.ipv4.ping_group_range. Many distributions set it to 0 2147483647; if sysctl net.ipv4.ping_group_range prints 1 0, put net.ipv4.ping_group_range = 0 2147483647 in /etc/sysctl.d/60-probeward-probe.conf. The alternative is a raw socket through AmbientCapabilities=CAP_NET_RAW (commented out in the unit). Do not use setcap on the binary: an update replaces the file and the file capability with it.

DHCP. The DHCP sensor listens on UDP port 68, which is privileged, and the unit drops every capability. Give it CAP_NET_BIND_SERVICE with a drop-in, as the sensor's page shows.

SNMP traps and syslog. The trap and syslog sensors make the probe listen on UDP 162 and UDP and TCP 514, which are privileged. Give the unit CAP_NET_BIND_SERVICE the same way, or set PROBEWARD_TRAP_LISTEN and PROBEWARD_SYSLOG_LISTEN in probe.env; see receivers. A device sends to the probe that polls its sensors, and the matches reach the core with the poll's result.

NetFlow, IPFIX and sFlow. The netflow and sflow sensors make the probe listen on UDP 2055 and 6343, which are above 1023, so no capability is needed; PROBEWARD_FLOW_LISTEN and PROBEWARD_SFLOW_LISTEN change them. A router exports to the probe that polls its sensors, and only the sensor's result (channels and one summary of the top talkers per poll) reaches the core: a flow never leaves the probe, and the probe keeps no flow either. See flow collectors.

Sensors on a probe ​

  • Credentials. Assignments carry every inherited credential slot the sensor uses: SNMP, SSH, Windows, RADIUS, vSphere, TLS client and the secret slot of the web API sensors (Prometheus, REST JSON, Redfish, Proxmox, HTTP content with a secret header). They are held in the probe's memory only, as described below.
  • Script and Nagios plugin sensors run on the probe, from the probe host's own directory: set PROBEWARD_SCRIPT_DIR in the probe's environment (probe.env). The core's directory plays no part and nothing is copied to the probe; put the programs on the probe host yourself. When it is unset on that probe the sensor reports the usual configuration failure, "running scripts and plugins is switched off". The same rules as on the core apply: see scripts.
  • Push sensors are never assigned to a probe. Their reports arrive at the core, so a push sensor under a remote probe behaves exactly as under the local probe: it does not become "the probe is not reporting" when its probe is cut off, nothing of it is buffered or replayed, and its own interval and grace decide when it is silent.

What you see ​

Settings, Probes lists each probe with its state (connected, not reporting, waiting to pair, refused, revoked), version and target, when it was last seen, its clock offset, and its buffer: samples held, size and cap, samples replayed, duplicates ignored, samples refused, and samples lost to a full buffer with their time range. The tree shows the state next to the probe's name. The same is in GET /api/v1/probes.

A probe can also send its own logs, metrics and traces to an OpenTelemetry collector, but only if its own environment (or probe.conf on Windows) sets OTEL_EXPORTER_OTLP_ENDPOINT. The core never tells a probe to export and a probe never sends telemetry through the core, so a probe in a remote network needs a collector it can reach. See telemetry.

Held samples and the buffer ​

  • The buffer is sized for 24 hours of the probe's assigned load (its sensors' intervals, at the measured sample size), never more than PROBEWARD_PROBE_BUFFER_MAX_MB. A probe with 500 sensors at 60 s intervals needs about 300 MB for a day; raise the cap for such a probe.
  • Samples are appended to segment files and synced to disk at least once a second, so a power cut loses at most the last second. A segment is deleted once the core has acknowledged every sample in it, and the core acknowledges only after the sample is committed to the database.
  • When the buffer is full the oldest samples go first. The loss is counted and its time range kept, reported to the core and shown on the probe. History then has a gap at the start of the outage, not the end, so the most recent state is what survives.
  • Duplicates are harmless. A sample has a fixed id, sensor and start time. If the connection drops before an acknowledgement arrives the probe sends the sample again; the core stores a sensor's sample for a given start time once and counts the repeat as a duplicate.
  • Credentials are never written to the probe's disk. If the probe restarts while it cannot reach the core, it polls the sensors that need no credential (ping, TCP, HTTP) and skips those that do until the core is back. Skipped polls are counted and shown.
  • Samples held by a probe are not part of the core's backup: they are on the probe until replayed.
  • Replayed samples reach the rollups. They are older than the rollup watermark, so the insert marks their 5-minute buckets as late (any scan more than 10 minutes old) and the next rollup pass recomputes those buckets and their hours (see storage). A full 24-hour buffer fits: the raw retention is at least one day, so a replayed scan is never refused as expired, and the job works through late marks 20,000 at a time, repeating at once while it is behind. 500 sensors replaying a day is about 144,000 marks, eight batches. Only with the 5-minute retention set to its minimum of one day can a scan replayed right at the 24-hour limit miss the 5-minute level; the hourly level still has it.

Clock rules ​

The core's clock is the reference.

  • The probe estimates the offset between its clock and the core's from every welcome and ping, and stamps every sample in core time. It keeps the last estimate on disk, so samples taken while it cannot reach the core after a restart are corrected too.
  • An offset beyond 2 seconds is shown as a warning on the probe. Run NTP on probes anyway: an offset that drifts during a long outage cannot be corrected after the fact.
  • A sample stamped more than 60 s into the core's future is refused, acknowledged so the probe forgets it, and counted as refused. A sample older than the history retention is refused the same way.

Revocation ​

Revoke (Settings, Probes, or POST /api/v1/probes/{id}/revoke) takes effect at once: the certificate is taken out of the listener's trust list, so the next handshake fails, and the probe's open session is dropped. The probe incident opens immediately, without the grace period, and the revocation is audited.

A revoked probe saw the credentials of the sensors it ran. They were sent to it over the encrypted session and held in its memory. If the machine may be compromised, rotate those credentials.

To bring a revoked or lost probe back, issue a new token ("Pair again"), delete identity.json from the probe's state directory (keep the rest: the buffer is replayed after pairing) and start the probe with the token. A probe that still has an identity ignores a token. On Windows the steps are in Windows probes. Pairing replaces the certificate and clears the revocation. Re-pairing is also the way to move a probe to a new machine; the old certificate stops working as soon as the new pairing completes.

Delete removes a probe that has no groups or devices left; move them to another probe first.

Updating ​

The core can update its probes. Put the probe binaries (static musl builds for Linux, the .exe for Windows) in a directory with a manifest.json, and point PROBEWARD_PROBE_BINARIES_DIR at it. Each release has the directory ready as probeward-<version>-probe-binaries.tar.gz:

json
{
  "version": "0.2.0",
  "files": {
    "x86_64-unknown-linux-musl": "probeward-x86_64",
    "aarch64-unknown-linux-musl": "probeward-aarch64",
    "x86_64-pc-windows-gnu": "probeward-x86_64.exe"
  }
}

A probe with auto-update on that runs an older version is offered the file for its target. It downloads it over the authenticated session, checks the size and SHA-256 the core announced, makes it executable and runs <file> version, which must print the offered version. Only then does it keep a copy of the running binary as <binary>.previous, rename the new one over it (atomic, same directory) and restart into it. Any failure along the way leaves the old binary in place and running, and the outcome is reported to the core and shown on the probe. If the new binary cannot be started at all the previous one is put back. A Windows probe cannot replace its running binary and lets the service manager restart it instead; see updating a Windows probe.

Verification. The hash arrives over the mutually authenticated session pinned to the core's CA, so a file that matches it is the file the core's operator put in the directory. There is no separate signing key to manage or lose. Check release signatures when you place the binaries there.

A probe that speaks an incompatible protocol version is refused, but is still offered the update, so an old probe can update itself into compatibility. Auto-update can be switched off per probe in the UI (PUT /api/v1/probes/{id}/auto-update) or on the probe machine.

Backup, restore and trust ​

The probe CA's private key is stored in the database, encrypted with the vault master key (the same envelope encryption as credentials, and re-wrapped when the master key is rotated). A database backup plus the vault key file is therefore everything needed to keep the probes' trust: restore both and every probe reconnects with its existing certificate. The core's own TLS certificate is reissued from the CA at each start, so there is no further file to keep.

  • Restored with the vault key: nothing to do. Probes reconnect and replay what they held.
  • Restored without the vault key: the probe CA's key cannot be opened, any more than the credentials, and a core with PROBEWARD_PROBE_LISTEN set stops at start with that error. To start over with a new key, delete the CA (DELETE FROM probe_ca;) and restart: the core creates a new CA, and every probe then refuses the core because it pins the old one. Pair each probe again as described under revocation; its buffer is kept and replayed after pairing.
  • Restored from an older backup: probes paired after the backup are unknown to the core and are refused; pair them again. Probes revoked after the backup are trusted again until you revoke them again.

Limits ​

  • Linux (x86-64 and ARM64) and Windows (x86-64). Script and Nagios plugin sensors do not run on a Windows probe.
  • One core per probe. A probe paired with another core must be paired again.

AGPL-3.0-only