# Diagnostics

Check that an installation works, see what failed recently and share a safe report.

URL: /docs/diagnostics

Diagnostics are available from `0.1.0-alpha.10`, for installation administrators.

When something does not work, open **Settings**, then **Diagnostics** under
**Installation**. You need no access to the server or its logs.

## Run the checks [#run-the-checks]

**Run checks** tests, in about twenty seconds at most:

| Check                         | What it does                                                                                             |
| ----------------------------- | -------------------------------------------------------------------------------------------------------- |
| Database                      | Runs a query and reports the database kind and its answer time                                           |
| Scheduler and background work | Confirms that scheduling, media maintenance and notifications are running                                |
| Assistant                     | Reports whether conversations can run, which server hosts them and the last known runtime or relay error |
| Recovery hold                 | Says whether a restore left delivery on hold                                                             |
| Media storage                 | Writes a small test file, reads it back and deletes it                                                   |
| E-mail server                 | Connects to the SMTP server and checks that it answers. No e-mail is sent                                |
| Single sign-on provider       | Reads the provider's OpenID configuration                                                                |
| Platforms                     | Resolves and opens a secure connection to each platform you use. No request is made with your accounts   |
| Server clock                  | Compares the server clock with PostgreSQL (not used with SQLite)                                         |
| Free disk space               | Warns under 1 GB where SQLite and local media live                                                       |
| OpenTelemetry export          | Says whether traces and logs are sent to a collector, and where (not in the shared report)               |

Checks that do not apply, for example e-mail when it is off, show **Not used**.
Failures come first, each with a short explanation.

## Recent problems [#recent-problems]

The page lists failures from the last 14 days, newest first: publications that
failed or need review, webhooks paused after failed deliveries, e-mails that could not
be sent, media that could not be processed, background errors, the sign-in provider
failing, and requests that failed on the server. Each entry has a short code and,
when it concerns a publication or a webhook, a link to it. Postdot keeps the last 500.

When Studio shows "Postdot hit an error on its side" with a code, the same failure
appears here.

## Share a report [#share-a-report]

**Prepare report** runs the checks and shows a text report: version and image digest,
what is configured (database, storage, e-mail, sign-in, platforms with an application),
the check results, recent problems and counts. It contains no password, key, e-mail
address, project name, identifier or post content.
The live Assistant check can show a remote leader's internal address to administrators.
The report says whether the host is local, remote or unknown.

Read it, then **Copy** or **Download** it and attach it to a
[bug report](https://github.com/postdot/postdot/issues) or send it to whoever helps
you. Postdot sends it nowhere.

## From scripts and agents [#from-scripts-and-agents]

The same data is available to API keys with the `instance:admin` capability:

- `POST /api/diagnostics/checks`, `GET /api/diagnostics/problems`,
  `GET /api/diagnostics/report` (plain text);
- the MCP tools `run_diagnostic_checks`, `list_diagnostic_problems` and
  `get_diagnostics_report`;
- the CLI: `postdot diagnostics checks`, `postdot diagnostics problems` and
  `postdot diagnostics report --output report.txt`.

For your own monitoring tools, see [Metrics](/docs/metrics/) and
[Traces and logs (OpenTelemetry)](/docs/opentelemetry/).
