Spitfirev0.62.0 · What's new

Version: 0.62.0This documentation is for Spitfire 0.62.0.

Tower and continuous metrics

A Tower is a small gateway that runs on a machine in your network. Server and database Collectors (or your own OpenTelemetry Collector) send their metrics to the Tower over OTLP/HTTP; the Tower forwards them to the controller over one outgoing link. The controller keeps metrics in its own PostgreSQL, next to your run results.

  • The Tower only connects to the controller. Nothing connects into your network and no internet access is needed.
  • If it cannot reach the controller it keeps incoming metrics on disk (1 GB / 24 hours by default) and forwards them in order once the link is back. When the buffer is full the oldest go first and are counted.
  • One Tower per network zone (data centre, DMZ, cloud VPC) is enough.

Page: Towers & metrics In Spitfire: /towers (install admins only).

Turning metrics on

  1. On Towers & metrics, switch on Collect and keep metrics.
  2. Tick the box confirming that metrics take space in the database. Who turned it on and when is recorded.
  3. Enter the Retention. It cannot exceed your license's ceiling:
Plan At most
Free 7 days
Starter 30 days
Growth 90 days
Scale 180 days
Enterprise 365 days
  1. Enter the Storage budget (GB). You are warned at 80%; at 90% no new metrics are written.
  2. Save.
Note

While metrics are off, Towers take metrics but drop them.

Installing a Tower

  1. Add Tower → a name (e.g. istanbul-dc) and an optional zone.
  2. Two tokens are shown only once; keep both:
    • sftower_…: the Tower's own token (SPITFIRE_TOWER_TOKEN).
    • sfcol_…: the token of the Collectors sending to the Tower (Authorization: Bearer sfcol_…).
  3. Run the Docker command shown on the Tower machine:
bash
docker run -d --name spitfire-tower --restart unless-stopped -p 4318:4318 \
  -v spitfire-tower:/var/lib/spitfire-tower \
  -e SPITFIRE_TOWER_CONTROLLER=https://<controller> \
  -e SPITFIRE_TOWER_TOKEN=sftower_... \
  <spitfire image> spitfire-tower
  1. The list shows Connected (the first link takes a few seconds).

Tower settings (environment variables):

Variable Default Meaning
SPITFIRE_TOWER_CONTROLLER – The controller's address (required)
SPITFIRE_TOWER_TOKEN – The sftower_… token (required)
SPITFIRE_TOWER_LISTEN :4318 The address Collectors send to
SPITFIRE_TOWER_TLS_CERT / SPITFIRE_TOWER_TLS_KEY – Serve OTLP over HTTPS
SPITFIRE_TOWER_CA – CA file when the controller's certificate comes from a private CA
SPITFIRE_TOWER_BUFFER_MB 1024 Disk buffer
SPITFIRE_TOWER_BUFFER_HOURS 24 Metrics older than this are dropped
SPITFIRE_TOWER_RATE 20 Exports per second one source may send

Server and PostgreSQL metrics (Collector)

Spitfire writes a ready config for the official OpenTelemetry Collector Contrib (otel/opentelemetry-collector-contrib:0.164.0). Install the Collector on the server to watch; as long as it can reach PostgreSQL over the network, the same Collector reads the database too.

  1. Towers & metrics → Collector config.
  2. Tower address: http://localhost:4318 when the Tower is on the same machine, otherwise http://<tower-machine>:4318.
  3. This server's metrics: CPU, memory, disk, network, load, file systems.
  4. Add PostgreSQL: address (db.corp:5432), user (default spitfire_monitor), databases (empty: all), TLS.
  5. Pick Docker or the otelcol-contrib binary → Generate config.
  6. Save collector.yaml on the Collector machine.
  7. Create the monitoring user in PostgreSQL as an admin:
sql
CREATE ROLE spitfire_monitor WITH LOGIN PASSWORD '<password>';
GRANT pg_monitor TO spitfire_monitor;
  1. Fill in the env and run the given command:
bash
docker run -d --name spitfire-collector --restart unless-stopped --network host --pid host \
  -v /:/hostfs:ro -v "$PWD/collector.yaml:/etc/otelcol-contrib/config.yaml:ro" \
  -e SPITFIRE_COLLECTOR_TOKEN=<sfcol_…> \
  -e SPITFIRE_PG_PASSWORD=<password> \
  otel/opentelemetry-collector-contrib:0.164.0
  1. Within a minute the server and the database show in the Sources list.
Value From Goes to
Tower address the Tower machine, port 4318 config: exporters.otlphttp/spitfire.endpoint
sfcol_… token shown once when the Tower is created env SPITFIRE_COLLECTOR_TOKEN
PostgreSQL password the password from step 7 env SPITFIRE_PG_PASSWORD
PostgreSQL address/user the form config: receivers.postgresql.endpoint / username
Note

The token and the password are not written into the config, so it can be shared safely. pg_monitor cannot read the data in your tables, only statistics.

In the run report

Every server and database that sends metrics while a test run is going shows on the run's Backend tab as the Tower metrics source; the test needs no connection for it:

  • Server: CPU %, memory %, load (1 min), disk I/O, network I/O.
  • Database: connections, connections / max %, commits/s, rollbacks/s, deadlocks/s, row operations/s.

Each value is a stage (ramp, plateau…) mean in the table and a chart over time.

Connecting your own Collector

Add an exporter to your OpenTelemetry Collector's settings (replace <tower> with the Tower machine's address):

yaml
exporters:
  otlphttp/spitfire:
    endpoint: http://<tower>:4318
    headers:
      Authorization: "Bearer sfcol_..."
service:
  pipelines:
    metrics:
      exporters: [otlphttp/spitfire]

Once the Collector restarts, the source shows in the Sources list. Servers are counted by host.name, databases by server.address[:port] (else host.name).

License limits

Your plan sets how many servers and databases you can take metrics from:

Plan Servers Databases
Free 1 1
Starter 3 1
Growth 10 3
Scale 30 10
Enterprise unlimited unlimited

Growth and Scale can add packs: +10 servers or +5 databases (License page → add-on packs). At the limit new sources are not taken and are listed on the page. Delete a source you no longer use from Sources to make room; if its Collector keeps sending, it comes back.

Troubleshooting

Symptom Cause / fix
Tower Not connected The Tower machine cannot reach the controller address, or the token was revoked (the Tower stops with exit code 3). docker logs spitfire-tower
The Collector gets 401 The sfcol_ token is wrong or belongs to another Tower
The Collector gets 503 The Tower has not talked to the controller yet; wait for the link
The Collector gets 429 The source exceeded SPITFIRE_TOWER_RATE
"exports dropped" in the buffer The controller was unreachable for long; enlarge the buffer