Logs and cleanup#
Where Empowerment Center writes its logs, how they rotate, how they are sent to a syslog or a SIEM, and what ECenter cleans up by itself so that the own database does not grow without control.
The logs#
Each container writes its logs to standard output:
docker compose -f deploy/compose.yaml logs -f backend
docker compose -f deploy/compose.yaml logs --since 1h frontend
| Service | What it logs |
|---|---|
backend |
Startup (the version, the migrations, the installation identifier and the license status), errors, each module's warnings and the audit lines. |
frontend |
Each request, in nginx's access format. |
db |
PostgreSQL's warnings and errors. |
chromium, valhalla |
Their own. |
Without containers, the backend still writes to standard output: with systemd, to its journal (journalctl -u ecenter).
Lines worth knowing#
The backend writes its log in Spanish; these are the lines as they appear.
| Backend line | What it means |
|---|---|
Creado el administrador inicial '…' |
The first startup has created the first administrator. |
No hay usuarios y no se ha configurado ecenter.security.bootstrap-admin… |
Nobody can sign in: ECENTER_ADMIN_LOGIN and ECENTER_ADMIN_PASSWORD are missing. |
Instalación <id>: licencia de … |
The license is valid. |
Instalación <id>: … Hasta que un administrador del sistema instale una licencia válida, la API solo permite iniciar sesión e instalarla. |
There is no valid license, and why. |
Licencia instalada por … para … |
Someone has installed a license. |
No hay claves de licencia de confianza… |
This version accepts no license: ask Action Ware. |
La privada de la clave de la instalación … no se puede descifrar (¿ha cambiado ECENTER_SECRETS_KEY?): se crea otra |
The secrets key is not the one that encrypted the stored data. The connections' passwords cannot be decrypted either (see The secrets key). |
Warnings beginning with DB: at startup |
Messages from a database migration (for example, workbooks renamed because they had the same name in a folder). |
Rotation#
With the audit, each sign-in, each query or each job can be a line, and Docker's json-file driver does not rotate if the daemon does not configure it. deploy/compose.yaml gives all its services the same logging configuration, which keeps at most 5 files of 50 MB per service:
If the organization collects the logs with journald or with syslog, change the driver in that block; rotation then becomes theirs.
The audit in the log#
Each audit entry is also written as a backend line, in ecenter.audit.<category> (ecenter.audit.access, ecenter.audit.data…), to send it to a syslog or a SIEM. By default all categories are written except query (each query) and job (each job), which are many. To have them as well:
Or with variables: LOGGING_LEVEL_ECENTER_AUDIT_QUERY=info. The full audit, with the SQL and its values, is queried and exported in Administration › Audit (see Audit).
What ECenter cleans up#
ECenter purges by itself, without repeating it with several instances:
| What | Kept by default | Property |
|---|---|---|
| The audit of queries and jobs | 90 days | ecenter.audit.retention.categories.query, …job |
| The rest of the audit | 365 days | ecenter.audit.retention.others |
| The job history | 90 days | ecenter.operations.maintenance.job-history |
| Resolved operational alerts | 365 days | ecenter.operations.maintenance.resolved-alerts |
| Workbooks, lists and templates in the trash | 30 days since they were deleted | ecenter.trash.retention (ECENTER_TRASH_RETENTION) |
| The usage of each document (opens per day, surface and channel, without names) | 400 days | ecenter.operations.maintenance.document-usage |
| The console's activity | 3 days per minute, 92 per hour, 400 per day | ecenter.operations.activity.retention.* |
| The runs of scheduled tasks | 90 days | ecenter.scheduling.history |
| The sends of subscriptions and data alerts | 90 days | ecenter.distribution.history |
| The activity of SCIM provisioning | 30 days | ecenter.provisioning.activity-retention |
| Revoked or expired service credentials | 180 days | ecenter.security.credentials.retention |
| Finished embedded sessions | 30 days | ecenter.embedding.retention |
| Expired sessions | Deleted within a minute | ecenter.security.sessions.cleanup-interval |
| Unfinished uploads of external data and layers | 24 hours | ecenter.externaldata.upload-ttl, ecenter.maps.upload-ttl |
| The backups of workbooks, templates and metadata | The last 10 of today and the last one of each of the 7 previous days | ecenter.workbooks.backups-*, ecenter.portal.layouts.backups-*, ecenter.metadata.backups-* |
All the properties, in Operations, audit and scheduling. The audit is what grows most: if the own database's disk fills up, check its periods and ecenter.audit.record-queries first.
The disk#
- The own database grows mainly with the audit. Watch its volume (
db-data) with the organization's tools. - The backend's disk holds the temporary files of uploads. The operations console warns if less than 1 GB is free in the temporary directory (
ecenter.operations.alerts.disk-free-minanddisk-path). - The containers' logs are bounded by rotation.
- The routing engine's graph takes about 6 GB for Spain and the Canary Islands, and does not grow.