skip to content

temBoard

temBoard is Dalibo's self-hosted web console for PostgreSQL fleets: an agent per instance feeds activity, configuration, maintenance and alerting views. Interviewers ask when it beats a metrics stack.

on this pageshow

explore

questions

6

In temBoard, what do the central UI, its repository and the per-instance agent each do, and why must the agent run on the PostgreSQL host?

level: middleimportance: must knowfreq 26%

answer

  1. three components, two flows
  2. UI pulls; agent buffers locally
  3. signed requests, public key on agent
  4. superuser over the Unix socket
  5. per-backend CPU from /proc

basics

~20 s

The UI serves the console and keeps users, inventory and metric history in a PostgreSQL repository; each agent runs beside its instance, connects as superuser over the Unix socket, buffers probe results and answers the UI's signed HTTPS calls.

solid answer

~50 s

temBoard has three parts. The **repository** is a PostgreSQL database holding users, Environments, the inventory, metric and statement history. The **UI** serves the console on HTTPS port 8888 and does all the talking: every 60 seconds it pulls new probe records from each agent, and when a page is opened it calls the agent's API live. Each request is signed with the UI's private RSA key; the agent verifies it with the public key fetched by `temboard-agent fetch-key` and rejects requests older than two hours. The **agent** listens on port 2345, runs probes every 60 seconds into a local SQLite buffer that keeps six hours, and connects to PostgreSQL as a **superuser over the local Unix socket**. It must sit on the database host because remote agents are not supported and it reads `/proc` for per-backend CPU, memory and I/O. In temBoard 10 each instance belongs to exactly one Environment.

code

bash · 7 lines
bash
# on a library-branch database host running PostgreSQL 18, cluster 18/main
/usr/share/temboard-agent/auto_configure.sh https://temboard.library.example:8888
temboard-agent --config /etc/temboard-agent/18/main/temboard-agent.conf fetch-key
systemctl enable --now temboard-agent@18-main

# on the temBoard UI host: idempotent registration into an Environment
sudo -u temboard temboard register-instance branch07.library.example 2345 -e branches-prod --if-not-exists

go deeper

for a junior

Remember the three parts (repository, UI, agent), the default ports 8888 and 2345, and that every instance needs an agent on its own host.

for a middle

Explain both flows: the UI pulling probe records every minute and calling the agent live for pages, plus the signed requests and the local superuser connection.

for a senior

Show the operational consequences: firewall direction, six-hour buffer during a UI outage, superuser exposure on every host, and upgrading the UI before the agents.

for a principal

Weigh the agent model itself: a superuser daemon on every database host buys host-level detail and actions, at a security and patching cost a fleet owner has to accept.

## The three components temBoard splits into a **repository**, a **UI** and an **agent**: | Component | Runs on | Talks to | Default listener | |---|---|---|---| | Repository | any PostgreSQL 13+ server | the UI only | 5432 (database `temboard`, role `temboard`) | | UI (`temboard`) | one central host | the repository and every agent | 8888, HTTPS | | Agent (`temboard-agent`) | each PostgreSQL host, one per cluster | its local instance; the UI only at setup | 2345, HTTPS | The **repository** stores users, Environments, the instance inventory, aggregated metric history (730 days by default), statement snapshots (7 days by default) and alert state. The install guide asks for `work_mem` of at least 16MB on the server hosting it so chart pages stay quick. ## Two flows, both started by the UI 1. **Collection.** The agent runs its monitoring probes every 60 seconds (`[monitoring] scheduler_interval`) and appends each result to a SQLite file in its home directory, trimming anything older than six hours. Every 60 seconds the UI's collector asks each agent, in batches of 16, for the records newer than the last one it stored, inserts them, aggregates them into history tables and runs the alerting checks. A UI outage shorter than six hours therefore leaves no gap once the collector catches up. (Some temBoard pages still describe the agent pushing data; the 10.0 code pulls.) 2. **Interactive calls.** When someone opens Activity, Configuration or Maintenance, or presses a button there, the UI calls the agent's HTTP API through its proxy route and the agent answers from live queries against PostgreSQL. The practical consequence for a firewall: the UI must reach every agent on its port; an agent needs to reach the UI only when it fetches the key or registers. ## How the agent trusts the UI - The UI owns an RSA key pair; `temboard generate-key` creates a 4096-bit key. - On each agent, `temboard-agent fetch-key` downloads the UI's **public** key. An agent accepts requests from a single UI. - Every request carries `X-TemBoard-Date`, `X-TemBoard-User` and `X-TemBoard-Signature`, a `v1:` RSA-PSS/SHA-256 signature over a canonical form of the request. The agent answers 400 or 403 to a missing or bad signature and rejects any request dated more than **two hours** ago. - The user name travels with the request so the agent can record audit notifications such as `Backend 48213 terminated` or `Setting work_mem to 32MB.` - Since 8.0, logging in to the UI gives that user full DBA access to the agents of their Environments; there is no second login on the agent. ## Why the agent must sit on the PostgreSQL host - It connects as a **superuser over the local Unix socket**: `[postgresql] host` defaults to `/var/run/postgresql` and `user` to `postgres`. The documentation states plainly that running an agent on a remote host is not supported. - The Activity view reads `/proc/<pid>` for each backend to show CPU time, resident memory and bytes read and written, which only works on the same machine. - Host metrics (load, CPU, memory, swap, file-system usage) come from that machine too. - Its systemd unit gives it an OOM score so the kernel picks the agent before PostgreSQL under memory pressure. One host can run several agents, one per cluster, each with its own configuration directory, home directory and port; the first one on a host gets 2345. ## Environments Since 9.0 each instance belongs to **exactly one Environment**, and the members of an Environment's group are the users who can manage its instances; administrators manage users and Environments. This replaced the many-to-many instance groups and user groups of 8.x, which is why an 8.x agent had to be re-registered against a 9.0 UI. ## Getting one instance in 1. Install `temboard-agent` from Dalibo's APT or YUM repository (10.0 is no longer installable with pip). 2. Run `/usr/share/temboard-agent/auto_configure.sh` with the UI's URL; it writes a per-cluster configuration and picks a port. 3. Fetch the UI's signing key and start the systemd unit. 4. Register the instance into an Environment, from the database host with `temboard-agent register --environment <name>` or from the UI host with `temboard register-instance`. When upgrading, move the UI first: a v10 UI manages v9 and v10 agents, while a v9 UI cannot manage a v10 agent.

  • What happens to temBoard's charts if the UI is down for an hour?
    Nothing is lost. The agent keeps probing every 60 seconds and keeps six hours of results in its local SQLite file. When the UI is back, its collector asks each agent for records newer than the last one stored and catches up. An outage longer than six hours leaves a gap, because older records have been trimmed.
  • Why can't the agent use a non-superuser role such as a pg_monitor member?
    temBoard 10's agent is built for superuser access over the local Unix socket: it terminates backends, runs ALTER SYSTEM and reloads, and runs VACUUM, ANALYZE and REINDEX on any table. A monitoring-only role could read the statistics views but could not do those actions, and the documented configuration requires a superuser.
  • In which order do you upgrade a temBoard 9 fleet to 10?
    UI first, then agents. Stop the UI, upgrade the package, run `temboard migratedb upgrade` on the repository, and start it again. A v10 UI manages both v9 and v10 agents, so the agents can follow host by host; a v9 UI cannot manage a v10 agent.

  • The agent can run on a separate monitoring box and reach each instance over TCP.
  • The agent can connect with a read-only pg_monitor role instead of a superuser.
  • Agents authenticate the UI with a shared password stored in each agent's config file.
  • The temBoard repository is a SQLite file next to the UI.
  • An instance can sit in several Environments so two teams can share it.

Assumes temBoard 10.0: Environments replaced groups in 9.0, pip installs ended in 10.0, and a v10 agent needs a v10 UI.

open as a page

When does temBoard beat a general metrics-and-dashboards stack, and when does it lose, for a two-person DBA team running 40 PostgreSQL instances for a public-library network?

level: seniorimportance: must knowfreq 28%

basics

~20 s

temBoard wins when a small team wants a ready-made PostgreSQL console where it can also act: terminate sessions, change settings, schedule maintenance. A metrics stack wins on custom alert rules, routing, long-term analysis and anything beyond PostgreSQL.

open as a page

What is temBoard, and which PostgreSQL administration jobs does its web console let a DBA team do from one place?

level: juniorimportance: should knowfreq 30%

basics

~10 s

temBoard is Dalibo's open-source, self-hosted web console for a fleet of PostgreSQL instances: a central UI plus one agent per instance, giving dashboards, session management, configuration editing, scheduled maintenance, statement history and threshold alerting.

open as a page

In temBoard's Activity view, how do you find the PostgreSQL session that is blocking others and end it, and what runs when you terminate it?

level: middleimportance: should knowfreq 22%

basics

~20 s

Open the Waiting tab to see the ungranted locks, then the Blocking tab for sessions holding what they want, usually an old idle-in-transaction one; Terminate makes the agent run pg_terminate_backend(pid), ending that session and rolling back its transaction.

open as a page

When a DBA changes a PostgreSQL setting on temBoard's configuration page, what does the agent execute, and when does that clash with how the fleet is configured?

level: seniorimportance: should knowfreq 16%

basics

~10 s

The agent runs ALTER SYSTEM SET for each changed setting, then pg_reload_conf(); the value lands in postgresql.auto.conf, overriding postgresql.conf, which clashes with configuration management and fails outright when allow_alter_system is off.

open as a page

Before scheduling a REINDEX or VACUUM from temBoard's maintenance page on a busy PostgreSQL table, what SQL will the agent run and what should you check?

level: seniorimportance: nice to knowfreq 12%

basics

~20 s

The agent builds plain statements such as VACUUM (FULL) schema.table, ANALYZE schema.table and REINDEX TABLE schema.table, never CONCURRENTLY, and runs them at the scheduled UTC time; check the lock cost and the estimated bloat first.

open as a page