Skip to content
Rowsafe
Docs

Hosts and agents

A host is a server (or container) running the Rowsafe agent. How hosts enroll, report in, update and go offline.

A host is a server running the Rowsafe agent. With Docker, it is the agent container next to your database container. One host can protect several databases (PostgreSQL clusters).

rowsafe hosts list
HOST  ID                  AGENT  PLATFORM     CHANNEL  PIN  LAST UPDATE  LAST SEEN
db-1  host_9h8g7f6e5d4c3  0.4.2  linux/amd64  stable   -    confirmed    12s ago

Enrollment

A new host joins your organization with a one-time enrollment token (rse_...):

rowsafe hosts enroll-token            # valid for 1 hour
rowsafe hosts enroll-token --ttl 24h  # 1 minute to 7 days

The token works once. On its first start, the agent trades it for its own identity, saved in /var/lib/rowsafe/agent.json. After that you can delete the token from the agent's configuration.

The dashboard does the same under Hosts, then Add host.

What the agent does

  • Runs as the postgres system user, never as root.
  • Connects to PostgreSQL over the local Unix socket only.
  • Makes only outbound HTTPS requests. Nothing listens for Rowsafe on your server.
  • Runs only a fixed set of tasks: inspect, adopt, check, backup, drill and restore point.
  • Uses at most half the default CPU and IO weight, and the kernel's out-of-memory killer picks it before PostgreSQL.

See Security for the full list.

Online and offline

The agent sends a heartbeat every 30 seconds. If Rowsafe hears nothing for 5 minutes, it raises the critical agent_offline alert.

While the agent is offline:

  • PostgreSQL keeps archiving its changes to your bucket. Point-in-time recovery keeps working.
  • Scheduled backups and drills don't run, and metrics stop.
  • After 10 minutes, the database stops counting as protected, because its archiving status is unknown.

See Agent offline to find out why.

Updates

On servers, the agent updates itself with signed releases, tests the new version first and rolls back if it fails. In Docker, you update by changing the image tag. See Updating and uninstalling the agent.

Removing a host

rowsafe hosts remove db-1

This revokes the agent's access. Remove the host's databases first (rowsafe db remove). It doesn't change anything on the server: uninstall the agent there.

Edit on GitHub