Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Add admin API to get some information about federation status #11407

Merged
merged 11 commits into from
Dec 6, 2021
6 changes: 3 additions & 3 deletions docs/usage/administration/admin_api/federation.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,11 +74,11 @@ The following fields are returned in the JSON response body:
Destinations objects contain the following fields:
dklimpel marked this conversation as resolved.
Show resolved Hide resolved
- `destination` - string - Name of the remote server to federate.
- `retry_last_ts` - integer - The last time Synapse tried and failed to reach the
remote server, in ms. This is `0` if no error has occurred.
remote server, in ms. This is `0` if no further retrying occuring.
dklimpel marked this conversation as resolved.
Show resolved Hide resolved
- `retry_interval` - integer - How long since the last time Synapse tried to reach
the remote server before trying again, in ms.
the remote server before trying again, in ms. This is `0` if no further retrying occuring.
- `failure_ts` - integer - The first time Synapse tried and failed to reach the
remote server, in ms. This is `0` if no error has occurred.
remote server, in ms. This is `null` if no error has occurred.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
- `failure_ts` - integer - The first time Synapse tried and failed to reach the
remote server, in ms. This is `0` if no error has occurred.
remote server, in ms. This is `null` if no error has occurred.
- `failure_ts` - optional integer - The first time Synapse tried and failed to reach the
remote server, in ms. This is `null` if communication with the remote server has never failed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actually, maybe it's better to say "nullable integer", because the field will always be present? Or maybe we just say "integer" elsewhere in the docs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the content of the database:

select * from destinations;
 destination | retry_last_ts | retry_interval | failure_ts | last_successful_stream_ordering
-------------+---------------+----------------+------------+---------------------------------
 matrix.org  |             0 |              0 |            |                           29083

The result should be:

      {
         "destination": "matrix.org",
         "retry_last_ts": 0,
         "retry_interval": 0,
         "failure_ts": null,
         "last_successful_stream_ordering": 1234
      }

- `last_successful_stream_ordering` - integer - The stream ordering of the most
dklimpel marked this conversation as resolved.
Show resolved Hide resolved
recent successfully-sent [PDU](Understanding-Synapse-Performance-Issues-Through-Grafana-Graphs.md#federation)
dklimpel marked this conversation as resolved.
Show resolved Hide resolved
to this destination or `null` if this information has not been tracked yet.
dklimpel marked this conversation as resolved.
Show resolved Hide resolved
Expand Down