データベース クエリによって CCMA プランの状況を監視するための MySQL 構文
プラットフォームの注記: Cloud のみ - This article only applies to Atlassian apps on the クラウド プラットフォーム上のアトラシアン製品にのみ適用されます。
要約
参照リンク
その他のデータベースの SQL 構文
MySQL (this article)
関連する機能リクエスト
CCMA への組み込みを希望する場合は、機能リクエストに投票してください。
このガイドでは、Confluence Server/Data Center から Atlassian Cloud への移行に対する CCMA プランの進捗や完了の状況を確認するための、MySQL 構文の SQL クエリを提供しています。
インスタンスが MySQL データベースを実行しているのでない場合は、上部にある他のデータベース構文へのリンクをご覧ください。
移行するデータセットによっては、UI でプランのステータスが更新されるまでに時間がかかる場合があります。
管理者は、次のクエリを実行することで、すでに移行されたもの、または以前に移行されたものについて最新の状況を把握できます。
ソリューション
制限事項
The information on this page is provided for informational purposes only, and will not be directly supported by Atlassian, should you wish to pursue possible workarounds in light of this limitation.
This information is not actively maintained and should be thoroughly tested before applying it to any production environment.
SQL クエリ
SELECT p.planName AS "Plan Name"
, s.stepConfig AS "Entity"
, p.startTime AS "Plan Created"
, p.endTime AS "Plan Ended"
, ROUND((TIMESTAMPDIFF(SECOND, p.startTime, p.endTime) / 3600), 2) AS "Plan Duration (hours)"
, s.taskId AS "Task ID"
, s.stepType AS "Step Name"
, s.startTime AS "Task Started"
, s.endTime AS "Task Ended"
, ROUND((TIMESTAMPDIFF(SECOND, s.startTime, s.endTime) / 3600), 2) AS "Step Duration (hours)"
, s.executionStatus AS "Task Status"
, s.completionPercent AS "Task Completion Percent"
FROM MIG_PLAN p
INNER JOIN MIG_STEP s ON (p.id = s.planId)
ORDER BY p.startTime, s.startTime出力 (クエリ)
次の例に示すような出力が表示されるはずです (実行しているデータベースによって異なる)。

Monitoring with the watch command
If you want to have the query run automatically in a Linux terminal, you can use the watch command. Example below (with psql):
クエリの実行を監視する watch コマンド
# save the query in a text file
# run the watch command with the psql client executing the file
# the command below will run execute the file where you saved the query, every 0.5 seconds
# -n - interval of execution
# -t - suppress the watch header output
# -d - highlights any changes in the output
# the date command is just so you can see what time it is
# the echo command is to print a blank line before the SQL output
watch -n0.5 -t -d "date ; echo ; psql -h <DB host> -p <DB port> -U <DB username> <DB database name> -f <file with the query>.sql"Output (watch command)

その他の SQL
プランの合計移行時間の取得:
SELECT p.planName AS "Plan Name"
, p.startTime AS "Plan Created"
, p.endTime AS "Plan Ended"
, SUM(ROUND((TIMESTAMPDIFF(SECOND, s.startTime, s.endTime) / 3600), 2)) AS "Step Duration (hours)"
INNER JOIN MIG_STEP s ON (p.id = s.planId)
WHERE p.id = '<Plan-ID>'
GROUP BY p.planName, p.startTime, p.endTime;プラン内の各スペースのレポートの取得:
SELECT p.planName AS "Plan Name"
, p.startTime AS "Plan Created"
, p.endTime AS "Plan Ended"
, ROUND((TIMESTAMPDIFF(SECOND, p.startTime, p.endTime) / 3600), 2) AS "Plan Duration (hours)"
, t.spacekey AS "Space Key"
, SUM(ROUND((TIMESTAMPDIFF(SECOND, s.startTime, s.endTime) / 3600), 2)) AS "Step Duration (hours)"
FROM MIG_PLAN p
INNER JOIN MIG_STEP s ON (p.id = s.planId)
INNER JOIN MIG_TASK t ON (s.taskid = t.id)
WHERE p.id = '<Plan-ID>'
GROUP BY p.planName, p.startTime, p.endTime,t.spaceKey
ORDER BY t.spaceKey;プラン内の各スペースの詳細レポートの取得:
SELECT p.planName AS "Plan Name"
, p.startTime AS "Plan Created"
, p.endTime AS "Plan Ended"
, ROUND((TIMESTAMPDIFF(SECOND, p.startTime, p.endTime) / 3600), 2) AS "Plan Duration (hours)"
, t.spacekey AS "Space Key"
, s.stepType AS "Step Name"
, s.startTime AS "Task Started"
, s.endTime AS "Task Ended"
, ROUND((TIMESTAMPDIFF(SECOND, s.startTime, s.endTime) / 3600), 2) AS "Step Duration (hours)"
, s.executionStatus AS "Task Status"
, s.completionPercent AS "Task Completion Percent"
FROM MIG_PLAN p
INNER JOIN MIG_STEP s ON (p.id = s.planId)
INNER JOIN MIG_TASK t ON (s.taskid = t.id)
WHERE p.id = '<Plan-ID>'
ORDER BY p.startTime, s.startTime;この内容はお役に立ちましたか?