Reference
Monitoring
What to alert on, and the endpoints that answer.
Endpoints
Section titled “Endpoints”| Path | For |
|---|---|
/health/live | The API process answers, with its version and commit: {"status":"Healthy","version":"1.4.2","commit":"…"}. No authentication |
/health/ready | The API can reach PostgreSQL; 503 when it cannot. The same answer as /health/live. No authentication |
/monitoring/status | A single status with a message and every figure, for a generic check. API key |
/monitoring/prtg/states | The alarms, in PRTG’s sensor format: the overall status and one state per area. API key |
/monitoring/prtg | The figures in PRTG’s sensor format, for graphs, with no limits. API key |
/monitoring/prtg/calendars | The calendars’ figures in PRTG’s sensor format, for graphs, with no limits. API key |
/metrics | The core queue and request counters for Prometheus, the sign-in counters below, and the calendars’. API key |
The monitoring key is separate from any dashboard account and read-only.
The PRTG sensors
Section titled “The PRTG sensors”ContactMesh decides whether something is wrong, knowing each source’s and each publication’s schedule,
and reports it on /monitoring/prtg/states: Overall status and a state for each area — Worker,
Sources, Schedules, Queue, Delivery, Contacts, Decisions, Microsoft 365, Sign-in,
Licence, Calendars and Group upkeep — 0 OK, 1 warning, 2 error, with limits at 0.5 and 1.5 that never
change. That is the sensor to put notifications on. /monitoring/prtg keeps every figure, under the name
it has always had, for graphs; it carries no limits since 1.7.0, so it never alarms.
/monitoring/prtg/calendars does the same for the calendars, on a sensor of its own: the figures sensor
has no room left under PRTG’s fifty channels.
A channel is only ever appended. Calendars status came after Licence status and Group upkeep status after it, and every channel a sensor already had keeps its name and its place.
Late is against its own schedule. A source is late once it is past its own next scheduled read by
more than a grace: one read every four hours is not late three hours after its read. A recipient is late
when a folder of theirs is past its publication’s check budget, not while a change is still on its way,
and not while the read budget has yet to reach its listing: that
is pacing, counted apart as pacedRecipients in /monitoring/status. Held is not late: work quiet
hours, recipients per hour, a write cooldown or Pause all hold back is not counted as due while it is
held. The thresholds are on Settings.
A sensor made before 1.7.0 goes on reporting, with the fixed limits it was created with; re-create it to drop them, and add the states sensor beside it. The upgrade notes have the steps.
What is worth alerting on
Section titled “What is worth alerting on”The worker heartbeat. If nothing is draining the queue, nothing else matters. Warning and error thresholds are on Settings; the defaults are generous enough that a long batch is not an alert.
Dead letters above zero. Work that ran out of attempts will not resolve itself.
Certificate expiry. Warned in days, because the failure mode is a deployment that stops completely on a date nobody wrote down.
Decisions waiting. Adoption conflicts and held deletions are not errors, and they do not clear until somebody looks.
Mailboxes outside the Exchange scope. Its own channel, and not part of the one above, because the
answer is not on any screen here: Exchange refuses the mailbox, delivery to it and the teardown of a
removed recipient’s folder are held rather than dead-lettered, and nothing is released until an
administrator admits the mailbox to the RBAC for Applications scope or the Application Access Policy.
Counted per mailbox, so one excluded person reads 1 however many items were parked for them — and
reads 1 when none were, because a folder that was already converged has nothing queued for the
refusal to hold and only the recipient’s own row records it. Warning above zero and never an error — nothing is being lost while it waits, and there is no fix that has to
happen at three in the morning.
Contacts adoption cannot identify. Cards in a source an active or paused publication reads with no display name, or with no email address and no telephone. They are delivered, but adoption can never claim one, so taking over a folder asks about each in every mailbox. The sensor message names the sources by folder and shared mailbox, and Alerts › System checks links each to the source’s Anomalies tab, where the contacts are listed by name. The channel was called Contacts that cannot sync before: PRTG creates the new one with its limits on the first scan and leaves the old one without data, so set any notifications again on the new channel and delete the old one from the sensor.
Contacts breaking a source rule. Contacts in a source an active or paused publication reads that
break a rule its own operator wrote, at Warning severity — a Hint rule is counted here never.
The channel warns from 25 (Settings › Monitoring, Rule breaks) and is never an error,
because a rule flags and cannot hold anything back: it must never be the reason somebody is paged. For
the same reason it has no vote in Overall status — the channel alarms on its own, and a source
rule can never turn the deployment yellow or red. The count is written by the source-rule-check
schedule and is therefore as old as its last run, which a deployment-wide pause stops with every other
schedule; the source’s own page evaluates live and is always current.
A sign-in attack. More than ten failed sign-ins in five minutes, or any account locked. Four
channels say it: Failed sign-ins 5m warns above 10, Accounts locked now and Cross-site refusals 5m
warn above 0, and Sessions revoked 5m is there to read beside them and never alarms. They are warnings
with no vote in Overall status, which is about the sync, and the sensor message names what is past
its limit. Every one of them is on the audit trail, each refused sign-in
with a hash of the address it came from, so attempts from one place group together. /metrics counts the
same events, by reason, in counters that only climb: contactmesh_sign_ins_failed_total,
contactmesh_account_lockouts_total and the gauge contactmesh_accounts_locked,
contactmesh_cross_site_refusals_total and contactmesh_sessions_revoked_total. With Entra sign-in,
Entra signs people in, and its sign-in log is where to watch for guessing.
Cards that keep changing. The cards a check stopped rewriting because writing them again changes nothing: Exchange stores a field otherwise than it was sent, or something else changes the card back after every write. Both causes on one channel, Cards that keep changing, counted in cards. The folder’s line names each field with the kind of change, such as Personal notes (line breaks); see Keeps changing.
Cards written repeatedly. Any card written more than six times in a day, by whatever wrote it — a check’s repair, a full sync, a picture, a marker stamp, a label refresh, a removal of fields — on Cards written repeatedly. It is the loop nothing has named yet: nothing is held for it, it only says so. A card is counted for a day after its last write past the six; Recipients’ Written repeatedly filter lists the folders holding one. See Cards written repeatedly.
Both warn above 0 and never error, and both count toward a warning in Overall status: neither stops anything else from syncing, and the sensor message says how many of each there are. PRTG creates the two channels with their limits on the first scan after the upgrade to 1.2.1; set notifications on them there.
Drift, by finding. Contacts that differ, Contacts with restricted fields and Contacts removed at source split the drift in Missing or drifted contacts as a folder and the Recipients list name it: cards whose values differ from the source, cards still carrying a field their field set no longer grants, and cards whose contact the source deleted or the publication no longer includes. They have no limits and no vote in Overall status, because the channel they split already warns; they say which of the three it is. PRTG creates them on the first scan after the upgrade to 1.6.0.
The licence. Licence days left counts until the licence takes nothing new — its end, or a subscription’s end of grace; none for a revoked licence — warns at 14 days or fewer and errors at none. Maintenance days left counts to the end of its maintenance and warns at 14 days or fewer, never errors: the release running keeps running past it, and a perpetual licence whose maintenance has ended reads 0 there, and only there. A release built after the maintenance ended stops delivery, which Licence days left reads as 0, an error. Licensed recipients used is the share of the licence’s recipients in use, in per cent, and warns from 90; Licensed phones used is the same for its phones, 0 where it names no limit, and beyond 100 no phone enrols. Each counts toward a warning in Overall status, never an error: a licence that has run out or is over its limit refuses only what is new, and everything already delivered keeps syncing. A server clock more than a day behind a time the installation has seen counts toward a warning too, with no channel of its own; the message says so. See Licence.
A pause left in force. Pausing the whole deployment is a warning, not an error, and it says so in the sensor message. What the pause holds back — source reads, claimed work, scheduled rounds — is not judged late while it holds, so a pause forgotten after its incident stays a warning on Worker status for as long as it lasts. After it, a source’s lateness is measured from the moment it was lifted, where that is later than its last read, so a source read every four hours is not late until four hours after the pause, whose schedule reads it before then. Resume it with Resume all, in the header of Queue.
The calendars. Calendars status judges the calendar queue’s dead letters (an error), its depth
and how long its oldest work has been due (the queue’s thresholds), calendars whose work stopped (an
error) or whose name another calendar of the recipient’s holds (a warning), calendars past their
publication’s check budget (the completion bands), events missing or drifted with nothing in hand, and
failing calendar sources. Held is not late here either, and through Pause all nothing is. Without
the Calendars module the area reads 0, and the bell has no calendar items. A mailbox Exchange refuses
for calendars counts once on Mailboxes outside the Exchange scope. /metrics carries
contactmesh_calendar_queue_depth, contactmesh_calendar_dead_letters and contactmesh_calendars{state}.
The calendars sensor’s tenth channel, Recipient appointments, counts the appointments recipients put in our
calendars themselves; nothing judges it, and the bell raises it once per publication
(Recipients’ own appointments).
The group upkeep. Group upkeep status warns when an organisation’s
group upkeep stopped, or when it holds removals for a
yes; the sensor message says how many. A group out of step under plan mode or kept by the script is not
judged. Without upkeep the area reads 0.
Waiting on adoption is not one of them. Work for a folder nothing has adjudicated yet sits in its own channel with no limit at all. No create may run into a folder that already held contacts ContactMesh did not write, so that work is not claimed — it is out of Active queue and out of Oldest work age, which is why the sensor can read a shallow queue and no age while thousands of items wait. The gate is armed by the product and opened by the product, usually within minutes, and there is nothing on any screen here that hurries it. A gate that never opens is a worker or a schedule that has stopped, which those channels say.
Nor is work a pause holds. Pausing or archiving a publication pauses its folders, and what they had queued waits for the resume. It stays in Active queue and out of Oldest work age, as work a switched-off source list holds does, and the sensor message says how many queued items a pause holds. Oldest waiting on Queue reads the same age and says the same count.
What is not worth alerting on
Section titled “What is not worth alerting on”Queue depth. A deep queue during a rollout is the product working. Depth with no throughput is the condition worth catching, and the throughput figure is what says so.
A single throttle. The governor halves its concurrency, waits out the Retry-After, and recovers. An alert on every 429 is an alert that gets muted.
The API and the worker write their log to standard output, one JSON object per line, and keep their warnings and errors in the database as well. Nothing writes a log file of its own.
Standard output
Section titled “Standard output”| Field | Holds |
|---|---|
Timestamp | When, in UTC to the millisecond: 2026-10-07T08:15:02.481Z |
LogLevel | Information, Warning, Error or Critical |
Category | What wrote it, such as ContactMesh.Worker.Capacity.RetentionWorker |
EventId | The kind of entry, the same number every time it happens and from one release to the next: the 1000s are the API’s, 2000s sign-in, 3000s the worker’s passes, 4000s sync, 5000s sources, 6000s infrastructure, 7000s Graph, 8000s the audit trail, 9000s telemetry |
Message | The entry as a sentence |
State | The message template, and each of its values as a field of its own |
Exception | The exception and its stack trace, on the same line |
Scopes | Inside an API request or a worker’s round, its TraceId and SpanId; for an API request also its path and its CorrelationId |
compose.yaml sets ASP.NET Core’s request lines, the HTTP client’s Graph lines and EF Core’s SQL to
Warning; ContactMesh’s own lines log from Information. Docker keeps five files of 10 MB for each
container, and that is all there is: the log stays on the host, and the API cannot read the worker’s.
The log holds what ContactMesh wrote, which can name a mailbox — an exception’s own message. A line
about a mailbox names it by a short tag (mbx- and eight characters) rather than its address. It is the
installation’s own record, and nothing sends it anywhere.
Finding one request’s lines. Take the correlation ID from its audit entry
and search for it as TraceId, or as CorrelationId when the caller sent its own. A Run now round
in the worker carries the trace of the request that started it. An audit entry that could not be
written is an Error with event 8001, worth an alert.
Every audit entry is a line too, event 8005 at Information, once it is saved: what was done, to
what, how it was answered, the organisation, the correlation ID, and for a sign-in why it was refused
and the hash of its client. The entry names who acted; the line does not. A person is a tag there —
actor- and eight characters, the same for every line of theirs — and the correlation ID finds the entry
that names them. system, anonymous and the other actors that are the product’s own are written as
they are. A log stack that keeps these lines has a copy of the trail outside the database.
With a log stack of your own, collect standard output; every entry parses as it is.
- An agent on the host — Fluent Bit, Vector, Promtail, the Elastic agent — reading the containers’
json-filelogs. Docker wraps each line in an object of its own, so the entry is the JSON in that object’slogfield. - Or a Docker logging driver for both services, set in a Compose override in place of the
json-filedrivercompose.yamlsets:gelf,fluentd,syslogorjournald.
Logging__Console__FormatterName: simple on both services gives plain text instead, for a deployment
that reads its log by eye and ships it nowhere.
Recent problems
Section titled “Recent problems”Every Warning, Error and Critical entry of both processes is also kept in the database. An Admin
reads it on Help & support, and the diagnostics bundle carries the last
seven days of it.
| Kept | When, which process — the API, or a worker by its id — the level, the category, the event, the message template and its values, for an exception its type and the code ContactMesh files it under, and the trace ID of the request or round it was logged in |
| Never kept | An exception’s own message, which is where Microsoft Graph repeats a mailbox address. A mail address, user principal name or telephone number in a value is replaced before anything is written |
| How long | 14 days, set on Settings under Retention, and never more than the newest 10’000 |
| How many | At most 20 of one kind in ten minutes from one process. The rest are counted, and a row of its own says how many were left out |
It costs the code that logs nothing: entries are written in batches, away from the request or the work
item that logged them, and a database that does not answer loses entries rather than holding anything
up. Logging__ProblemLog__LogLevel__Default: Error keeps errors only, and None switches it off.
OpenTelemetry
Section titled “OpenTelemetry”ContactMesh exports no traces, metrics or logs over OpenTelemetry. It is planned, and off unless an OTLP
endpoint is configured; until then, collect standard output as above, and read the figures from
/metrics or the PRTG sensor. The trace IDs are there already: in every line’s scopes, on every recent
problem and as the correlation ID of every audit entry, so one ID finds all three.