az networkcloud baremetalmachine run-data-extract
コマンドを使用したベアメタル マシンの問題のトラブルシューティング
ユーザーがオンプレミスのベア メタル マシンに関する問題を調査して解決する必要がある場合があります。 Azure Operator Nexus では、az networkcloud baremetalmachine run-data-extract
を介して所定のデータ抽出コマンドのセットが提供されます。 これらのコマンドを使用すると、ユーザーはベア メタル マシンから診断データを取得できます。
このコマンドは、クラスター マネージャーの Azure Storage アカウントにあるデータ抽出の結果を含む出力ファイルを生成します。
開始する前に
- この記事では、Azure コマンド ライン インターフェイスと
networkcloud
コマンド ライン インターフェイス拡張機能がインストールされていることを前提としています。 詳細については、「CLI 拡張機能をインストールする方法」を参照してください。 - ターゲットのベア メタル マシンがオンで、readyState が True に設定されています。
- これらのコマンドの構文は、
az networkcloud
CLI の 0.3.0 以降のバージョンに基づいています。
実行コマンドの実行
データ抽出の実行コマンドは、1 つ以上の定義済みスクリプトを実行して、ベア メタル マシンからデータを抽出します。
サポートされているコマンドの現在の一覧は次のとおりです
Dell のトラブルシューティングのための SupportAssist/TSR コレクション
コマンド名:hardware-support-data-collection
引数: 要求されたログの種類SysInfo
- システム情報TTYLog
- ストレージ TTYLog データDebug
- デバッグ ログ
Microsoft Defender for Endpoints (MDE) エージェント情報を収集する
コマンド名:mde-agent-information
引数: なしMDE 診断サポート ログを収集する
コマンド名:mde-support-diagnostics
引数: なしDell ハードウェア ロールアップの状態を収集する
コマンド名:hardware-rollup-status
引数: なし
コマンド構文は次のとおりです。
az networkcloud baremetalmachine run-data-extract --name "<machine-name>" \
--resource-group "<resource-group>" \
--subscription "<subscription>" \
--commands '[{"arguments":["<arg1>","<arg2>"],"command":"<command1>"}]' \
--limit-time-seconds <timeout>
--commands
オプションで json 形式を使用して複数のコマンドを指定します。 各 command
は、コマンドと引数を指定します。 複数の引数を持つコマンドの場合は、arguments
パラメーターのリストとして指定します。 --commands
構造の構築手順については、「Azure CLI の短縮表現」を参照してください。
これらのコマンドは実行時間が長い場合があるため、--limit-time-seconds
を少なくとも 600 秒 (10 分) に設定することをおすすめします。 Debug
オプションまたは複数の抽出の実行には、10 分以上かかる場合があります。
応答では、操作は非同期的に実行され、HTTP 状態コード 202 が返されます。 コマンドの完了を追跡し、出力ファイルを表示する方法の詳細については、「出力の表示」セクションを参照してください。
ハードウェア サポート データの収集
この例では、hardware-support-data-collection
コマンドを実行し、Dell Server から SysInfo
ログと TTYLog
ログを取得します。 このスクリプトは、指定されたベアメタル マシンで racadm supportassist collect
コマンドを実行します。 結果の tar.gz ファイルには、hardware-support-data-<timestamp>.zip
形式で圧縮された抽出コマンド ファイル出力が含まれています。
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "resourceGroupName" \
--subscription "subscription" \
--commands '[{"arguments":["SysInfo", "TTYLog"],"command":"hardware-support-data-collection"}]' \
--limit-time-seconds 600
hardware-support-data-collection
出力
====Action Command Output====
Executing hardware-support-data-collection command
Getting following hardware support logs: SysInfo,TTYLog
Job JID_814372800396 is running, waiting for it to complete ...
Job JID_814372800396 Completed.
---------------------------- JOB -------------------------
[Job ID=JID_814372800396]
Job Name=SupportAssist Collection
Status=Completed
Scheduled Start Time=[Not Applicable]
Expiration Time=[Not Applicable]
Actual Start Time=[Thu, 13 Apr 2023 20:54:40]
Actual Completion Time=[Thu, 13 Apr 2023 20:59:51]
Message=[SRV088: The SupportAssist Collection Operation is completed successfully.]
Percent Complete=[100]
----------------------------------------------------------
Deleting Job JID_814372800396
Collection successfully exported to /hostfs/tmp/runcommand/hardware-support-data-2023-04-13T21:00:01.zip
================================
Script execution result can be found in storage account:
https://cm2p9bctvhxnst.blob.core.windows.net/bmm-run-command-output/dd84df50-7b02-4d10-a2be-46782cbf4eef-action-bmmdataextcmd.tar.gz?se=2023-04-14T01%3A00%3A15Zandsig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%2BM6rmxDFqXE%3Dandsp=randspr=httpsandsr=bandst=2023-04-13T21%3A00%3A15Zandsv=2019-12-12
収集されたハードウェア サポート ファイルの一覧の例
Archive: TSR20240227164024_FM56PK3.pl.zip
creating: tsr/hardware/
creating: tsr/hardware/spd/
creating: tsr/hardware/sysinfo/
creating: tsr/hardware/sysinfo/inventory/
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_BIOSAttribute.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_Sensor.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_DCIM_View.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_DCIM_SoftwareIdentity.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_Capabilities.xml
inflating: tsr/hardware/sysinfo/inventory/sysinfo_CIM_StatisticalData.xml
creating: tsr/hardware/sysinfo/lcfiles/
inflating: tsr/hardware/sysinfo/lcfiles/lclog_0.xml.gz
inflating: tsr/hardware/sysinfo/lcfiles/curr_lclog.xml
creating: tsr/hardware/psu/
creating: tsr/hardware/idracstateinfo/
inflating: tsr/hardware/idracstateinfo/avc.log
extracting: tsr/hardware/idracstateinfo/avc.log.persistent.1
[..snip..]
MDE エージェント情報の収集
データは mde-agent-information
コマンドで収集され、JSON として /hostfs/tmp/runcommand/mde-agent-information.json
に書式設定されます。 JSON ファイルは、ストレージ アカウントにあるデータ抽出 zip ファイルにあります。 このスクリプトは、指定されたベアメタル マシンで一連の mdatp
コマンドを実行します。
この例では、引数を指定せずに mde-agent-information
コマンドを実行します。
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "resourceGroupName" \
--subscription "subscription" \
--commands '[{"command":"mde-agent-information"}]' \
--limit-time-seconds 600
mde-agent-information
出力
====Action Command Output====
Executing mde-agent-information command
MDE agent is running, proceeding with data extract
Getting MDE agent information for bareMetalMachine
Writing to /hostfs/tmp/runcommand
================================
Script execution result can be found in storage account:
https://cmzhnh6bdsfsdwpbst.blob.core.windows.net/bmm-run-command-output/f5962f18-2228-450b-8cf7-cb8344fdss63b0-action-bmmdataextcmd.tar.gz?se=2023-07-26T19%3A07%3A22Z&sig=X9K3VoNWRFP78OKqFjvYoxubp65BbNTq%2BGnlHclI9Og%3D&sp=r&spr=https&sr=b&st=2023-07-26T15%3A07%3A22Z&sv=2019-12-12
収集された JSON オブジェクトの例
{
"diagnosticInformation": {
"realTimeProtectionStats": $real_time_protection_stats,
"eventProviderStats": $event_provider_stats
},
"mdeDefinitions": $mde_definitions,
"generalHealth": $general_health,
"mdeConfiguration": $mde_config,
"scanList": $scan_list,
"threatInformation": {
"list": $threat_info_list,
"quarantineList": $threat_info_quarantine_list
}
}
MDE サポート診断の収集
mde-support-diagnostics
コマンドから収集されたデータは、MDE Client Analyzer ツールを使用して、mdatp
コマンドと関連ログ ファイルからの情報をバンドルします。 ストレージ アカウントの tgz
ファイルには、mde-support-diagnostics-<hostname>.zip
という名前の zip
ファイルが含まれます。 この zip
は、サポート チームが必要に応じてトラブルシューティングや根本原因分析にログを使用できるようにするために、サポート リクエストと一緒に送信する必要があります。
この例では、引数を指定せずに mde-support-diagnostics
コマンドを実行します。
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "resourceGroupName" \
--subscription "subscription" \
--commands '[{"command":"mde-support-diagnostics"}]' \
--limit-time-seconds 600
mde-support-diagnostics
出力
====Action Command Output====
Executing mde-support-diagnostics command
[2024-01-23 16:07:37.588][INFO] XMDEClientAnalyzer Version: 1.3.2
[2024-01-23 16:07:38.367][INFO] Top Command output: [/tmp/top_output_2024_01_23_16_07_37mel0nue0.txt]
[2024-01-23 16:07:38.367][INFO] Top Command Summary: [/tmp/top_summary_2024_01_23_16_07_370zh7dkqn.txt]
[2024-01-23 16:07:38.367][INFO] Top Command Outliers: [/tmp/top_outlier_2024_01_23_16_07_37aypcfidh.txt]
[2024-01-23 16:07:38.368][INFO] [MDE Diagnostic]
[2024-01-23 16:07:38.368][INFO] Collecting MDE Diagnostic
[2024-01-23 16:07:38.613][WARNING] mde is not running
[2024-01-23 16:07:41.343][INFO] [SLEEP] [3sec] waiting for agent to create diagnostic package
[2024-01-23 16:07:44.347][INFO] diagnostic package path: /var/opt/microsoft/mdatp/wdavdiag/5b1edef9-3b2a-45c1-a45d-9e7e4b6b869e.zip
[2024-01-23 16:07:44.347][INFO] Successfully created MDE diagnostic zip
[2024-01-23 16:07:44.348][INFO] Adding mde_diagnostic.zip to report directory
[2024-01-23 16:07:44.348][INFO] Collecting MDE Health
[...snip...]
================================
Script execution result can be found in storage account:
https://cmmj627vvrzkst.blob.core.windows.net/bmm-run-command-output/7c5557b9-b6b6-a4a4-97ea-752c38918ded-action-bmmdataextcmd.tar.gz?se=2024-01-23T20%3A11%3A32Z&sig=9h20XlZO87J7fCr0S1234xcyu%2Fl%2BVuaDh1BE0J6Yfl8%3D&sp=r&spr=https&sr=b&st=2024-01-23T16%3A11%3A32Z&sv=2019-12-12
実行結果ファイルをダウンロードすると、分析のためにサポート ファイルを解凍できます。
MDE クライアント アナライザーによって収集される情報の一覧の例
Archive: mde-support-diagnostics-rack1compute02.zip
inflating: mde_diagnostic.zip
inflating: process_information.txt
inflating: auditd_info.txt
inflating: auditd_log_analysis.txt
inflating: auditd_logs.zip
inflating: ebpf_kernel_config.txt
inflating: ebpf_enabled_func.txt
inflating: ebpf_syscalls.zip
inflating: ebpf_raw_syscalls.zip
inflating: messagess.zip
inflating: conflicting_processes_information.txt
[...snip...]
ハードウェア ロールアップの状態
データは hardware-rollup-status
コマンドで収集され、JSON として /hostfs/tmp/runcommand/rollupStatus.json
に書式設定されます。 JSON ファイルは、ストレージ アカウントにあるデータ抽出 zip ファイルにあります。 収集されたデータには、マシン サブシステムの正常性が表示されます。
この例では、引数を指定せずに hardware-rollup-status
コマンドを実行します。
az networkcloud baremetalmachine run-data-extract --name "bareMetalMachineName" \
--resource-group "resourceGroupName" \
--subscription "subscription" \
--commands '[{"command":"hardware-rollup-status"}]' \
--limit-time-seconds 600
hardware-rollup-status
出力
====Action Command Output====
Executing hardware-rollup-status command
Getting rollup status logs for b37dev03a1c002
Writing to /hostfs/tmp/runcommand
================================
Script execution result can be found in storage account:
https://cmkfjft8twwpst.blob.core.windows.net/bmm-run-command-output/20b217b5-ea38-4394-9db1-21a0d392eff0-action-bmmdataextcmd.tar.gz?se=2023-09-19T18%3A47%3A17Z&sig=ZJcsNoBzvOkUNL0IQ3XGtbJSaZxYqmtd%3D&sp=r&spr=https&sr=b&st=2023-09-19T14%3A47%3A17Z&sv=2019-12-12
収集された JSON の例
{
"@odata.context" : "/redfish/v1/$metadata#DellRollupStatusCollection.DellRollupStatusCollection",
"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus",
"@odata.type" : "#DellRollupStatusCollection.DellRollupStatusCollection",
"Description" : "A collection of DellRollupStatus resource",
"Members" :
[
{
"@odata.context" : "/redfish/v1/$metadata#DellRollupStatus.DellRollupStatus",
"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus/iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Current",
"@odata.type" : "#DellRollupStatus.v1_0_0.DellRollupStatus",
"CollectionName" : "CurrentRollupStatus",
"Description" : "Represents the subcomponent roll-up statuses.",
"Id" : "iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Current",
"InstanceID" : "iDRAC.Embedded.1#SubSystem.1#Current",
"Name" : "DellRollupStatus",
"RollupStatus" : "Ok",
"SubSystem" : "Current"
},
{
"@odata.context" : "/redfish/v1/$metadata#DellRollupStatus.DellRollupStatus",
"@odata.id" : "/redfish/v1/Systems/System.Embedded.1/Oem/Dell/DellRollupStatus/iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Voltage",
"@odata.type" : "#DellRollupStatus.v1_0_0.DellRollupStatus",
"CollectionName" : "VoltageRollupStatus",
"Description" : "Represents the subcomponent roll-up statuses.",
"Id" : "iDRAC.Embedded.1_0x23_SubSystem.1_0x23_Voltage",
"InstanceID" : "iDRAC.Embedded.1#SubSystem.1#Voltage",
"Name" : "DellRollupStatus",
"RollupStatus" : "Ok",
"SubSystem" : "Voltage"
},
[..snip..]
出力の表示
コマンド実行から tar.gz zip 形式ファイルへのリンクが表示されることに注意してください。 tar.gz ファイル名は、クラスター マネージャー リソース グループのストレージ アカウント内のファイルを識別します。 リンクを使用して、出力 zip ファイルに直接アクセスすることもできます。 tar.gz ファイルには、zip 形式で圧縮された抽出コマンド ファイルの出力も含まれています。 オプションの引数 --output-directory
にディレクトリ パスを指定して、ストレージ BLOB からローカル ディレクトリに出力ファイルをダウンロードします。