Skip to Content
mlab docs

Monitoring and logs

Health probes for app and executor, licence status, where ir.mlab.sh writes its logs and in what format, and what to alert on.

Health probes

ir.mlab.sh has no dedicated health or metrics endpoint. These are the signals that exist, and what each one proves.

ProbeCommandHealthyProves
App HTTPGET /api/v1/200 with {"message": "Hello, ..."}The HTTP server is up. It only binds after MySQL and ClickHouse answered, migrations ran and the boot licence check finished. It does not re-test the databases on each call.
ExecutorGET http://executor:8090/health (compose network only)200 with {"status":"ok","service":"playbook-executor"}The executor accepts playbook runs.
LicenceGET /api/v1/license/status with an admin account keyguard.status is activeThe last hourly check with mlab.sh succeeded.
DatabasesCompose healthchecks (mysqladmin ping, clickhouse-client --query "SELECT 1")healthy in docker compose psThe database process answers.

The app and executor images contain no curl or wget, so there is no in-container healthcheck for them. Probe from the host, the proxy or your monitoring system.

# App, through the proxy
curl -fsS https://ir.example.com/api/v1/ >/dev/null && echo app ok

# Executor, from a throwaway container on the project network (example)
docker run --rm --network ir-mlab_default curlimages/curl:8.10.1 \
  -fsS http://executor:8090/health

# Databases
docker compose ps

Licence status

Create an account key for an admin user under Settings > API keys, then:

curl -fsS https://ir.example.com/api/v1/license/status \
  -H "Authorization: token $IR_ADMIN_KEY"

The guard object carries:

FieldMeaning
statusstarting, active, offline (mlab.sh unreachable, running on the kept licence), missing_key, invalid, in_use (another instance holds it), expired
licensedfalse means the console is locked
expires_atWhen the kept signed licence expires (7 days after issue, renewed hourly)
last_check_ok, last_check_atLast successful and last attempted check
consecutive_failuresFailed checks in a row
detailHuman-readable reason, also shown under Settings > License

The same state is logged at every check as License guard: <status> <detail>. See Licensing for what each state means.

Logs

Container output

app and executor log to stdout at INFO level and above, as plain-text lines with a timestamp, the level and the message. Read them with Docker:

docker compose logs -f --since 1h app
docker compose logs -f executor

Docker's default json-file driver keeps these without a size cap. Set a limit, or ship them to your log platform with a logging driver:

docker-compose.override.yml (example)
x-logging: &logging
  driver: json-file
  options: { max-size: "50m", max-file: "5" }
services:
  app:      { logging: *logging }
  executor: { logging: *logging }

Useful lines, verbatim:

MessageMeaning
Waiting for MySQL to be up... / Waiting for ClickHouse to be up...Boot blocked on a database (repeats every 2 s).
MySQL migration error: ... / ClickHouse migration error: ...A migration failed at boot.
Server ready to accept connectionsBoot finished.
License guard: <status> <detail>Result of each licence check.
COOKIE_SECURE=false - the session cookie will be sent over plain HTTP...Warning at boot.
INTERNAL_SECRET is not set - refusing internal authenticationPlaybook callbacks will fail.
App token refused on <method> <path> (key note: ...)An integration's token tried something other than creating alerts.
request logging disabled until restart: ...The request log could not be written (see below).
request log queue saturated - dropping log linesRequest-log writer cannot keep up; lines are dropped.
ClickHouse health check failed: ...ClickHouse unreachable.
[Executor] Executing '<playbook>' (run <id>, trigger: <type>)A playbook run started (executor).

Request log

Every HTTP request is appended as one JSON object per line to /app_mlab_sh/log/<YYYY-MM-DD>.log, bind-mounted to ./log on the host. A new file starts each day. Fields include timestamp, method, path, user_ip, user_agent, auth (Session, AccountKey, AppToken, Internal, Anonymous), is_admin, organization (with license and locked) and the signed-in user's details.

{"auth":"Anonymous","is_admin":false,"method":"POST","organization":{"license":"free","locked":false,...},"path":"/auth/login","timestamp":"2026-10-04T14:54:36.071224803+02:00","user_agent":"Mozilla/5.0 ...","user_ip":"172.22.0.1"}

The file date and timestamps follow the container time zone. The images set TZ=Europe/Paris; put TZ=... in .env to change it.

The log directory must be writable by the container user. The app runs as mlab, not root. If ./log is owned by root (Docker creates a missing bind-mount directory as root), the first write fails, the app logs request logging disabled until restart, and nothing is written until the next restart. Fix the ownership, then restart app:

sudo chown "$(docker compose exec -T app id -u):$(docker compose exec -T app id -g)" log
docker compose restart app

Writes happen off the request path: a full disk disables request logging rather than slowing requests down.

Retention

The app never rotates or deletes request logs. Since each day is a separate file that is closed at the date change, plain deletion is enough, for example from cron:

find /home/ops/ir-mlab/log -name '*.log' -mtime +90 -delete

Pick the period your privacy policy allows: these files contain IPs, emails and names.

Metrics

There is no Prometheus or other metrics endpoint. Use container-level metrics (docker stats, cAdvisor, node exporter) for CPU, memory, disk and network, and the application's own dashboards (Reporting) for MTTA/MTTR and SLA compliance.

What to alert on

ConditionSourceSeverity
GET /api/v1/ fails for 2+ minutesExternal probePage
Licence guard.licensed is falseLicence statusPage: the console is locked
Licence status is offline, or consecutive_failures ≥ 3Licence statusWarn: check egress to mlab.sh:443 before expires_at
expires_at less than 48 h awayLicence statusPage
Any migration error lineContainer logsPage, especially after an upgrade
request logging disabled or queue saturatedContainer logsWarn
Executor /health failsProbeWarn: playbooks don't run
mysql or clickhouse not healthydocker compose psPage
Container restart count risingDockerWarn
Free space on the Docker volume filesystem under 15 %HostWarn; ClickHouse and evidence grow over time
Webhooks in state failing or brokenSettings > WebhooksWarn: notifications are not reaching their destination
Nightly backup missing or abnormally smallYour backup jobWarn

Webhook deliveries are retried 3 times in total, 5 s then 30 s apart (IR_WEBHOOK_BACKOFF_MS overrides the waits, in milliseconds, comma separated).

On this page