Skip to content

Private locations

Run heimdall-probe inside your own network to monitor internal services.

A private location is a heimdall-probe agent you run yourself: in a data centre, an office or a cloud VPC. It checks services that are not reachable from the internet and votes in the quorum like a public region.

How it works

  • The agent opens an outbound TLS connection to Heimdall; no inbound ports are needed
  • It receives the monitors assigned to its location and schedules them locally
  • Results stream back; if the connection drops, the agent keeps checking and catches up

Get the probe

The probe is one program without dependencies, for Linux on amd64 and arm64. Download it from Heimdall and check it against the published checksum:

Download (amd64)
curl -fLO https://heimdall.warewave.tech/download/heimdall-probe-linux-amd64
curl -fLO https://heimdall.warewave.tech/download/SHA256SUMS
sha256sum --ignore-missing -c SHA256SUMS
sudo install -m 0755 heimdall-probe-linux-amd64 /usr/local/bin/heimdall-probe

On arm64 — a Raspberry Pi, an ARM server — the file is heimdall-probe-linux-arm64. The download is always the version Heimdall itself runs; heimdall-probe version says which one you have. To update, download it again and restart the probe.

Install

  1. In the app, open Settings → Private locations, add a location and a probe in it, named — the host name, for example. Its token starts with hpt_ and is shown once.
  2. Put the token in a file that only the user the probe runs as can read, for example /etc/heimdall/probe-token (mode 0600).
  3. Start the probe. The token decides the location and the probe’s name; there is nothing to name on the command line.
Linux
heimdall-probe --token-file /etc/heimdall/probe-token --server https://heimdall.warewave.tech

The token can also come from the environment. The download has Heimdall’s address built in, so --server can be left out:

Environment
HEIMDALL_PROBE_TOKEN=hpt_… heimdall-probe

As a container

The same program as an image for amd64 and arm64: the binary and CA certificates, nothing else. It runs as an unprivileged user, writes nothing to disk and logs JSON lines.

Docker
docker run -d --name heimdall-probe --restart unless-stopped \
  -e HEIMDALL_PROBE_TOKEN=hpt_… \
  ghcr.io/warewave-technology/heimdall-probe:latest

The probe goes by its token’s name in the app, however often the container is made anew. Tags are Heimdall’s versions; latest is the newest.

Scenario monitors at a private location

A private location plays the scenario monitors of its own organisation — an admin panel behind a VPN, an intranet — as well as it checks. A scenario plays in a headless browser, so the container is the probe’s -browser image, with Chromium in it (about 1 GB), in place of the small one. Its browser keeps its sandbox: it runs with a seccomp profile of ours, Docker’s default with the namespaces the sandbox needs allowed, and nothing more.

Docker
curl -fLO https://heimdall.warewave.tech/download/scenarios/heimdall-probe-browser.json
docker run -d --name heimdall-probe --restart unless-stopped \
  --memory 2g --security-opt seccomp=heimdall-probe-browser.json \
  -e HEIMDALL_PROBE_TOKEN=hpt_… \
  ghcr.io/warewave-technology/heimdall-probe:latest-browser
  • The profile is in the same directory’s SHA256SUMS. Without it the probe still checks, plays no scenario and says why in its log: the browser is never started without its sandbox.
  • Tags are Heimdall’s versions with -browser after them; latest-browser is the newest.
  • Memory: 2 GB for the container plays one run at a time — the browser about 400 MB, a run up to 700 MB on a heavy page. Setting --memory is better: a page that eats memory then ends the browser, not the machine.
  • CPU: 1 vCPU for one run at a time, 2 for more runs at once or for a machine that also checks many monitors. amd64 or arm64.
  • More runs at once: browser_concurrency in a configuration file, 700 MB more memory for each.
  • The program on a host plays scenarios too when Chrome, Chromium or Edge is installed there: it finds the browser where the system installs it.

Ping checks

ICMP monitors use the kernel’s unprivileged ping sockets, which a Linux host opens only to the groups named in net.ipv4.ping_group_range. Inside a Docker container that is everybody already. On a host, many distributions set it at installation and some do not: when a ping monitor reports “icmp socket … permission denied”, allow it with the setting below. Running the probe as root or with a capability does not replace it.

/etc/sysctl.d/90-heimdall-probe.conf
# every group may open a ping socket (what Docker sets inside a container)
net.ipv4.ping_group_range = 0 2147483647

The probe shows up under the location’s “Probes” within about 15 seconds of starting.

One token is one probe. For another machine in the same network, add another probe in the app and start it with that one’s token. A second copy started with a token already in use checks nothing while the first one runs, and takes over when it stops.

Behind a proxy

Where the network reaches the internet only through a proxy, start the probe with the standard variables: HTTPS_PROXY for https:// addresses and HTTP_PROXY for http:// ones — with https://user:password@… if the proxy asks for credentials — and NO_PROXY for the names it reaches directly. The probe’s connection to Heimdall and its http and keyword checks go through the proxy; tcp, tls, dns and icmp checks always go directly. Write special characters in a password percent-encoded (%25 for %): a value that is not a valid address is ignored and the probe goes out directly — it names the variable in its log when it starts.

Environment
HTTPS_PROXY=https://proxy.example.com:3128
HTTP_PROXY=https://proxy.example.com:3128
NO_PROXY=.corp.example.com,10.0.0.0/8
SSL_CERT_DIR=/etc/heimdall/ca

An https:// proxy’s certificate is always verified, against the machine’s CA certificates: “Verify the TLS certificate” turned off on a monitor is about that monitor’s site, never about the proxy every monitor goes through. If your company signs the proxy’s certificate, put its CA certificate in a directory and name the directory in SSL_CERT_DIR; the machine’s own certificates stay trusted too.

A check that fails at the proxy says so: its error starts with “proxy:”. That is the proxy unreachable or silent (“proxy: timeout”), its certificate not trusted, the credentials refused (“proxy: 407 Proxy Authentication Required”), or, for an https:// address, any refusal to open the way to the site — “proxy: 502 Bad Gateway”, say, when the proxy could not reach it. An http:// address the proxy fetches itself: what it answers then, a 502 included, is shown as the site’s answer, and a proxy that never answers as the site’s timeout. Through the proxy the probe never learns the site’s address: an [IP] condition has none there and fails.

Requirements

  • Linux on amd64 or arm64 (a Raspberry Pi works)
  • Outbound HTTPS (port 443) to Heimdall
  • A clock synchronised with NTP