Skip to content

Connect to a Raft cluster ​

In production, the OVN databases usually run as a 3- or 5-node clustered (Raft) deployment. Northwatch connects to one endpoint at a time and fails over to the next when a connection drops.

Pass multiple endpoints ​

Give --ovn-nb-addr and --ovn-sb-addr a comma-separated list of endpoints, one per cluster member:

bash
./bin/northwatch \
  --ovn-nb-addr tcp:10.0.0.1:6641,tcp:10.0.0.2:6641,tcp:10.0.0.3:6641 \
  --ovn-sb-addr tcp:10.0.0.1:6642,tcp:10.0.0.2:6642,tcp:10.0.0.3:6642

Northwatch connects to a reachable endpoint, monitors both databases, and re-connects against the remaining endpoints if that member becomes unavailable.

The same values can be supplied as environment variables:

bash
export NORTHWATCH_OVN_NB_ADDR=tcp:10.0.0.1:6641,tcp:10.0.0.2:6641,tcp:10.0.0.3:6641
export NORTHWATCH_OVN_SB_ADDR=tcp:10.0.0.1:6642,tcp:10.0.0.2:6642,tcp:10.0.0.3:6642
./bin/northwatch

Use TLS-protected endpoints ​

ssl: endpoints need client TLS material. An ssl: address without it is a startup error rather than a connection that can never complete a handshake:

bash
./bin/northwatch \
  --ovn-nb-addr ssl:10.0.0.1:6641,ssl:10.0.0.2:6641,ssl:10.0.0.3:6641 \
  --ovn-sb-addr ssl:10.0.0.1:6642,ssl:10.0.0.2:6642,ssl:10.0.0.3:6642 \
  --ovn-nb-tls-cert /etc/northwatch/nb.pem \
  --ovn-nb-tls-key  /etc/northwatch/nb-key.pem \
  --ovn-nb-tls-ca   /etc/northwatch/nb-ca.pem \
  --ovn-sb-tls-cert /etc/northwatch/sb.pem \
  --ovn-sb-tls-key  /etc/northwatch/sb-key.pem \
  --ovn-sb-tls-ca   /etc/northwatch/sb-ca.pem

Each trio is all-or-none, and the material is also used for the per-member _Server monitors that back the Raft health view below. It applies to every cluster in a --config-file.

Watch cluster health ​

Northwatch tracks per-member Raft state through the _Server database and exposes it:

bash
curl -s http://localhost:8080/api/v1/telemetry/raft-health

The same data feeds the Prometheus metrics northwatch_ovsdb_connected and northwatch_ovsdb_connections. See Prometheus metrics.

Reduce load on the primary ​

The initial monitor is the heaviest moment for the database serving it. To keep that load off the Raft leader, point Northwatch at an OVSDB relay or a standby/follower endpoint, and tune the staged monitor for large deployments. See Tune the initial load.

Next steps ​