Mendloop Docs Request access

Monitoring your install

Alerts for Mendloop's own errors, Sentry for its own events, and the instance overview for Super Admins.

Mendloop watches your production errors. This page is about watching Mendloop itself: the API, ingest and the worker.

Alerts in chat for Mendloop's own errors#

Mendloop can post a message to a chat channel the moment one of its processes fails, instead of leaving a line in a container log nobody reads. It uses blare, a small library that posts one grouped message per problem. No extra server, database or dashboard: self-hosting still needs only Postgres and Redis. It is off until you set one variable.

  1. Get a webhook. In Slack: Apps → Incoming Webhooks → Add to Slack, pick a channel someone actually watches, and copy the URL. Discord and Teams webhooks work too; the hostname decides the format.
  2. Set it and redeploy:
.env.productionConfig
BLARE_SINKS=https://hooks.slack.com/services/T000/B000/xxxx
BLARE_ENV=production
  1. Check it with mendloop doctor. It counts the webhooks and never prints one: alerts ok blare on: errors and failed logs go to 1 chat webhook.
  2. Prove it before you need it: python -m blare --send delivers a test alert.

Several webhooks, comma separated, all get a copy. Each process reports under its own name (mendloop-api, mendloop-ingest, mendloop-worker), so a message says which one failed. Identical errors are grouped and rate-limited, so a crash loop is one message rather than hundreds.

Warning:

A webhook URL is a credential: anyone holding it can post to your channel. Bearer tokens, JWTs, AWS keys and values under keys named like secret, authorization or cookie are replaced before sending, but this is still a path out of your server to a chat service, and error text can contain data no redaction list anticipates. If that isn't acceptable, leave BLARE_SINKS unset.

There is no history, search or UI here. Sentry keeps the record; blare does the interrupting. Run both.

Sentry for Mendloop's own errors#

Set SENTRY_DSN (API and worker) and SENTRY_DSN_WEB (the web app; rebuild after setting it). Events are scrubbed before sending: no users, cookies, request bodies, emails or tokens. Keep SENTRY_TRACES_SAMPLE_RATE low on a small server. The ingest process doesn't report to Sentry, which is why chat alerts help most there.

Uptime#

Point an uptime check at /readyz every minute. It answers 503 when Postgres, Redis, the migrations or storage are not right, so one check covers most of what can go wrong. Add machine alerts for CPU, disk and free memory with your cloud provider's monitoring.

The worker has no health endpoint. Watch the event backlog in Redis: XLEN ml:events and the lag in XINFO GROUPS ml:events should return to near zero after a burst.

The instance overview#

Settings → System health, below the service list, is for Super Admins. Nothing extra is installed: it reads Postgres, Redis and the host.

Section Shows
Organizations Every organization: created, members, live projects and issues, events in the last 7 days, connected integrations. Live mode only.
Postgres Database size, connections against max_connections, cache hit rate (under 99% on a warm server means the working set no longer fits in memory), the largest tables and the slowest statements
Redis Memory against maxmemory, peak memory, key count, and per stream the entries held, the cap, Unread (what the worker hasn't picked up) and In flight
Storage The size of the data directory per entry (the embedding model cache, repository mirrors) and free disk space
Process and host This API process's memory, the load average, cores and host memory
People Accounts, Super Admins, sign-ins in the last 7 days and disabled accounts. No email address appears here.

Unread is the number that climbs when the worker falls behind: a few hundred during a burst is normal, a figure that keeps rising is not.

The report is cached for 60 seconds and shared by every Super Admin looking at it; press Refresh to recompute. Each section degrades on its own and says why when it can't read something.

Slow statements#

They come from the pg_stat_statements extension. The deploy script creates it. Elsewhere, add shared_preload_libraries = 'pg_stat_statements' to postgresql.conf, restart Postgres, then run CREATE EXTENSION pg_stat_statements; in the Mendloop database.

Settings#

Setting Default What it does
MENDLOOP_INSTANCE_OVERVIEW_CACHE_SECONDS 60 How long a report is cached. 0 recomputes on every request.
MENDLOOP_INSTANCE_OVERVIEW_MAX_ORGS 100 How many organizations the table lists, newest first
MENDLOOP_INSTANCE_OVERVIEW_TIMEOUT_SECONDS 3.0 Time limit per statement, and for Redis and the directory walk