Skip to content

Operation and alerts

ITS measures itself and warns you when something fails. This page is for whoever installs and maintains the server: what to check, what the alert covers and what it can't cover. Whoever administers ITS reads the same numbers on screen, as described in Reading observability.

Everything is local: no measurement leaves the server, and there's no integration with outside services.

How can I tell from outside whether ITS is up?

The /api/health address answers without sign-in and without details:

ResponseWhen
200 with {"status":"ok","db":"ok"}The API is up and the database answers
503 with {"status":"degraded","db":"down"}The API is up, but the database doesn't answer

The Docker healthcheck uses this address: with the database down, the api service shows as unhealthy in docker compose ps. It works even before installation is complete. If you have your own monitoring tool, point it to this address, keeping in mind that it only tells whether the API and the database answer.

How do I see the services and the logs?

docker compose ps
docker compose logs --tail 100 api
docker compose logs --tail 100 worker

Logs are written in Portuguese. The worker doesn't serve anything on the network, so it shows as Up, not healthy. To know whether it's alive, look at the sign of life it records every minute, in the Worker item on the Observability screen.

When does ITS send alerts?

Every 5 minutes, the worker and the API check health. When an item goes into failure, people with the See system health and metrics permission get a notification in the bell and, with email on, an email right away. The alert covers:

  • the worker stopped and the API with no sign of life: they're separate processes, and each one warns for the other (with the worker stopped, the API sends the alert);
  • the email queue stuck and sends failing;
  • attachment space running out;
  • the email and corporate sign-in secrets, the integration token and the webhook secret close to expiring or expired;
  • webhook deliveries suspended after consecutive failures.

A pending migration and a slow database only go to attention, which shows on the screen but doesn't raise an alert.

What doesn't the alert cover?

For those cases, use what already exists outside ITS:

  • Automatic restart: Compose uses restart: unless-stopped, and Docker brings the services back up if they go down.
  • External monitoring of /api/health: if it returns 503 or doesn't answer, it's time to take a look.
  • Server disk: the Attachment space item measures only the attachments volume (storage). The database volume (pgdata) and the server disk are up to you. Database size appears in Usage and security.

What do I do when the worker stops?

You notice it from the Worker item on attention or failed, from emails that don't go out and from deadline reminders and daily summaries that don't arrive. Restart the worker and read the log:

docker compose restart worker
docker compose logs --tail 100 worker

If it goes down again right after, the log shows why (usually an unreachable database or a changed APP_SECRET_KEY).

What do I do when attachment space runs out?

The Attachment space item measures the free space on the storage volume. It goes to attention below 10% and failed below 3%. Grow the volume or clear old attachments. Backing up the volume is covered in Backup and updates.

What can I adjust?

WhatWhereDefaultWhat for
METRICS_ENABLED.envtruefalse turns off traffic counting and history. Health and alerts keep working
Observability: days of history keptSettings > Operation30 (from 1 to 90)How long hourly traffic is kept
TZ.envUTCTime zone of the logs. Charts use the installation's time zone

The worker deletes expired history once an hour. After changing .env, recreate the services (up -d).

What changes when I restart or update?

Restarting the API resets the Now block, which counts since the API started; hourly history doesn't reset. On startup, the API applies pending migrations on its own, so the Migrations item only stays on attention if something prevents that.

Where do I start when something goes wrong?

  1. Open the Observability screen and see which item isn't OK.
  2. Check docker compose ps and the log of the service involved.
  3. If the database is down, start with docker compose logs db.