Atlas がクラスターの週次メンテナンスを開始する時刻を設定できます。この設定は任意であり、ほとんどのクラスターには必要ありません。 プロジェクト設定からメンテナンス ウィンドウを構成します。
通常、メンテナンス ウィンドウを手動で構成する必要はありません。Atlas は、回復力のあるアプリケーションの継続的な可用性を維持するために、ローリング方式で自動的にメンテナンスを実行します。テスト フェイルオーバー機能を使用して、アプリケーションがレプリカ セットの選挙に対して回復力があることを確認できます。
メンテナンスウィンドウを設定すると、レプリカセットの選挙が必要なメンテナンスを希望する時間帯に実施し、その他の標準的な更新をビジネスクリティカルな時間外に行うことで、メンテナンスのタイミングをより細かく制御できます。
メンテナンスウィンドウに関する考慮事項
至急の整備アクティビティ
Atlas は、設定されたメンテナンス ウィンドウや保護された時間に関係なく、必要性が生じた直後に至急のメンテナンス アクティビティ(ゼロデイ脆弱性に対するセキュリティパッチなど)を実施することがあります。
継続的なメンテナンス操作
クラスターのメンテナンスウィンドウは、一度スケジュールすると、進行中のメンテナンス操作が完了するまで変更できません。
MongoDB database のアップグレード
メンテナンスに MongoDB のパッチ バージョン アップグレードが含まれる場合、Atlas は現在のバージョンとターゲット バージョンをコンソールに表示します。
メンテナンスにはレプリカセットの選択が必要
Atlas は、 MongoDB マニュアルに記載されているメンテナンス手順と同じ方法でメンテナンスを行います。この手順では、レプリカ セットごとに、メンテナンスウィンドウ中に少なくとも 1 回のレプリカセット選挙が必要です。
フェイルオーバーのテスト機能を使用して、アプリケーションがレプリカセットの選挙に対して回復力があることを確認します。
メンテナンスは可能な限りウィンドウの開始に近い時間に開始される
メンテナンスは常に可能な限り予定時刻に近い時間に開始されますが、進行中のクラスター アップデートや予期しないシステム問題により、開始時間が遅れる可能性があります。
メンテナンス中に短時間のパフォーマンス低下が発生する可能性
ディスク IOPSが低い場合、MongoDB が WiredTiger ストレージ エンジンに再入力している間、クラスターのメンテナンス中に短時間のパフォーマンスが低下する可能性があります。 詳しくは、「 ジャーナリングと WiredTiger ストレージ エンジン」を参照してください。
メンテナンスの完了を追跡する
Maintenance window completedメンテナンス操作が完了すると、プロジェクト アクティビティ フィードに イベントが表示されます。
保護時間に関する考慮事項
メンテナンス ウィンドウの構成に加えて、日次の保護された時間を設定することもできます。この時間では、Atlas が標準更新を回避します。
メンテナンスと標準更新
Atlas はメンテナンス ウィンドウ中にメンテナンスを自動的に実行します。ただし、Atlas はメンテナンス ウィンドウ外で、クラスターの再起動やワークロードのパフォーマンスへの影響を伴わない標準的な更新を実行する場合があります。保護された時間を有効にすると、Atlas は保護された時間のウィンドウ外で標準更新を実行します。
保護時間の範囲
保護時間枠の長さは 18 時間を超えることはできません。
必要なアクセス権
メンテナンスWindowsを管理するには、プロジェクトに対するOrganization OwnerまたはProject Ownerアクセス権が必要です。
手順
プロジェクト設定を開きます
Atlas で、 Project Settings ページに移動します。
まだ表示されていない場合は、希望するプロジェクトを含む組織を選択しますナビゲーション バーのOrganizationsメニュー
まだ表示されていない場合は、ナビゲーション バーのProjectsメニューから目的のプロジェクトを選択します。
サイドバーで、Project Settings をクリックします。
[ Project Settings ]ページが表示されます。
メンテナンスウィンドウの表示と設定
Atlas UI を使用してメンテナンスウィンドウを表示および設定するには、次の手順に従います。
メンテナンスウィンドウの設定を表示するには、[Set Maintenance Window] ボタンをクリックします。
Atlas がプロジェクトのメンテナンスを開始する日時を設定します。
Atlasがスケジュールされたメンテナンスを 1 週間自動的に延期する場合は、Automatically defer maintenance for one week をクリックします。
Atlas が標準更新を回避する保護時間の範囲を設定するには、Turn on protected hours 設定を On に切り替えます。1 日に最大 18 時間の時間範囲を設定できます。
変更を保持するにはSaveをクリックし、変更を破棄するにはCancelをクリックします。
Atlas CLI を使用してメンテナンスウィンドウの詳細を返すには、次のコマンドを実行します。
atlas maintenanceWindows describe [options]
Atlas CLI を使用してメンテナンスウィンドウを更新するには、次のコマンドを実行します。
atlas maintenanceWindows update [options]
前のコマンドの構文とパラメーターの詳細については、Atlas CLIドキュメントの「AtlasメンテナンスWindows の説明」および「メンテナンスAtlasWindows Update」を参照してください。
メンテナンスウィンドウの構成設定のクリア
希望するメンテナンスウィンドウの開始時間を構成した場合は、Atlas CLI または Atlas UI を使用して 設定をクリアできます。 メンテナンスウィンドウの構成をクリアすると、デフォルトのメンテナンスウィンドウ設定が復元されます。
Atlas UI を使用して構成されたメンテナンスウィンドウをクリアするには、 Set Maintenance Windowの設定をOffに切り替えます。
Atlas CLI を使用して構成されたメンテナンスウィンドウをクリアするには、次のコマンドを実行します。
atlas maintenanceWindows clear [options]
コマンド構文とパラメーターの詳細については、Atlas CLI AtlasmaintenanceWindows clear の ドキュメントを参照してください。
必要なメンテナンスに応答する
When maintenance is required:
Atlas displays a banner in your project's cluster list showing the date and time when the maintenance is scheduled.
Between 48 and 72 hours before the scheduled maintenance, Atlas sends an email to users with the
Project Ownerrole and updates the Atlas UI to display the option to begin maintenance immediately or to defer maintenance for one week.注意
スケジュールされたメンテナンスウィンドウ通知の受信方法を構成するには、「メンテナンスウィンドウ アラートの構成 」を参照してください。
Begin Maintenance Now
To begin maintenance immediately:
Click the banner. A modal window titled Scheduled Maintenance Operations appears. This window describes the content of the currently scheduled maintenace operation.
Click the Begin Now button. In the Start Cluster Maintenance Now modal, confirm by clicking Yes, start my maintenance now.
Atlas CLI を使用してメンテナンスウィンドウを更新するには、次のコマンドを実行します。
atlas maintenanceWindows update [options]
To learn more about the command syntax and parameters, see the Atlas CLI documentation for atlas maintenanceWindows update.
IMPORTANT: To trigger maintenance immediately, pass the --startASAP option.
# Trigger immediate maintenance for the project with the ID # 5e2211c17a3e5a48f5497de3: atlas maintenanceWindows update --startASAP --projectId 5e2211c17a3e5a48f5497de3 --output json
Atlas provides the Update One Maintenance Window for One Project endpoint. You can trigger maintenance immediately by passing in the optional startASAP field with a value of true.
curl --user "${PUBLIC_KEY}:${PRIVATE_KEY}" \ --digest --include \ --header "Accept: application/vnd.atlas.2025-03-12+json" \ --header "Content-Type: application/json" \ -X PATCH "https://cloud.mongodb.com/api/atlas/v2/groups/{groupId}/maintenanceWindow" \ --data ' { "startASAP": true }'
Defer Maintenance
To defer scheduled maintenance:
Click the banner. A modal window titled Scheduled Maintenance Operations appears. This window describes the content of the currently scheduled maintenace operation.
Click the Defer 1 Week button. In the Defer Maintenance to Next Week modal, confirm by clicking Yes, defer maintenance until next week.
Atlas CLI を使用してメンテナンスウィンドウを延期するには、次のコマンドを実行します。
atlas maintenanceWindows defer [options]
コマンド構文とパラメーターの詳細については、 Atlas CLIドキュメントのAtlasメンテナンスウィンドウのデフォルトを参照してください。
Atlas provides the Defer One Maintenance Window for One Project endpoint.
注意
1 つのプロジェクトのメンテナンス イベントは最大 2 回まで延期できます。
メンテナンスWindows中のメンテナンス バージョンのアップグレード
Atlas が次回のメンテナンスウィンドウ中にいずれかのクラスターの MongoDB メンテナンス バージョンをアップグレードする場合、クラスターの カードには対象の MongoDB メンテナンス バージョンが表示されます。