- Geoサイトを新規作成
- すべての Geo サイトに関する設定の取得
- 特定の Geo サイトに関する設定の取得
- Geo サイトの編集
- Geo サイトの削除
- プライマリ Geo サイトの修復
- すべての Geo サイトのステータスの取得
- 特定の Geo サイトに関するステータスの取得
- 現在のサイトで発生したプロジェクトの同期または検証の失敗を取得します。
Geo サイト API
GitLab 16.0 で導入されました。
Geo sites API を使って Geo サイトエンドポイントを管理します。
前提条件:
- 管理者である必要があります。
Geoサイトを新規作成
新しい Geo サイトを作成します。
POST /geo_sites
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_sites" \
--request POST \
-d "name=himynameissomething" \
-d "url=https://another-node.example.com/"
属性 | 種類 | 必須 | 説明 |
---|---|---|---|
primary | boolean | いいえ | このサイトをプライマリにするかどうかの指定。デフォルトはfalseです。 |
enabled | boolean | いいえ | Geoサイトが有効かどうかを示すフラグ。デフォルトはtrue。 |
name | 文字列です。 | yes | Geo サイトの一意な識別子。gitlab.rb で設定されている場合はgeo_node_name と一致しなければなりません。external_url
|
url | 文字列です。 | yes | Geoサイトのユーザー向けURL。 |
internal_url | 文字列です。 | いいえ | セカンダリサイトがプライマリサイトに連絡するために使用する、プライマリサイトで定義されたURL。設定されていない場合はurl を返します。 |
files_max_capacity | 整数。 | いいえ | このセカンダリ・サイトのLFS/アタッチメント埋め戻しの最大同時性を制御します。デフォルトは10です。 |
repos_max_capacity | 整数。 | いいえ | このセカンダリサイトのリポジトリ埋め戻しの最大同時実行数を制御します。デフォルトは 25 です。 |
verification_max_capacity | 整数。 | いいえ | このサイトのリポジトリ検証の最大同時実行数を制御します。デフォルトは 100 です。 |
container_repositories_max_capacity | 整数。 | いいえ | このサイトのコンテナ・リポジトリ同期の最大同時実行数を制御します。デフォルトは 10 です。 |
sync_object_storage | boolean | いいえ | セカンダリGeoサイトがオブジェクトストレージ内のブロブをレプリケートすべきかどうかを示すフラグ。デフォルトは false です。 |
selective_sync_type | 文字列です。 | いいえ | 特定のグループまたはシャードのみに同期を制限します。有効な値:"namespaces" ,"shards" , またはnull . |
selective_sync_shards | アレイ | いいえ |
selective_sync_type ==shards の場合、同期したプロジェクトのリポジトリストレージ。 |
selective_sync_namespace_ids | アレイ | いいえ |
selective_sync_type ==namespaces の場合、同期すべきグループのID。 |
minimum_reverification_interval | 整数。 | いいえ | リポジトリ検証が有効な間隔(日数)。有効期限が切れると元に戻ります。セカンダリサイトで設定した場合は影響ありません。 |
応答例
{
"id": 3,
"name": "Test Site 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,
"container_repositories_max_capacity": 10,
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
"sync_object_storage": false,
"web_edit_url": "https://primary.example.com/admin/geo/sites/3/edit",
"web_geo_replication_details_url": "https://secondary.example.com/admin/geo/sites/3/replication/lfs_objects",
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/3",
"status": "https://primary.example.com/api/v4/geo_sites/3/status",
"repair": "https://primary.example.com/api/v4/geo_sites/3/repair"
}
}
すべての Geo サイトに関する設定の取得
GET /geo_sites
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_sites"
応答例
[
{
"id": 1,
"name": "us-site",
"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,
"verification_max_capacity": 100,
"container_repositories_max_capacity": 10,
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
"web_edit_url": "https://primary.example.com/admin/geo/sites/1/edit",
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/1",
"status":"https://primary.example.com/api/v4/geo_sites/1/status",
"repair":"https://primary.example.com/api/v4/geo_sites/1/repair"
}
},
{
"id": 2,
"name": "cn-site",
"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,
"container_repositories_max_capacity": 10,
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
"sync_object_storage": true,
"web_edit_url": "https://primary.example.com/admin/geo/sites/2/edit",
"web_geo_replication_details_url": "https://secondary.example.com/admin/geo/sites/2/replication/lfs_objects",
"_links": {
"self":"https://primary.example.com/api/v4/geo_sites/2",
"status":"https://primary.example.com/api/v4/geo_sites/2/status",
"repair":"https://primary.example.com/api/v4/geo_sites/2/repair"
}
}
]
特定の Geo サイトに関する設定の取得
GET /geo_sites/:id
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_sites/1"
応答例
{
"id": 1,
"name": "us-site",
"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,
"verification_max_capacity": 100,
"container_repositories_max_capacity": 10,
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
"web_edit_url": "https://primary.example.com/admin/geo/sites/1/edit",
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/1",
"status":"https://primary.example.com/api/v4/geo_sites/1/status",
"repair":"https://primary.example.com/api/v4/geo_sites/1/repair"
}
}
Geo サイトの編集
既存の Geo サイトの設定を更新します。
PUT /geo_sites/:id
属性 | 種類 | 必須 | 説明 |
---|---|---|---|
id | 整数。 | yes | GeoサイトのID。 |
enabled | boolean | いいえ | Geoサイトが有効かどうかを示すフラグ。 |
name | 文字列です。 | いいえ | Geo サイトの一意な識別子。gitlab.rb で設定されている場合はgeo_node_name と一致する必要があり、そうでない場合はexternal_url と一致する必要があります。 |
url | 文字列です。 | いいえ | Geoサイトのユーザー向けURL。 |
internal_url | 文字列です。 | いいえ | セカンダリサイトがプライマリサイトに連絡するために使用する、プライマリサイトで定義されたURL。設定されていない場合はurl を返します。 |
files_max_capacity | 整数。 | いいえ | このセカンダリサイトのLFS/アタッチメント埋め戻しの最大同時性を制御します。 |
repos_max_capacity | 整数。 | いいえ | このセカンダリサイトのリポジトリ埋め戻しの最大同時実行数を制御します。 |
verification_max_capacity | 整数。 | いいえ | このサイトの検証の最大同時実行数を制御します。 |
container_repositories_max_capacity | 整数。 | いいえ | このサイトのコンテナ・リポジトリ同期の最大同時実行数を制御します。 |
selective_sync_type | 文字列です。 | いいえ | 特定のグループまたはシャードのみに同期を制限します。有効な値:"namespaces" ,"shards" , またはnull . |
selective_sync_shards | アレイ | いいえ |
selective_sync_type ==shards の場合、同期したプロジェクトのリポジトリストレージ。 |
selective_sync_namespace_ids | アレイ | いいえ |
selective_sync_type ==namespaces の場合、同期すべきグループのID。 |
minimum_reverification_interval | 整数。 | いいえ | リポジトリ検証が有効な間隔(日数)。有効期限が切れると元に戻ります。セカンダリサイトで設定した場合は影響ありません。 |
応答例
{
"id": 1,
"name": "us-site",
"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,
"verification_max_capacity": 100,
"container_repositories_max_capacity": 10,
"selective_sync_type": "namespaces",
"selective_sync_shards": [],
"selective_sync_namespace_ids": [1, 25],
"minimum_reverification_interval": 7,
"web_edit_url": "https://primary.example.com/admin/geo/sites/1/edit",
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/1",
"status": "https://primary.example.com/api/v4/geo_sites/1/status",
"repair": "https://primary.example.com/api/v4/geo_sites/1/repair"
}
}
Geo サイトの削除
Geo サイトを削除します。
DELETE /geo_sites/:id
属性 | 種類 | 必須 | 説明 |
---|---|---|---|
id | 整数。 | yes | GeoサイトのID。 |
プライマリ Geo サイトの修復
プライマリ Geo サイトの OAuth 認証を修復します。
POST /geo_sites/:id/repair
応答例
{
"id": 1,
"name": "us-site",
"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,
"verification_max_capacity": 100,
"container_repositories_max_capacity": 10,
"web_edit_url": "https://primary.example.com/admin/geo/sites/1/edit",
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/1",
"status":"https://primary.example.com/api/v4/geo_sites/1/status",
"repair":"https://primary.example.com/api/v4/geo_sites/1/repair"
}
}
すべての Geo サイトのステータスの取得
GET /geo_sites/status
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_sites/status"
応答例
[
{
"geo_node_id": 1,
"repository_verification_enabled": true,
"repositories_replication_enabled": null,
"repositories_synced_count": null,
"repositories_failed_count": null,
"wikis_synced_count": null,
"wikis_failed_count": null,
"repositories_verified_count": null,
"repositories_verification_failed_count": null,
"repositories_verification_total_count": null,
"wikis_verified_count": null,
"wikis_verification_failed_count": null,
"wikis_verification_total_count": null,
"job_artifacts_synced_missing_on_primary_count": null,
"repositories_checksummed_count": 19,
"repositories_checksum_failed_count": 0,
"repositories_checksum_mismatch_count": null,
"repositories_checksum_total_count": 19,
"wikis_checksummed_count": 0,
"wikis_checksum_failed_count": 0,
"wikis_checksum_mismatch_count": null,
"wikis_checksum_total_count": 19,
"repositories_retrying_verification_count": null,
"wikis_retrying_verification_count": null,
"projects_count": 19,
"container_repositories_replication_enabled": null,
"design_repositories_replication_enabled": null,
"design_repositories_count": null,
"design_repositories_synced_count": null,
"design_repositories_failed_count": null,
"lfs_objects_count": 0,
"lfs_objects_checksum_total_count": 0,
"lfs_objects_checksummed_count": 0,
"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,
"merge_request_diffs_count": 0,
"merge_request_diffs_checksum_total_count": 0,
"merge_request_diffs_checksummed_count": 0,
"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,
"package_files_count": 25,
"package_files_checksum_total_count": 25,
"package_files_checksummed_count": 25,
"package_files_checksum_failed_count": 0,
"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,
"terraform_state_versions_count": 18,
"terraform_state_versions_checksum_total_count": 18,
"terraform_state_versions_checksummed_count": 18,
"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,
"snippet_repositories_count": 20,
"snippet_repositories_checksum_total_count": 20,
"snippet_repositories_checksummed_count": 20,
"snippet_repositories_checksum_failed_count": 0,
"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,
"group_wiki_repositories_count": 0,
"group_wiki_repositories_checksum_total_count": null,
"group_wiki_repositories_checksummed_count": null,
"group_wiki_repositories_checksum_failed_count": null,
"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,
"pipeline_artifacts_count": 0,
"pipeline_artifacts_checksum_total_count": 0,
"pipeline_artifacts_checksummed_count": 0,
"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,
"pages_deployments_count": 0,
"pages_deployments_checksum_total_count": 0,
"pages_deployments_checksummed_count": 0,
"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,
"uploads_count": 51,
"uploads_checksum_total_count": 51,
"uploads_checksummed_count": 51,
"uploads_checksum_failed_count": 0,
"uploads_synced_count": null,
"uploads_failed_count": null,
"uploads_registry_count": null,
"uploads_verification_total_count": null,
"uploads_verified_count": null,
"uploads_verification_failed_count": null,
"job_artifacts_count": 205,
"job_artifacts_checksum_total_count": 205,
"job_artifacts_checksummed_count": 205,
"job_artifacts_checksum_failed_count": 0,
"job_artifacts_synced_count": null,
"job_artifacts_failed_count": null,
"job_artifacts_registry_count": null,
"job_artifacts_verification_total_count": null,
"job_artifacts_verified_count": null,
"job_artifacts_verification_failed_count": null,
"ci_secure_files_count": 0,
"ci_secure_files_checksum_total_count": 0,
"ci_secure_files_checksummed_count": 0,
"ci_secure_files_checksum_failed_count": 0,
"ci_secure_files_synced_count": null,
"ci_secure_files_failed_count": null,
"ci_secure_files_registry_count": null,
"ci_secure_files_verification_total_count": null,
"ci_secure_files_verified_count": null,
"ci_secure_files_verification_failed_count": null,
"container_repositories_count": 0,
"container_repositories_checksum_total_count": 0,
"container_repositories_checksummed_count": 0,
"container_repositories_checksum_failed_count": 0,
"container_repositories_synced_count": null,
"container_repositories_failed_count": null,
"container_repositories_registry_count": null,
"container_repositories_verification_total_count": null,
"container_repositories_verified_count": null,
"container_repositories_verification_failed_count": null,
"dependency_proxy_blobs_count": 0,
"dependency_proxy_blobs_checksum_total_count": 0,
"dependency_proxy_blobs_checksummed_count": 0,
"dependency_proxy_blobs_checksum_failed_count": 0,
"dependency_proxy_blobs_synced_count": null,
"dependency_proxy_blobs_failed_count": null,
"dependency_proxy_blobs_registry_count": null,
"dependency_proxy_blobs_verification_total_count": null,
"dependency_proxy_blobs_verified_count": null,
"dependency_proxy_blobs_verification_failed_count": null,
"dependency_proxy_manifests_count": 0,
"dependency_proxy_manifests_checksum_total_count": 0,
"dependency_proxy_manifests_checksummed_count": 0,
"dependency_proxy_manifests_checksum_failed_count": 0,
"dependency_proxy_manifests_synced_count": null,
"dependency_proxy_manifests_failed_count": null,
"dependency_proxy_manifests_registry_count": null,
"dependency_proxy_manifests_verification_total_count": null,
"dependency_proxy_manifests_verified_count": null,
"dependency_proxy_manifests_verification_failed_count": null,
"project_wiki_repositories_count": 19,
"project_wiki_repositories_checksum_total_count": 19,
"project_wiki_repositories_checksummed_count": 19,
"project_wiki_repositories_checksum_failed_count": 0,
"project_wiki_repositories_synced_count": null,
"project_wiki_repositories_failed_count": null,
"project_wiki_repositories_registry_count": null,
"project_wiki_repositories_verification_total_count": null,
"project_wiki_repositories_verified_count": null,
"project_wiki_repositories_verification_failed_count": null,
"git_fetch_event_count_weekly": null,
"git_push_event_count_weekly": null,
"proxy_remote_requests_event_count_weekly": null,
"proxy_local_requests_event_count_weekly": null,
"repositories_synced_in_percentage": "0.00%",
"repositories_checksummed_in_percentage": "100.00%",
"repositories_verified_in_percentage": "0.00%",
"repositories_checked_in_percentage": "0.00%",
"wikis_synced_in_percentage": "0.00%",
"wikis_checksummed_in_percentage": "0.00%",
"wikis_verified_in_percentage": "0.00%",
"replication_slots_used_in_percentage": "100.00%",
"design_repositories_synced_in_percentage": "0.00%",
"lfs_objects_synced_in_percentage": "0.00%",
"lfs_objects_verified_in_percentage": "0.00%",
"merge_request_diffs_synced_in_percentage": "0.00%",
"merge_request_diffs_verified_in_percentage": "0.00%",
"package_files_synced_in_percentage": "0.00%",
"package_files_verified_in_percentage": "0.00%",
"terraform_state_versions_synced_in_percentage": "0.00%",
"terraform_state_versions_verified_in_percentage": "0.00%",
"snippet_repositories_synced_in_percentage": "0.00%",
"snippet_repositories_verified_in_percentage": "0.00%",
"group_wiki_repositories_synced_in_percentage": "0.00%",
"group_wiki_repositories_verified_in_percentage": "0.00%",
"pipeline_artifacts_synced_in_percentage": "0.00%",
"pipeline_artifacts_verified_in_percentage": "0.00%",
"pages_deployments_synced_in_percentage": "0.00%",
"pages_deployments_verified_in_percentage": "0.00%",
"uploads_synced_in_percentage": "0.00%",
"uploads_verified_in_percentage": "0.00%",
"job_artifacts_synced_in_percentage": "0.00%",
"job_artifacts_verified_in_percentage": "0.00%",
"ci_secure_files_synced_in_percentage": "0.00%",
"ci_secure_files_verified_in_percentage": "0.00%",
"container_repositories_synced_in_percentage": "0.00%",
"container_repositories_verified_in_percentage": "0.00%",
"dependency_proxy_blobs_synced_in_percentage": "0.00%",
"dependency_proxy_blobs_verified_in_percentage": "0.00%",
"dependency_proxy_manifests_synced_in_percentage": "0.00%",
"dependency_proxy_manifests_verified_in_percentage": "0.00%",
"project_wiki_repositories_synced_in_percentage": "0.00%",
"project_wiki_repositories_verified_in_percentage": "0.00%",
"repositories_count": 19,
"wikis_count": 19,
"replication_slots_count": 1,
"replication_slots_used_count": 1,
"healthy": true,
"health": "Healthy",
"health_status": "Healthy",
"missing_oauth_application": false,
"db_replication_lag_seconds": null,
"replication_slots_max_retained_wal_bytes": 0,
"repositories_checked_count": null,
"repositories_checked_failed_count": null,
"last_event_id": 357,
"last_event_timestamp": 1683127088,
"cursor_last_event_id": null,
"cursor_last_event_timestamp": 0,
"last_successful_status_check_timestamp": 1683129788,
"version": "16.0.0-pre",
"revision": "129eb954664",
"selective_sync_type": null,
"namespaces": [],
"updated_at": "2023-05-03T16:03:10.117Z",
"storage_shards_match": true,
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/1/status",
"site": "https://primary.example.com/api/v4/geo_sites/1"
}
},
{
"geo_node_id": 2,
"repository_verification_enabled": true,
"repositories_replication_enabled": true,
"repositories_synced_count": 18,
"repositories_failed_count": 0,
"wikis_synced_count": 18,
"wikis_failed_count": 0,
"repositories_verified_count": 0,
"repositories_verification_failed_count": 0,
"repositories_verification_total_count": 19,
"wikis_verified_count": 0,
"wikis_verification_failed_count": 0,
"wikis_verification_total_count": 19,
"job_artifacts_synced_missing_on_primary_count": null,
"repositories_checksummed_count": null,
"repositories_checksum_failed_count": null,
"repositories_checksum_mismatch_count": 0,
"repositories_checksum_total_count": null,
"wikis_checksummed_count": null,
"wikis_checksum_failed_count": null,
"wikis_checksum_mismatch_count": 0,
"wikis_checksum_total_count": null,
"repositories_retrying_verification_count": 0,
"wikis_retrying_verification_count": 0,
"projects_count": 19,
"container_repositories_replication_enabled": null,
"design_repositories_replication_enabled": true,
"design_repositories_count": 0,
"design_repositories_synced_count": 0,
"design_repositories_failed_count": 0,
"lfs_objects_count": 0,
"lfs_objects_checksum_total_count": null,
"lfs_objects_checksummed_count": null,
"lfs_objects_checksum_failed_count": null,
"lfs_objects_synced_count": 0,
"lfs_objects_failed_count": 0,
"lfs_objects_registry_count": 0,
"lfs_objects_verification_total_count": 0,
"lfs_objects_verified_count": 0,
"lfs_objects_verification_failed_count": 0,
"merge_request_diffs_count": 0,
"merge_request_diffs_checksum_total_count": null,
"merge_request_diffs_checksummed_count": null,
"merge_request_diffs_checksum_failed_count": null,
"merge_request_diffs_synced_count": 0,
"merge_request_diffs_failed_count": 0,
"merge_request_diffs_registry_count": 0,
"merge_request_diffs_verification_total_count": 0,
"merge_request_diffs_verified_count": 0,
"merge_request_diffs_verification_failed_count": 0,
"package_files_count": 25,
"package_files_checksum_total_count": null,
"package_files_checksummed_count": null,
"package_files_checksum_failed_count": null,
"package_files_synced_count": 1,
"package_files_failed_count": 24,
"package_files_registry_count": 25,
"package_files_verification_total_count": 1,
"package_files_verified_count": 1,
"package_files_verification_failed_count": 0,
"terraform_state_versions_count": 18,
"terraform_state_versions_checksum_total_count": null,
"terraform_state_versions_checksummed_count": null,
"terraform_state_versions_checksum_failed_count": null,
"terraform_state_versions_synced_count": 0,
"terraform_state_versions_failed_count": 0,
"terraform_state_versions_registry_count": 18,
"terraform_state_versions_verification_total_count": 0,
"terraform_state_versions_verified_count": 0,
"terraform_state_versions_verification_failed_count": 0,
"snippet_repositories_count": 20,
"snippet_repositories_checksum_total_count": null,
"snippet_repositories_checksummed_count": null,
"snippet_repositories_checksum_failed_count": null,
"snippet_repositories_synced_count": 20,
"snippet_repositories_failed_count": 0,
"snippet_repositories_registry_count": 20,
"snippet_repositories_verification_total_count": 20,
"snippet_repositories_verified_count": 20,
"snippet_repositories_verification_failed_count": 0,
"group_wiki_repositories_count": 0,
"group_wiki_repositories_checksum_total_count": null,
"group_wiki_repositories_checksummed_count": null,
"group_wiki_repositories_checksum_failed_count": null,
"group_wiki_repositories_synced_count": 0,
"group_wiki_repositories_failed_count": 0,
"group_wiki_repositories_registry_count": 0,
"group_wiki_repositories_verification_total_count": null,
"group_wiki_repositories_verified_count": null,
"group_wiki_repositories_verification_failed_count": null,
"pipeline_artifacts_count": 0,
"pipeline_artifacts_checksum_total_count": null,
"pipeline_artifacts_checksummed_count": null,
"pipeline_artifacts_checksum_failed_count": null,
"pipeline_artifacts_synced_count": 0,
"pipeline_artifacts_failed_count": 0,
"pipeline_artifacts_registry_count": 0,
"pipeline_artifacts_verification_total_count": 0,
"pipeline_artifacts_verified_count": 0,
"pipeline_artifacts_verification_failed_count": 0,
"pages_deployments_count": 0,
"pages_deployments_checksum_total_count": null,
"pages_deployments_checksummed_count": null,
"pages_deployments_checksum_failed_count": null,
"pages_deployments_synced_count": 0,
"pages_deployments_failed_count": 0,
"pages_deployments_registry_count": 0,
"pages_deployments_verification_total_count": 0,
"pages_deployments_verified_count": 0,
"pages_deployments_verification_failed_count": 0,
"uploads_count": 51,
"uploads_checksum_total_count": null,
"uploads_checksummed_count": null,
"uploads_checksum_failed_count": null,
"uploads_synced_count": 0,
"uploads_failed_count": 1,
"uploads_registry_count": 51,
"uploads_verification_total_count": 0,
"uploads_verified_count": 0,
"uploads_verification_failed_count": 0,
"job_artifacts_count": 0,
"job_artifacts_checksum_total_count": null,
"job_artifacts_checksummed_count": null,
"job_artifacts_checksum_failed_count": null,
"job_artifacts_synced_count": 0,
"job_artifacts_failed_count": 0,
"job_artifacts_registry_count": 0,
"job_artifacts_verification_total_count": 0,
"job_artifacts_verified_count": 0,
"job_artifacts_verification_failed_count": 0,
"ci_secure_files_count": 0,
"ci_secure_files_checksum_total_count": null,
"ci_secure_files_checksummed_count": null,
"ci_secure_files_checksum_failed_count": null,
"ci_secure_files_synced_count": 0,
"ci_secure_files_failed_count": 0,
"ci_secure_files_registry_count": 0,
"ci_secure_files_verification_total_count": 0,
"ci_secure_files_verified_count": 0,
"ci_secure_files_verification_failed_count": 0,
"container_repositories_count": null,
"container_repositories_checksum_total_count": null,
"container_repositories_checksummed_count": null,
"container_repositories_checksum_failed_count": null,
"container_repositories_synced_count": null,
"container_repositories_failed_count": null,
"container_repositories_registry_count": null,
"container_repositories_verification_total_count": null,
"container_repositories_verified_count": null,
"container_repositories_verification_failed_count": null,
"dependency_proxy_blobs_count": 0,
"dependency_proxy_blobs_checksum_total_count": null,
"dependency_proxy_blobs_checksummed_count": null,
"dependency_proxy_blobs_checksum_failed_count": null,
"dependency_proxy_blobs_synced_count": 0,
"dependency_proxy_blobs_failed_count": 0,
"dependency_proxy_blobs_registry_count": 0,
"dependency_proxy_blobs_verification_total_count": 0,
"dependency_proxy_blobs_verified_count": 0,
"dependency_proxy_blobs_verification_failed_count": 0,
"dependency_proxy_manifests_count": 0,
"dependency_proxy_manifests_checksum_total_count": null,
"dependency_proxy_manifests_checksummed_count": null,
"dependency_proxy_manifests_checksum_failed_count": null,
"dependency_proxy_manifests_synced_count": 0,
"dependency_proxy_manifests_failed_count": 0,
"dependency_proxy_manifests_registry_count": 0,
"dependency_proxy_manifests_verification_total_count": 0,
"dependency_proxy_manifests_verified_count": 0,
"dependency_proxy_manifests_verification_failed_count": 0,
"project_wiki_repositories_count": 19,
"project_wiki_repositories_checksum_total_count": null,
"project_wiki_repositories_checksummed_count": null,
"project_wiki_repositories_checksum_failed_count": null,
"project_wiki_repositories_synced_count": 19,
"project_wiki_repositories_failed_count": 0,
"project_wiki_repositories_registry_count": 19,
"project_wiki_repositories_verification_total_count": 19,
"project_wiki_repositories_verified_count": 19,
"project_wiki_repositories_verification_failed_count": 0,
"git_fetch_event_count_weekly": null,
"git_push_event_count_weekly": null,
"proxy_remote_requests_event_count_weekly": null,
"proxy_local_requests_event_count_weekly": null,
"repositories_synced_in_percentage": "94.74%",
"repositories_checksummed_in_percentage": "0.00%",
"repositories_verified_in_percentage": "0.00%",
"repositories_checked_in_percentage": "0.00%",
"wikis_synced_in_percentage": "94.74%",
"wikis_checksummed_in_percentage": "0.00%",
"wikis_verified_in_percentage": "0.00%",
"replication_slots_used_in_percentage": "0.00%",
"design_repositories_synced_in_percentage": "0.00%",
"lfs_objects_synced_in_percentage": "0.00%",
"lfs_objects_verified_in_percentage": "0.00%",
"merge_request_diffs_synced_in_percentage": "0.00%",
"merge_request_diffs_verified_in_percentage": "0.00%",
"package_files_synced_in_percentage": "4.00%",
"package_files_verified_in_percentage": "4.00%",
"terraform_state_versions_synced_in_percentage": "0.00%",
"terraform_state_versions_verified_in_percentage": "0.00%",
"snippet_repositories_synced_in_percentage": "100.00%",
"snippet_repositories_verified_in_percentage": "100.00%",
"group_wiki_repositories_synced_in_percentage": "0.00%",
"group_wiki_repositories_verified_in_percentage": "0.00%",
"pipeline_artifacts_synced_in_percentage": "0.00%",
"pipeline_artifacts_verified_in_percentage": "0.00%",
"pages_deployments_synced_in_percentage": "0.00%",
"pages_deployments_verified_in_percentage": "0.00%",
"uploads_synced_in_percentage": "0.00%",
"uploads_verified_in_percentage": "0.00%",
"job_artifacts_synced_in_percentage": "0.00%",
"job_artifacts_verified_in_percentage": "0.00%",
"ci_secure_files_synced_in_percentage": "0.00%",
"ci_secure_files_verified_in_percentage": "0.00%",
"container_repositories_synced_in_percentage": "0.00%",
"container_repositories_verified_in_percentage": "0.00%",
"dependency_proxy_blobs_synced_in_percentage": "0.00%",
"dependency_proxy_blobs_verified_in_percentage": "0.00%",
"dependency_proxy_manifests_synced_in_percentage": "0.00%",
"dependency_proxy_manifests_verified_in_percentage": "0.00%",
"project_wiki_repositories_synced_in_percentage": "100.00%",
"project_wiki_repositories_verified_in_percentage": "100.00%",
"repositories_count": 19,
"wikis_count": 19,
"replication_slots_count": null,
"replication_slots_used_count": null,
"healthy": false,
"health": "An existing tracking database cannot be reused..",
"health_status": "Unhealthy",
"missing_oauth_application": false,
"db_replication_lag_seconds": 0,
"replication_slots_max_retained_wal_bytes": null,
"repositories_checked_count": null,
"repositories_checked_failed_count": null,
"last_event_id": 357,
"last_event_timestamp": 1683127088,
"cursor_last_event_id": 357,
"cursor_last_event_timestamp": 1683127088,
"last_successful_status_check_timestamp": 1683127146,
"version": "16.0.0-pre",
"revision": "129eb954664",
"selective_sync_type": "",
"namespaces": [],
"updated_at": "2023-05-03T15:19:06.174Z",
"storage_shards_match": true,
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/2/status",
"site": "https://primary.example.com/api/v4/geo_sites/2"
}
}
]
特定の Geo サイトに関するステータスの取得
GET /geo_sites/:id/status
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_sites/2/status"
応答例
{
"geo_node_id": 2,
"repository_verification_enabled": true,
"repositories_replication_enabled": true,
"repositories_synced_count": 18,
"repositories_failed_count": 0,
"wikis_synced_count": 18,
"wikis_failed_count": 0,
"repositories_verified_count": 0,
"repositories_verification_failed_count": 0,
"repositories_verification_total_count": 19,
"wikis_verified_count": 0,
"wikis_verification_failed_count": 0,
"wikis_verification_total_count": 19,
"job_artifacts_synced_missing_on_primary_count": null,
"repositories_checksummed_count": null,
"repositories_checksum_failed_count": null,
"repositories_checksum_mismatch_count": 0,
"repositories_checksum_total_count": null,
"wikis_checksummed_count": null,
"wikis_checksum_failed_count": null,
"wikis_checksum_mismatch_count": 0,
"wikis_checksum_total_count": null,
"repositories_retrying_verification_count": 0,
"wikis_retrying_verification_count": 0,
"projects_count": 19,
"container_repositories_replication_enabled": null,
"design_repositories_replication_enabled": true,
"design_repositories_count": 0,
"design_repositories_synced_count": 0,
"design_repositories_failed_count": 0,
"lfs_objects_count": 0,
"lfs_objects_checksum_total_count": null,
"lfs_objects_checksummed_count": null,
"lfs_objects_checksum_failed_count": null,
"lfs_objects_synced_count": 0,
"lfs_objects_failed_count": 0,
"lfs_objects_registry_count": 0,
"lfs_objects_verification_total_count": 0,
"lfs_objects_verified_count": 0,
"lfs_objects_verification_failed_count": 0,
"merge_request_diffs_count": 0,
"merge_request_diffs_checksum_total_count": null,
"merge_request_diffs_checksummed_count": null,
"merge_request_diffs_checksum_failed_count": null,
"merge_request_diffs_synced_count": 0,
"merge_request_diffs_failed_count": 0,
"merge_request_diffs_registry_count": 0,
"merge_request_diffs_verification_total_count": 0,
"merge_request_diffs_verified_count": 0,
"merge_request_diffs_verification_failed_count": 0,
"package_files_count": 25,
"package_files_checksum_total_count": null,
"package_files_checksummed_count": null,
"package_files_checksum_failed_count": null,
"package_files_synced_count": 1,
"package_files_failed_count": 24,
"package_files_registry_count": 25,
"package_files_verification_total_count": 1,
"package_files_verified_count": 1,
"package_files_verification_failed_count": 0,
"terraform_state_versions_count": 18,
"terraform_state_versions_checksum_total_count": null,
"terraform_state_versions_checksummed_count": null,
"terraform_state_versions_checksum_failed_count": null,
"terraform_state_versions_synced_count": 0,
"terraform_state_versions_failed_count": 0,
"terraform_state_versions_registry_count": 18,
"terraform_state_versions_verification_total_count": 0,
"terraform_state_versions_verified_count": 0,
"terraform_state_versions_verification_failed_count": 0,
"snippet_repositories_count": 20,
"snippet_repositories_checksum_total_count": null,
"snippet_repositories_checksummed_count": null,
"snippet_repositories_checksum_failed_count": null,
"snippet_repositories_synced_count": 20,
"snippet_repositories_failed_count": 0,
"snippet_repositories_registry_count": 20,
"snippet_repositories_verification_total_count": 20,
"snippet_repositories_verified_count": 20,
"snippet_repositories_verification_failed_count": 0,
"group_wiki_repositories_count": 0,
"group_wiki_repositories_checksum_total_count": null,
"group_wiki_repositories_checksummed_count": null,
"group_wiki_repositories_checksum_failed_count": null,
"group_wiki_repositories_synced_count": 0,
"group_wiki_repositories_failed_count": 0,
"group_wiki_repositories_registry_count": 0,
"group_wiki_repositories_verification_total_count": null,
"group_wiki_repositories_verified_count": null,
"group_wiki_repositories_verification_failed_count": null,
"pipeline_artifacts_count": 0,
"pipeline_artifacts_checksum_total_count": null,
"pipeline_artifacts_checksummed_count": null,
"pipeline_artifacts_checksum_failed_count": null,
"pipeline_artifacts_synced_count": 0,
"pipeline_artifacts_failed_count": 0,
"pipeline_artifacts_registry_count": 0,
"pipeline_artifacts_verification_total_count": 0,
"pipeline_artifacts_verified_count": 0,
"pipeline_artifacts_verification_failed_count": 0,
"pages_deployments_count": 0,
"pages_deployments_checksum_total_count": null,
"pages_deployments_checksummed_count": null,
"pages_deployments_checksum_failed_count": null,
"pages_deployments_synced_count": 0,
"pages_deployments_failed_count": 0,
"pages_deployments_registry_count": 0,
"pages_deployments_verification_total_count": 0,
"pages_deployments_verified_count": 0,
"pages_deployments_verification_failed_count": 0,
"uploads_count": 51,
"uploads_checksum_total_count": null,
"uploads_checksummed_count": null,
"uploads_checksum_failed_count": null,
"uploads_synced_count": 0,
"uploads_failed_count": 1,
"uploads_registry_count": 51,
"uploads_verification_total_count": 0,
"uploads_verified_count": 0,
"uploads_verification_failed_count": 0,
"job_artifacts_count": 0,
"job_artifacts_checksum_total_count": null,
"job_artifacts_checksummed_count": null,
"job_artifacts_checksum_failed_count": null,
"job_artifacts_synced_count": 0,
"job_artifacts_failed_count": 0,
"job_artifacts_registry_count": 0,
"job_artifacts_verification_total_count": 0,
"job_artifacts_verified_count": 0,
"job_artifacts_verification_failed_count": 0,
"ci_secure_files_count": 0,
"ci_secure_files_checksum_total_count": null,
"ci_secure_files_checksummed_count": null,
"ci_secure_files_checksum_failed_count": null,
"ci_secure_files_synced_count": 0,
"ci_secure_files_failed_count": 0,
"ci_secure_files_registry_count": 0,
"ci_secure_files_verification_total_count": 0,
"ci_secure_files_verified_count": 0,
"ci_secure_files_verification_failed_count": 0,
"container_repositories_count": null,
"container_repositories_checksum_total_count": null,
"container_repositories_checksummed_count": null,
"container_repositories_checksum_failed_count": null,
"container_repositories_synced_count": null,
"container_repositories_failed_count": null,
"container_repositories_registry_count": null,
"container_repositories_verification_total_count": null,
"container_repositories_verified_count": null,
"container_repositories_verification_failed_count": null,
"dependency_proxy_blobs_count": 0,
"dependency_proxy_blobs_checksum_total_count": null,
"dependency_proxy_blobs_checksummed_count": null,
"dependency_proxy_blobs_checksum_failed_count": null,
"dependency_proxy_blobs_synced_count": 0,
"dependency_proxy_blobs_failed_count": 0,
"dependency_proxy_blobs_registry_count": 0,
"dependency_proxy_blobs_verification_total_count": 0,
"dependency_proxy_blobs_verified_count": 0,
"dependency_proxy_blobs_verification_failed_count": 0,
"dependency_proxy_manifests_count": 0,
"dependency_proxy_manifests_checksum_total_count": null,
"dependency_proxy_manifests_checksummed_count": null,
"dependency_proxy_manifests_checksum_failed_count": null,
"dependency_proxy_manifests_synced_count": 0,
"dependency_proxy_manifests_failed_count": 0,
"dependency_proxy_manifests_registry_count": 0,
"dependency_proxy_manifests_verification_total_count": 0,
"dependency_proxy_manifests_verified_count": 0,
"dependency_proxy_manifests_verification_failed_count": 0,
"project_wiki_repositories_count": 19,
"project_wiki_repositories_checksum_total_count": null,
"project_wiki_repositories_checksummed_count": null,
"project_wiki_repositories_checksum_failed_count": null,
"project_wiki_repositories_synced_count": 19,
"project_wiki_repositories_failed_count": 0,
"project_wiki_repositories_registry_count": 19,
"project_wiki_repositories_verification_total_count": 19,
"project_wiki_repositories_verified_count": 19,
"project_wiki_repositories_verification_failed_count": 0,
"git_fetch_event_count_weekly": null,
"git_push_event_count_weekly": null,
"proxy_remote_requests_event_count_weekly": null,
"proxy_local_requests_event_count_weekly": null,
"repositories_synced_in_percentage": "94.74%",
"repositories_checksummed_in_percentage": "0.00%",
"repositories_verified_in_percentage": "0.00%",
"repositories_checked_in_percentage": "0.00%",
"wikis_synced_in_percentage": "94.74%",
"wikis_checksummed_in_percentage": "0.00%",
"wikis_verified_in_percentage": "0.00%",
"replication_slots_used_in_percentage": "0.00%",
"design_repositories_synced_in_percentage": "0.00%",
"lfs_objects_synced_in_percentage": "0.00%",
"lfs_objects_verified_in_percentage": "0.00%",
"merge_request_diffs_synced_in_percentage": "0.00%",
"merge_request_diffs_verified_in_percentage": "0.00%",
"package_files_synced_in_percentage": "4.00%",
"package_files_verified_in_percentage": "4.00%",
"terraform_state_versions_synced_in_percentage": "0.00%",
"terraform_state_versions_verified_in_percentage": "0.00%",
"snippet_repositories_synced_in_percentage": "100.00%",
"snippet_repositories_verified_in_percentage": "100.00%",
"group_wiki_repositories_synced_in_percentage": "0.00%",
"group_wiki_repositories_verified_in_percentage": "0.00%",
"pipeline_artifacts_synced_in_percentage": "0.00%",
"pipeline_artifacts_verified_in_percentage": "0.00%",
"pages_deployments_synced_in_percentage": "0.00%",
"pages_deployments_verified_in_percentage": "0.00%",
"uploads_synced_in_percentage": "0.00%",
"uploads_verified_in_percentage": "0.00%",
"job_artifacts_synced_in_percentage": "0.00%",
"job_artifacts_verified_in_percentage": "0.00%",
"ci_secure_files_synced_in_percentage": "0.00%",
"ci_secure_files_verified_in_percentage": "0.00%",
"container_repositories_synced_in_percentage": "0.00%",
"container_repositories_verified_in_percentage": "0.00%",
"dependency_proxy_blobs_synced_in_percentage": "0.00%",
"dependency_proxy_blobs_verified_in_percentage": "0.00%",
"dependency_proxy_manifests_synced_in_percentage": "0.00%",
"dependency_proxy_manifests_verified_in_percentage": "0.00%",
"project_wiki_repositories_synced_in_percentage": "100.00%",
"project_wiki_repositories_verified_in_percentage": "100.00%",
"repositories_count": 19,
"wikis_count": 19,
"replication_slots_count": null,
"replication_slots_used_count": null,
"healthy": false,
"health": "An existing tracking database cannot be reused..",
"health_status": "Unhealthy",
"missing_oauth_application": false,
"db_replication_lag_seconds": 0,
"replication_slots_max_retained_wal_bytes": null,
"repositories_checked_count": null,
"repositories_checked_failed_count": null,
"last_event_id": 357,
"last_event_timestamp": 1683127088,
"cursor_last_event_id": 357,
"cursor_last_event_timestamp": 1683127088,
"last_successful_status_check_timestamp": 1683127146,
"version": "16.0.0-pre",
"revision": "129eb954664",
"selective_sync_type": "",
"namespaces": [],
"updated_at": "2023-05-03T15:19:06.174Z",
"storage_shards_match": true,
"_links": {
"self": "https://primary.example.com/api/v4/geo_sites/2/status",
"site": "https://primary.example.com/api/v4/geo_sites/2"
}
}
health_status
パラメータは “Healthy “または “Unhealthy “状態のみ、health
パラメータは空、”Healthy”、または実際のエラーメッセージを含むことができます。現在のサイトで発生したプロジェクトの同期または検証の失敗を取得します。
これはセカンダリ・サイトでのみ機能します。
GET /geo_sites/current/failures
属性 | 種類 | 必須 | 説明 |
---|---|---|---|
type | 文字列です。 | いいえ | 失敗したオブジェクトのタイプ (repository /wiki ) |
failure_type | 文字列です。 | いいえ | 障害の種類 (sync /checksum_mismatch /verification ) |
このエンドポイントはPaginationを使用しています。
curl --header "PRIVATE-TOKEN: <your_access_token>" "https://primary.example.com/api/v4/geo_sites/current/failures"
応答例
[
{
"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
}
]