2020-10-26 21:08:22 +00:00
---
2020-11-17 15:09:28 +00:00
stage: Enablement
group: Geo
2020-11-26 06:09:20 +00:00
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/engineering/ux/technical-writing/#assignments
2020-10-26 21:08:22 +00:00
---
2021-01-28 12:09:54 +00:00
# Geo Nodes API **(PREMIUM SELF)**
2019-05-18 21:27:41 +00:00
2021-12-03 00:11:20 +00:00
To interact with Geo node endpoints, you must authenticate yourself as an
2021-02-16 00:09:01 +00:00
administrator.
2019-05-18 21:27:41 +00:00
2020-01-14 21:07:45 +00:00
## Create a new Geo node
Creates a new Geo node.
2020-02-27 09:09:01 +00:00
```plaintext
2020-01-14 21:07:45 +00:00
POST /geo_nodes
```
2020-01-30 15:09:15 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://primary.example.com/api/v4/geo_nodes" \
2020-01-16 06:08:30 +00:00
--request POST \
-d "name=himynameissomething" \
-d "url=https://another-node.example.com/"
```
2020-01-14 21:07:45 +00:00
| Attribute | Type | Required | Description |
| ----------------------------| ------- | -------- | -----------------------------------------------------------------|
2021-12-03 00:11:20 +00:00
| `primary` | boolean | no | Specifying whether this node should be primary. Defaults to false. |
2020-01-14 21:07:45 +00:00
| `enabled` | boolean | no | Flag indicating if the Geo node is enabled. Defaults to true. |
| `name` | string | yes | The unique identifier for the Geo node. Must match `geo_node_name` if it is set in `gitlab.rb` , otherwise it must match `external_url` |
| `url` | string | yes | The user-facing URL for the Geo node. |
| `internal_url` | string | no | The URL defined on the primary node that secondary nodes should use to contact it. Returns `url` if not set. |
| `files_max_capacity` | integer | no | Control the maximum concurrency of LFS/attachment backfill for this secondary node. Defaults to 10. |
| `repos_max_capacity` | integer | no | Control the maximum concurrency of repository backfill for this secondary node. Defaults to 25. |
| `verification_max_capacity` | integer | no | Control the maximum concurrency of repository verification for this node. Defaults to 100. |
| `container_repositories_max_capacity` | integer | no | Control the maximum concurrency of container repository sync for this node. Defaults to 10. |
2021-12-03 00:11:20 +00:00
| `sync_object_storage` | boolean | no | Flag indicating if the secondary Geo node should replicate blobs in Object Storage. Defaults to false. |
2020-01-27 21:08:47 +00:00
| `selective_sync_type` | string | no | Limit syncing to only specific groups or shards. Valid values: `"namespaces"` , `"shards"` , or `null` . |
| `selective_sync_shards` | array | no | The repository storage for the projects synced if `selective_sync_type` == `shards` . |
| `selective_sync_namespace_ids` | array | no | The IDs of groups that should be synced, if `selective_sync_type` == `namespaces` . |
2021-12-03 00:11:20 +00:00
| `minimum_reverification_interval` | integer | no | The interval (in days) in which the repository verification is valid. Once expired, it is reverified. This has no effect when set on a secondary node. |
2020-01-14 21:07:45 +00:00
Example response:
```json
{
"id": 3,
"name": "Test Node 1",
"url": "https://secondary.example.com/",
"internal_url": "https://secondary.example.com/",
"primary": false,
"enabled": true,
"current": false,
"files_max_capacity": 10,
"repos_max_capacity": 25,
"verification_max_capacity": 100,
2020-01-27 21:08:47 +00:00
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
2020-01-14 21:07:45 +00:00
"container_repositories_max_capacity": 10,
"sync_object_storage": false,
"clone_protocol": "http",
"web_edit_url": "https://primary.example.com/admin/geo/nodes/3/edit",
"web_geo_projects_url": "http://secondary.example.com/admin/geo/projects",
"_links": {
"self": "https://primary.example.com/api/v4/geo_nodes/3",
"status": "https://primary.example.com/api/v4/geo_nodes/3/status",
"repair": "https://primary.example.com/api/v4/geo_nodes/3/repair"
}
}
```
2019-05-18 21:27:41 +00:00
## Retrieve configuration about all Geo nodes
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
GET /geo_nodes
```
2020-01-30 15:09:15 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://primary.example.com/api/v4/geo_nodes"
2019-05-18 21:27:41 +00:00
```
Example response:
```json
[
{
"id": 1,
"name": "us-node",
"url": "https://primary.example.com/",
"internal_url": "https://internal.example.com/",
"primary": true,
"enabled": true,
"current": true,
"files_max_capacity": 10,
"repos_max_capacity": 25,
2019-08-07 11:46:24 +00:00
"container_repositories_max_capacity": 10,
2019-05-18 21:27:41 +00:00
"verification_max_capacity": 100,
2020-01-23 18:08:53 +00:00
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
2019-08-12 22:35:29 +00:00
"clone_protocol": "http",
"web_edit_url": "https://primary.example.com/admin/geo/nodes/1/edit",
"_links": {
"self": "https://primary.example.com/api/v4/geo_nodes/1",
"status":"https://primary.example.com/api/v4/geo_nodes/1/status",
"repair":"https://primary.example.com/api/v4/geo_nodes/1/repair"
}
2019-05-18 21:27:41 +00:00
},
{
"id": 2,
"name": "cn-node",
"url": "https://secondary.example.com/",
"internal_url": "https://secondary.example.com/",
"primary": false,
"enabled": true,
"current": false,
"files_max_capacity": 10,
"repos_max_capacity": 25,
2019-08-07 11:46:24 +00:00
"container_repositories_max_capacity": 10,
2019-05-18 21:27:41 +00:00
"verification_max_capacity": 100,
2020-01-23 18:08:53 +00:00
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
2019-08-12 22:35:29 +00:00
"sync_object_storage": true,
"clone_protocol": "http",
"web_edit_url": "https://primary.example.com/admin/geo/nodes/2/edit",
"web_geo_projects_url": "https://secondary.example.com/admin/geo/projects",
"_links": {
"self":"https://primary.example.com/api/v4/geo_nodes/2",
"status":"https://primary.example.com/api/v4/geo_nodes/2/status",
"repair":"https://primary.example.com/api/v4/geo_nodes/2/repair"
}
2019-05-18 21:27:41 +00:00
}
]
```
## Retrieve configuration about a specific Geo node
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
GET /geo_nodes/:id
```
2020-01-30 15:09:15 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://primary.example.com/api/v4/geo_nodes/1"
2019-05-18 21:27:41 +00:00
```
Example response:
```json
{
"id": 1,
"name": "us-node",
"url": "https://primary.example.com/",
"internal_url": "https://primary.example.com/",
"primary": true,
"enabled": true,
"current": true,
"files_max_capacity": 10,
"repos_max_capacity": 25,
2019-08-07 11:46:24 +00:00
"container_repositories_max_capacity": 10,
2019-05-18 21:27:41 +00:00
"verification_max_capacity": 100,
2020-01-23 18:08:53 +00:00
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
2019-08-12 22:35:29 +00:00
"clone_protocol": "http",
"web_edit_url": "https://primary.example.com/admin/geo/nodes/1/edit",
"_links": {
"self": "https://primary.example.com/api/v4/geo_nodes/1",
"status":"https://primary.example.com/api/v4/geo_nodes/1/status",
"repair":"https://primary.example.com/api/v4/geo_nodes/1/repair"
}
2019-05-18 21:27:41 +00:00
}
```
## Edit a Geo node
Updates settings of an existing Geo node.
_This can only be run against a primary Geo node._
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
PUT /geo_nodes/:id
```
2019-08-12 22:35:29 +00:00
| Attribute | Type | Required | Description |
|-----------------------------|---------|-----------|---------------------------------------------------------------------------|
| `id` | integer | yes | The ID of the Geo node. |
| `enabled` | boolean | no | Flag indicating if the Geo node is enabled. |
2019-08-23 08:50:24 +00:00
| `name` | string | yes | The unique identifier for the Geo node. Must match `geo_node_name` if it is set in `gitlab.rb` , otherwise it must match `external_url` . |
2019-08-12 22:35:29 +00:00
| `url` | string | yes | The user-facing URL of the Geo node. |
| `internal_url` | string | no | The URL defined on the primary node that secondary nodes should use to contact it. Returns `url` if not set.|
| `files_max_capacity` | integer | no | Control the maximum concurrency of LFS/attachment backfill for this secondary node. |
| `repos_max_capacity` | integer | no | Control the maximum concurrency of repository backfill for this secondary node. |
| `verification_max_capacity` | integer | no | Control the maximum concurrency of verification for this node. |
2019-08-07 11:46:24 +00:00
| `container_repositories_max_capacity` | integer | no | Control the maximum concurrency of container repository sync for this node. |
2021-12-03 00:11:20 +00:00
| `sync_object_storage` | boolean | no | Flag indicating if the secondary Geo node should replicate blobs in Object Storage. |
2020-01-23 18:08:53 +00:00
| `selective_sync_type` | string | no | Limit syncing to only specific groups or shards. Valid values: `"namespaces"` , `"shards"` , or `null` . |
| `selective_sync_shards` | array | no | The repository storage for the projects synced if `selective_sync_type` == `shards` . |
| `selective_sync_namespace_ids` | array | no | The IDs of groups that should be synced, if `selective_sync_type` == `namespaces` . |
2021-12-03 00:11:20 +00:00
| `minimum_reverification_interval` | integer | no | The interval (in days) in which the repository verification is valid. Once expired, it is reverified. This has no effect when set on a secondary node. |
2019-05-18 21:27:41 +00:00
Example response:
```json
{
"id": 1,
"name": "cn-node",
"url": "https://secondary.example.com/",
"internal_url": "https://secondary.example.com/",
"primary": false,
"enabled": true,
"current": true,
"files_max_capacity": 10,
"repos_max_capacity": 25,
2019-08-07 11:46:24 +00:00
"container_repositories_max_capacity": 10,
2019-05-18 21:27:41 +00:00
"verification_max_capacity": 100,
2020-01-23 18:08:53 +00:00
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
2019-08-12 22:35:29 +00:00
"sync_object_storage": true,
"clone_protocol": "http",
"web_edit_url": "https://primary.example.com/admin/geo/nodes/2/edit",
"web_geo_projects_url": "https://secondary.example.com/admin/geo/projects",
"_links": {
"self":"https://primary.example.com/api/v4/geo_nodes/2",
"status":"https://primary.example.com/api/v4/geo_nodes/2/status",
"repair":"https://primary.example.com/api/v4/geo_nodes/2/repair"
}
2019-05-18 21:27:41 +00:00
}
```
## Delete a Geo node
Removes the Geo node.
2020-12-04 21:09:29 +00:00
NOTE:
2021-12-03 00:11:20 +00:00
Only a Geo primary node accepts this request.
2019-05-18 21:27:41 +00:00
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
DELETE /geo_nodes/:id
```
| Attribute | Type | Required | Description |
|-----------|---------|----------|-------------------------|
| `id` | integer | yes | The ID of the Geo node. |
## Repair a Geo node
To repair the OAuth authentication of a Geo node.
_This can only be run against a primary Geo node._
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
POST /geo_nodes/:id/repair
```
Example response:
```json
{
"id": 1,
"name": "us-node",
"url": "https://primary.example.com/",
"internal_url": "https://primary.example.com/",
"primary": true,
"enabled": true,
"current": true,
"files_max_capacity": 10,
"repos_max_capacity": 25,
2019-08-07 11:46:24 +00:00
"container_repositories_max_capacity": 10,
2019-05-18 21:27:41 +00:00
"verification_max_capacity": 100,
2019-08-12 22:35:29 +00:00
"clone_protocol": "http",
"web_edit_url": "https://primary.example.com/admin/geo/nodes/1/edit",
"_links": {
"self": "https://primary.example.com/api/v4/geo_nodes/1",
"status":"https://primary.example.com/api/v4/geo_nodes/1/status",
"repair":"https://primary.example.com/api/v4/geo_nodes/1/repair"
}
2019-05-18 21:27:41 +00:00
}
```
## Retrieve status about all Geo nodes
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
GET /geo_nodes/status
```
2020-01-30 15:09:15 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://primary.example.com/api/v4/geo_nodes/status"
2019-05-18 21:27:41 +00:00
```
Example response:
```json
[
{
"geo_node_id": 1,
"healthy": true,
"health": "Healthy",
"health_status": "Healthy",
"missing_oauth_application": false,
2021-02-01 18:09:17 +00:00
"db_replication_lag_seconds": null,
2021-12-10 18:14:42 +00:00
"lfs_objects_count": 5,
"lfs_objects_checksum_total_count": 5,
"lfs_objects_checksummed_count": 5,
"lfs_objects_checksum_failed_count": 0,
2021-02-01 18:09:17 +00:00
"lfs_objects_synced_count": null,
"lfs_objects_failed_count": null,
2021-12-10 18:14:42 +00:00
"lfs_objects_registry_count": null,
"lfs_objects_verification_total_count": null,
"lfs_objects_verified_count": null,
"lfs_objects_verification_failed_count": null,
2019-05-18 21:27:41 +00:00
"lfs_objects_synced_in_percentage": "0.00%",
2021-12-10 18:14:42 +00:00
"lfs_objects_verified_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
"job_artifacts_count": 2,
2021-02-01 18:09:17 +00:00
"job_artifacts_synced_count": null,
"job_artifacts_failed_count": null,
2019-05-18 21:27:41 +00:00
"job_artifacts_synced_missing_on_primary_count": 0,
"job_artifacts_synced_in_percentage": "0.00%",
2019-08-02 08:35:29 +00:00
"container_repositories_count": 3,
2021-02-01 18:09:17 +00:00
"container_repositories_synced_count": null,
"container_repositories_failed_count": null,
2019-08-02 08:35:29 +00:00
"container_repositories_synced_in_percentage": "0.00%",
2019-10-23 18:06:07 +00:00
"design_repositories_count": 3,
2021-02-01 18:09:17 +00:00
"design_repositories_synced_count": null,
"design_repositories_failed_count": null,
2019-10-23 18:06:07 +00:00
"design_repositories_synced_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
"projects_count": 41,
2020-08-03 12:09:47 +00:00
"repositories_count": 41,
2021-02-01 18:09:17 +00:00
"repositories_failed_count": null,
"repositories_synced_count": null,
2019-05-18 21:27:41 +00:00
"repositories_synced_in_percentage": "0.00%",
2020-08-03 12:09:47 +00:00
"wikis_count": 41,
2021-02-01 18:09:17 +00:00
"wikis_failed_count": null,
"wikis_synced_count": null,
2019-05-18 21:27:41 +00:00
"wikis_synced_in_percentage": "0.00%",
"replication_slots_count": 1,
"replication_slots_used_count": 1,
"replication_slots_used_in_percentage": "100.00%",
"replication_slots_max_retained_wal_bytes": 0,
"repositories_checked_count": 20,
"repositories_checked_failed_count": 20,
"repositories_checked_in_percentage": "100.00%",
"repositories_checksummed_count": 20,
"repositories_checksum_failed_count": 5,
"repositories_checksummed_in_percentage": "48.78%",
"wikis_checksummed_count": 10,
"wikis_checksum_failed_count": 3,
"wikis_checksummed_in_percentage": "24.39%",
"repositories_verified_count": 20,
"repositories_verification_failed_count": 5,
"repositories_verified_in_percentage": "48.78%",
"repositories_checksum_mismatch_count": 3,
"wikis_verified_count": 10,
"wikis_verification_failed_count": 3,
"wikis_verified_in_percentage": "24.39%",
"wikis_checksum_mismatch_count": 1,
"repositories_retrying_verification_count": 1,
"wikis_retrying_verification_count": 3,
"last_event_id": 23,
"last_event_timestamp": 1509681166,
2021-02-01 18:09:17 +00:00
"cursor_last_event_id": null,
2019-05-18 21:27:41 +00:00
"cursor_last_event_timestamp": 0,
"last_successful_status_check_timestamp": 1510125024,
"version": "10.3.0",
"revision": "33d33a096a",
2021-03-30 00:09:26 +00:00
"merge_request_diffs_count": 5,
"merge_request_diffs_checksum_total_count": 5,
"merge_request_diffs_checksummed_count": 5,
"merge_request_diffs_checksum_failed_count": 0,
"merge_request_diffs_synced_count": null,
"merge_request_diffs_failed_count": null,
"merge_request_diffs_registry_count": null,
"merge_request_diffs_verification_total_count": null,
"merge_request_diffs_verified_count": null,
"merge_request_diffs_verification_failed_count": null,
"merge_request_diffs_synced_in_percentage": "0.00%",
"merge_request_diffs_verified_in_percentage": "0.00%",
"package_files_count": 5,
"package_files_checksum_total_count": 5,
"package_files_checksummed_count": 5,
2020-06-04 18:08:32 +00:00
"package_files_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"package_files_synced_count": null,
"package_files_failed_count": null,
"package_files_registry_count": null,
"package_files_verification_total_count": null,
"package_files_verified_count": null,
"package_files_verification_failed_count": null,
"package_files_synced_in_percentage": "0.00%",
"package_files_verified_in_percentage": "0.00%",
2021-08-31 18:10:24 +00:00
"pages_deployments_count": 5,
"pages_deployments_checksum_total_count": 5,
"pages_deployments_checksummed_count": 5,
"pages_deployments_checksum_failed_count": 0,
"pages_deployments_synced_count": null,
"pages_deployments_failed_count": null,
"pages_deployments_registry_count": null,
"pages_deployments_verification_total_count": null,
"pages_deployments_verified_count": null,
"pages_deployments_verification_failed_count": null,
"pages_deployments_synced_in_percentage": "0.00%",
"pages_deployments_verified_in_percentage": "0.00%",
2021-03-30 00:09:26 +00:00
"terraform_state_versions_count": 5,
"terraform_state_versions_checksum_total_count": 5,
"terraform_state_versions_checksummed_count": 5,
"terraform_state_versions_checksum_failed_count": 0,
"terraform_state_versions_synced_count": null,
"terraform_state_versions_failed_count": null,
"terraform_state_versions_registry_count": null,
"terraform_state_versions_verification_total_count": null,
"terraform_state_versions_verified_count": null,
"terraform_state_versions_verification_failed_count": null,
"terraform_state_versions_synced_in_percentage": "0.00%",
"terraform_state_versions_verified_in_percentage": "0.00%",
"snippet_repositories_count": 5,
"snippet_repositories_checksum_total_count": 5,
"snippet_repositories_checksummed_count": 5,
2020-09-11 21:08:44 +00:00
"snippet_repositories_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"snippet_repositories_synced_count": null,
"snippet_repositories_failed_count": null,
"snippet_repositories_registry_count": null,
"snippet_repositories_verification_total_count": null,
"snippet_repositories_verified_count": null,
"snippet_repositories_verification_failed_count": null,
"snippet_repositories_synced_in_percentage": "0.00%",
"snippet_repositories_verified_in_percentage": "0.00%",
"group_wiki_repositories_count": 5,
"group_wiki_repositories_checksum_total_count": 5,
"group_wiki_repositories_checksummed_count": 5,
2021-03-08 21:09:45 +00:00
"group_wiki_repositories_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"group_wiki_repositories_synced_count": null,
"group_wiki_repositories_failed_count": null,
"group_wiki_repositories_registry_count": null,
"group_wiki_repositories_verification_total_count": null,
"group_wiki_repositories_verified_count": null,
"group_wiki_repositories_verification_failed_count": null,
"group_wiki_repositories_synced_in_percentage": "0.00%",
"group_wiki_repositories_verified_in_percentage": "0.00%",
2021-04-01 18:13:56 +00:00
"pipeline_artifacts_count": 5,
"pipeline_artifacts_checksum_total_count": 5,
"pipeline_artifacts_checksummed_count": 5,
"pipeline_artifacts_checksum_failed_count": 0,
"pipeline_artifacts_synced_count": null,
"pipeline_artifacts_failed_count": null,
"pipeline_artifacts_registry_count": null,
"pipeline_artifacts_verification_total_count": null,
"pipeline_artifacts_verified_count": null,
"pipeline_artifacts_verification_failed_count": null,
"pipeline_artifacts_synced_in_percentage": "0.00%",
"pipeline_artifacts_verified_in_percentage": "0.00%",
2021-09-17 21:09:17 +00:00
"uploads_count": 5,
"uploads_synced_count": null,
"uploads_failed_count": 0,
"uploads_registry_count": null,
"uploads_synced_in_percentage": "0.00%",
2021-12-07 00:14:07 +00:00
"uploads_checksum_total_count": 5,
"uploads_checksummed_count": 5,
"uploads_checksum_failed_count": null,
"uploads_verification_total_count": null,
"uploads_verified_count": null,
"uploads_verification_failed_count": null,
"uploads_verified_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
},
{
"geo_node_id": 2,
"healthy": true,
"health": "Healthy",
"health_status": "Healthy",
"missing_oauth_application": false,
"db_replication_lag_seconds": 0,
2021-12-10 18:14:42 +00:00
"lfs_objects_count": 5,
"lfs_objects_checksum_total_count": 5,
"lfs_objects_checksummed_count": 5,
"lfs_objects_checksum_failed_count": 0,
"lfs_objects_synced_count": null,
"lfs_objects_failed_count": null,
"lfs_objects_registry_count": null,
"lfs_objects_verification_total_count": null,
"lfs_objects_verified_count": null,
"lfs_objects_verification_failed_count": null,
2019-05-18 21:27:41 +00:00
"lfs_objects_synced_in_percentage": "0.00%",
2021-12-10 18:14:42 +00:00
"lfs_objects_verified_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
"job_artifacts_count": 2,
"job_artifacts_synced_count": 1,
"job_artifacts_failed_count": 1,
"job_artifacts_synced_missing_on_primary_count": 0,
"job_artifacts_synced_in_percentage": "50.00%",
2019-08-02 08:35:29 +00:00
"container_repositories_count": 3,
2021-02-01 18:09:17 +00:00
"container_repositories_synced_count": null,
"container_repositories_failed_count": null,
2019-08-02 08:35:29 +00:00
"container_repositories_synced_in_percentage": "0.00%",
2019-10-23 18:06:07 +00:00
"design_repositories_count": 3,
2021-02-01 18:09:17 +00:00
"design_repositories_synced_count": null,
"design_repositories_failed_count": null,
2019-10-23 18:06:07 +00:00
"design_repositories_synced_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
"projects_count": 41,
2020-08-03 12:09:47 +00:00
"repositories_count": 41,
2019-05-18 21:27:41 +00:00
"repositories_failed_count": 1,
"repositories_synced_count": 40,
"repositories_synced_in_percentage": "97.56%",
2020-08-03 12:09:47 +00:00
"wikis_count": 41,
2019-05-18 21:27:41 +00:00
"wikis_failed_count": 0,
"wikis_synced_count": 41,
"wikis_synced_in_percentage": "100.00%",
2021-02-01 18:09:17 +00:00
"replication_slots_count": null,
"replication_slots_used_count": null,
2019-05-18 21:27:41 +00:00
"replication_slots_used_in_percentage": "0.00%",
2021-02-01 18:09:17 +00:00
"replication_slots_max_retained_wal_bytes": null,
2019-05-18 21:27:41 +00:00
"repositories_checksummed_count": 20,
"repositories_checksum_failed_count": 5,
"repositories_checksummed_in_percentage": "48.78%",
"wikis_checksummed_count": 10,
"wikis_checksum_failed_count": 3,
"wikis_checksummed_in_percentage": "24.39%",
"repositories_verified_count": 20,
"repositories_verification_failed_count": 5,
"repositories_verified_in_percentage": "48.78%",
"repositories_checksum_mismatch_count": 3,
"wikis_verified_count": 10,
"wikis_verification_failed_count": 3,
"wikis_verified_in_percentage": "24.39%",
"wikis_checksum_mismatch_count": 1,
"repositories_retrying_verification_count": 4,
"wikis_retrying_verification_count": 2,
"repositories_checked_count": 5,
"repositories_checked_failed_count": 1,
"repositories_checked_in_percentage": "12.20%",
"last_event_id": 23,
"last_event_timestamp": 1509681166,
"cursor_last_event_id": 23,
"cursor_last_event_timestamp": 1509681166,
"last_successful_status_check_timestamp": 1510125024,
"version": "10.3.0",
2020-04-22 03:09:19 +00:00
"revision": "33d33a096a",
2021-03-30 00:09:26 +00:00
"merge_request_diffs_count": 5,
"merge_request_diffs_checksum_total_count": 5,
"merge_request_diffs_checksummed_count": 5,
2020-09-09 18:08:48 +00:00
"merge_request_diffs_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"merge_request_diffs_synced_count": 5,
"merge_request_diffs_failed_count": 0,
"merge_request_diffs_registry_count": 5,
"merge_request_diffs_verification_total_count": 5,
"merge_request_diffs_verified_count": 5,
"merge_request_diffs_verification_failed_count": 0,
"merge_request_diffs_synced_in_percentage": "100.00%",
"merge_request_diffs_verified_in_percentage": "100.00%",
"package_files_count": 5,
"package_files_checksum_total_count": 5,
"package_files_checksummed_count": 5,
2020-06-04 18:08:32 +00:00
"package_files_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"package_files_synced_count": 5,
"package_files_failed_count": 0,
"package_files_registry_count": 5,
"package_files_verification_total_count": 5,
"package_files_verified_count": 5,
"package_files_verification_failed_count": 0,
"package_files_synced_in_percentage": "100.00%",
"package_files_verified_in_percentage": "100.00%",
"terraform_state_versions_count": 5,
"terraform_state_versions_checksum_total_count": 5,
"terraform_state_versions_checksummed_count": 5,
2020-09-25 03:09:30 +00:00
"terraform_state_versions_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"terraform_state_versions_synced_count": 5,
"terraform_state_versions_failed_count": 0,
"terraform_state_versions_registry_count": 5,
"terraform_state_versions_verification_total_count": 5,
"terraform_state_versions_verified_count": 5,
"terraform_state_versions_verification_failed_count": 0,
"terraform_state_versions_synced_in_percentage": "100.00%",
"terraform_state_versions_verified_in_percentage": "100.00%",
"snippet_repositories_count": 5,
"snippet_repositories_checksum_total_count": 5,
"snippet_repositories_checksummed_count": 5,
2020-09-11 21:08:44 +00:00
"snippet_repositories_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"snippet_repositories_synced_count": 5,
"snippet_repositories_failed_count": 0,
"snippet_repositories_registry_count": 5,
"snippet_repositories_verification_total_count": 5,
"snippet_repositories_verified_count": 5,
"snippet_repositories_verification_failed_count": 0,
"snippet_repositories_synced_in_percentage": "100.00%",
"snippet_repositories_verified_in_percentage": "100.00%",
"group_wiki_repositories_count": 5,
"group_wiki_repositories_checksum_total_count": 5,
"group_wiki_repositories_checksummed_count": 5,
2021-03-08 21:09:45 +00:00
"group_wiki_repositories_checksum_failed_count": 0,
2021-03-30 00:09:26 +00:00
"group_wiki_repositories_synced_count": 5,
"group_wiki_repositories_failed_count": 0,
"group_wiki_repositories_registry_count": 5,
"group_wiki_repositories_verification_total_count": 5,
"group_wiki_repositories_verified_count": 5,
"group_wiki_repositories_verification_failed_count": 0,
"group_wiki_repositories_synced_in_percentage": "100.00%",
"group_wiki_repositories_verified_in_percentage": "100.00%",
2021-04-01 18:13:56 +00:00
"pipeline_artifacts_count": 5,
"pipeline_artifacts_checksum_total_count": 5,
"pipeline_artifacts_checksummed_count": 5,
"pipeline_artifacts_checksum_failed_count": 0,
"pipeline_artifacts_synced_count": 5,
"pipeline_artifacts_failed_count": 0,
"pipeline_artifacts_registry_count": 5,
"pipeline_artifacts_verification_total_count": 5,
"pipeline_artifacts_verified_count": 5,
"pipeline_artifacts_verification_failed_count": 0,
"pipeline_artifacts_synced_in_percentage": "100.00%",
"pipeline_artifacts_verified_in_percentage": "100.00%",
2021-09-17 21:09:17 +00:00
"uploads_count": 5,
"uploads_synced_count": null,
"uploads_failed_count": 0,
"uploads_registry_count": null,
"uploads_synced_in_percentage": "0.00%",
2021-12-07 00:14:07 +00:00
"uploads_checksum_total_count": 5,
"uploads_checksummed_count": 5,
"uploads_checksum_failed_count": null,
"uploads_verification_total_count": null,
"uploads_verified_count": null,
"uploads_verification_failed_count": null,
"uploads_verified_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
}
]
```
## Retrieve status about a specific Geo node
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
GET /geo_nodes/:id/status
```
2020-01-30 15:09:15 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://primary.example.com/api/v4/geo_nodes/2/status"
2019-05-18 21:27:41 +00:00
```
Example response:
```json
{
"geo_node_id": 2,
"healthy": true,
"health": "Healthy",
"health_status": "Healthy",
"missing_oauth_application": false,
"db_replication_lag_seconds": 0,
2021-12-10 18:14:42 +00:00
"lfs_objects_count": 5,
"lfs_objects_checksum_total_count": 5,
"lfs_objects_checksummed_count": 5,
"lfs_objects_checksum_failed_count": 0,
"lfs_objects_synced_count": null,
"lfs_objects_failed_count": null,
"lfs_objects_registry_count": null,
"lfs_objects_verification_total_count": null,
"lfs_objects_verified_count": null,
"lfs_objects_verification_failed_count": null,
2019-05-18 21:27:41 +00:00
"lfs_objects_synced_in_percentage": "0.00%",
2021-12-10 18:14:42 +00:00
"lfs_objects_verified_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
"job_artifacts_count": 2,
"job_artifacts_synced_count": 1,
"job_artifacts_failed_count": 1,
"job_artifacts_synced_missing_on_primary_count": 0,
"job_artifacts_synced_in_percentage": "50.00%",
2019-08-02 08:35:29 +00:00
"container_repositories_count": 3,
2021-02-01 18:09:17 +00:00
"container_repositories_synced_count": null,
"container_repositories_failed_count": null,
2019-08-02 08:35:29 +00:00
"container_repositories_synced_in_percentage": "0.00%",
2019-10-23 18:06:07 +00:00
"design_repositories_count": 3,
2021-02-01 18:09:17 +00:00
"design_repositories_synced_count": null,
"design_repositories_failed_count": null,
2019-10-23 18:06:07 +00:00
"design_repositories_synced_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
"projects_count": 41,
2020-08-03 12:09:47 +00:00
"repositories_count": 41,
2019-05-18 21:27:41 +00:00
"repositories_failed_count": 1,
"repositories_synced_count": 40,
"repositories_synced_in_percentage": "97.56%",
2020-08-03 12:09:47 +00:00
"wikis_count": 41,
2019-05-18 21:27:41 +00:00
"wikis_failed_count": 0,
"wikis_synced_count": 41,
"wikis_synced_in_percentage": "100.00%",
2021-02-01 18:09:17 +00:00
"replication_slots_count": null,
"replication_slots_used_count": null,
2019-05-18 21:27:41 +00:00
"replication_slots_used_in_percentage": "0.00%",
2021-02-01 18:09:17 +00:00
"replication_slots_max_retained_wal_bytes": null,
2019-05-18 21:27:41 +00:00
"last_event_id": 23,
"last_event_timestamp": 1509681166,
"cursor_last_event_id": 23,
"cursor_last_event_timestamp": 1509681166,
"last_successful_status_check_timestamp": 1510125268,
"version": "10.3.0",
2021-03-30 00:09:26 +00:00
"revision": "33d33a096a",
"merge_request_diffs_count": 5,
"merge_request_diffs_checksum_total_count": 5,
"merge_request_diffs_checksummed_count": 5,
"merge_request_diffs_checksum_failed_count": 0,
"merge_request_diffs_synced_count": 5,
"merge_request_diffs_failed_count": 0,
"merge_request_diffs_registry_count": 5,
"merge_request_diffs_verification_total_count": 5,
"merge_request_diffs_verified_count": 5,
"merge_request_diffs_verification_failed_count": 0,
"merge_request_diffs_synced_in_percentage": "100.00%",
"merge_request_diffs_verified_in_percentage": "100.00%",
"package_files_count": 5,
"package_files_checksum_total_count": 5,
"package_files_checksummed_count": 5,
"package_files_checksum_failed_count": 0,
"package_files_synced_count": 5,
"package_files_failed_count": 0,
"package_files_registry_count": 5,
"package_files_verification_total_count": 5,
"package_files_verified_count": 5,
"package_files_verification_failed_count": 0,
"package_files_synced_in_percentage": "100.00%",
"package_files_verified_in_percentage": "100.00%",
"terraform_state_versions_count": 5,
"terraform_state_versions_checksum_total_count": 5,
"terraform_state_versions_checksummed_count": 5,
"terraform_state_versions_checksum_failed_count": 0,
"terraform_state_versions_synced_count": 5,
"terraform_state_versions_failed_count": 0,
"terraform_state_versions_registry_count": 5,
"terraform_state_versions_verification_total_count": 5,
"terraform_state_versions_verified_count": 5,
"terraform_state_versions_verification_failed_count": 0,
"terraform_state_versions_synced_in_percentage": "100.00%",
"terraform_state_versions_verified_in_percentage": "100.00%",
"snippet_repositories_count": 5,
"snippet_repositories_checksum_total_count": 5,
"snippet_repositories_checksummed_count": 5,
"snippet_repositories_checksum_failed_count": 0,
"snippet_repositories_synced_count": 5,
"snippet_repositories_failed_count": 0,
"snippet_repositories_registry_count": 5,
"snippet_repositories_verification_total_count": 5,
"snippet_repositories_verified_count": 5,
"snippet_repositories_verification_failed_count": 0,
"snippet_repositories_synced_in_percentage": "100.00%",
"snippet_repositories_verified_in_percentage": "100.00%",
"group_wiki_repositories_count": 5,
"group_wiki_repositories_checksum_total_count": 5,
"group_wiki_repositories_checksummed_count": 5,
"group_wiki_repositories_checksum_failed_count": 0,
"group_wiki_repositories_synced_count": 5,
"group_wiki_repositories_failed_count": 0,
"group_wiki_repositories_registry_count": 5,
"group_wiki_repositories_verification_total_count": 5,
"group_wiki_repositories_verified_count": 5,
"group_wiki_repositories_verification_failed_count": 0,
"group_wiki_repositories_synced_in_percentage": "100.00%",
"group_wiki_repositories_verified_in_percentage": "100.00%",
2021-04-01 18:13:56 +00:00
"pipeline_artifacts_count": 5,
"pipeline_artifacts_checksum_total_count": 5,
"pipeline_artifacts_checksummed_count": 5,
"pipeline_artifacts_checksum_failed_count": 0,
"pipeline_artifacts_synced_count": 5,
"pipeline_artifacts_failed_count": 0,
"pipeline_artifacts_registry_count": 5,
"pipeline_artifacts_verification_total_count": 5,
"pipeline_artifacts_verified_count": 5,
"pipeline_artifacts_verification_failed_count": 0,
"pipeline_artifacts_synced_in_percentage": "100.00%",
"pipeline_artifacts_verified_in_percentage": "100.00%",
2021-09-17 21:09:17 +00:00
"uploads_count": 5,
"uploads_synced_count": null,
"uploads_failed_count": 0,
"uploads_registry_count": null,
"uploads_synced_in_percentage": "0.00%",
2021-12-07 00:14:07 +00:00
"uploads_checksum_total_count": 5,
"uploads_checksummed_count": 5,
"uploads_checksum_failed_count": null,
"uploads_verification_total_count": null,
"uploads_verified_count": null,
"uploads_verification_failed_count": null,
"uploads_verified_in_percentage": "0.00%",
2019-05-18 21:27:41 +00:00
}
```
2020-12-04 21:09:29 +00:00
NOTE:
The `health_status` parameter can only be in an "Healthy" or "Unhealthy" state, while the `health` parameter can be empty, "Healthy", or contain the actual error message.
2019-05-18 21:27:41 +00:00
## Retrieve project sync or verification failures that occurred on the current node
This only works on a secondary node.
2020-02-27 09:09:01 +00:00
```plaintext
2019-05-18 21:27:41 +00:00
GET /geo_nodes/current/failures
```
| Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- |
| `type` | string | no | Type of failed objects (`repository`/`wiki`) |
| `failure_type` | string | no | Type of failures (`sync`/`checksum_mismatch`/`verification`) |
2021-06-28 15:08:03 +00:00
This endpoint uses [Pagination ](index.md#pagination ).
2019-05-18 21:27:41 +00:00
2020-01-30 15:09:15 +00:00
```shell
2020-05-28 00:08:37 +00:00
curl --header "PRIVATE-TOKEN: < your_access_token > " "https://primary.example.com/api/v4/geo_nodes/current/failures"
2019-05-18 21:27:41 +00:00
```
Example response:
```json
[
{
"project_id": 3,
"last_repository_synced_at": "2017-10-31 14:25:55 UTC",
"last_repository_successful_sync_at": "2017-10-31 14:26:04 UTC",
"last_wiki_synced_at": "2017-10-31 14:26:04 UTC",
"last_wiki_successful_sync_at": "2017-10-31 14:26:11 UTC",
"repository_retry_count": null,
"wiki_retry_count": 1,
"last_repository_sync_failure": null,
"last_wiki_sync_failure": "Error syncing Wiki repository",
"last_repository_verification_failure": "",
"last_wiki_verification_failure": "",
"repository_verification_checksum_sha": "da39a3ee5e6b4b0d32e5bfef9a601890afd80709",
"wiki_verification_checksum_sha": "da39a3ee5e6b4b0d3255bfef9ef0189aafd80709",
"repository_checksum_mismatch": false,
"wiki_checksum_mismatch": false
}
]
```