CVADコアコンポーネントからのAOTログのアップロード

ログサーバーをHTTPSモード https://<LogServerFQDN>:port で構成している場合は、必要な証明書がシステムに適切にインストールされ、信頼されていることを確認してください。

  1. Storefront™からのAOTログのアップロード

    #Enable uploading in HTTP
    
    Set-STFDiagnosticsLogServer -Server LogServerFQDN:8080
    
    #Or to use HTTPS
    
    Set-STFDiagnosticsLogServer -Server https://LogServerFQDN:8443
    
    #Disable
    
    Clear-STFDiagnosticsLogServer
    
    #The configuration will take effect in one hour. To apply the changes immediately, restart the Citrix Telemetry Service.
    <!--NeedCopy-->
    
  2. DDCからのAOTログのアップロード:

    #Enable uploadng in HTTP
    Set-ConfigSite -LogServerEnabled $true -LogServerName LogServerFQDN -LogServerPort 8080
    
    #Or enable HTTPS
    Set-ConfigSite -LogServerEnabled $true -LogServerName https://LogServerFQDN -LogServerPort 8443
    #Disable HTTP
    Set-ConfigSite -LogServerEnabled $false -LogServerName LogServerFQDN -LogServerPort 8080
    #Disable HTTPS
    Set-ConfigSite -LogServerEnabled $false -LogServerName https://LogServerFQDN -LogServerPort 8443
    <!--NeedCopy-->
    
  3. ウィンドウズ VDA での AOT の有効化:

DDCをインストールしたマシンから以下のコマンドを実行し、その後、Citrix Desktop Serviceを再起動してすぐに有効にする必要があります。

```bash
#Initiate, run following commands in DDC powershell
$configSlot = New-BrokerConfigurationSlot -Name VdaAotTracing -Description VdaAotTracing -SettingsGroup G=Telemetry


#If using HTTPS, parameter of -Endpoint should be "https://logserverFQDN:8443"
$policy = New-BrokerLogServerAddress -Enabled $true -Endpoint "logserverFQDN:8080"
$mc = New-BrokerMachineConfiguration -ConfigurationSlotUid $configSlot.Uid -LeafName VdaAotTracing -Policy $policy


# Using the real DeliverygroupName of your VDA.
$dg = Get-BrokerDesktopGroup -Name "DeliverygroupName"
Add-BrokerMachineConfiguration -InputObject $mc -DesktopGroup $dg


#Restart Citrix Desktop Service in your VDA to make it take effect immediately.
<!--NeedCopy--> ```

ログサーバーのアドレスまたはポートが変更された場合の更新:

```bash
#Update, run following commands in DDC powershell
#If using HTTPS, parameter of -Endpoint should be "https://NewLogServerFQDN:8443"


$policy = New-BrokerLogServerAddress -Enabled $true -Endpoint "NewLogServerFQDN:8443"
Set-BrokerMachineConfiguration -Name "VdaAotTracing\VdaAotTracing" -Policy $policy
$mc=Get-BrokerMachineConfiguration -Name "VdaAotTracing\VdaAotTracing"

# Using the real DeliverygroupName of your VDA.
$dg = Get-BrokerDesktopGroup -Name "DeliverygroupName"
Add-BrokerMachineConfiguration -InputObject $mc -DesktopGroup $dg
#Restart Citrix Desktop Service in your VDA to make it take effect immediately.
<!--NeedCopy--> ```

無効にする方法:

```bash
#Disable, run following commands in DDC powershell


#If using HTTPS, parameter of -Endpoint should be "https://LogServerFQDn:8443"
$policy = New-BrokerLogServerAddress -Enabled $false -Endpoint "LogServerFQDN:8080"
Set-BrokerMachineConfiguration -Name "VdaAotTracing\VdaAotTracing" -Policy $policy
$mc=Get-BrokerMachineConfiguration -Name "VdaAotTracing\VdaAotTracing"

# Using the real DeliverygroupName of your VDA.
$dg = Get-BrokerDesktopGroup -Name "DeliverygroupName"
Add-BrokerMachineConfiguration -InputObject $mc -DesktopGroup $dg

#Restart Citrix Desktop Service in your VDA to make it take effect immediately.

<!--NeedCopy--> ```
  1. WindowsVDAでAOTを直接有効にする:

AOTをアップロードしたいマシン(WindowsVDA)で直接コマンドを実行します。これは、コマンドが適用されたマシンでのみ有効になります。

```bash
# Enable AOT uploading for Windows VDA
#If using HTTPS, parameter of -AotDataStoreEndpoint should be "https://LogServerFQDN:8443"

Enable-CitrixAOTUpload -AotDataStoreEndpoint LogServerFQDN:8443 -Role WVDA

# Disable AOT uploading
Disable-CitrixAOTUpload
<!--NeedCopy--> ```

AOTログの表示と使用

ログサーバー経由でのログへのアクセス

ログを安全に保つには、ダウンロードする前にAuthKeyが必要です。手順は次のとおりです。

  1. AuthKeyを取得する – 独自のロール名/名前を使用して生成します。
  2. ローカルで実行 – スクリプトは、Dockerコンテナがインストールされているマシンでのみ実行できます。
  3. Windowsユーザー – シェルスクリプトの代わりにGetAuthKey.batスクリプトを使用します。
  4. ログをダウンロード – 認証されると、安全にログを取得できます。

    For Linux
    ./GetAuthKey.sh role-name
    {"key":"ebac9b7726cb4be597c92c6769134d25","role":"role-name","status":"DONE"}
    
    For Windows
    GetAuthKey.bat role-name
    {"key":"ebac9b7726cb4be597c92c6769134d25","role":"role-name","status":"DONE"}
    
    #Save the key: ebac9b7726cb4be597c92c6769134d25 by yourself. It's the only way to get the key.
    <!--NeedCopy-->
    

既にAOTログをログサーバーに送信したマシン名をリスト表示します:

```bash
#The parameter is the key get from GetAuthKey.sh
For linux:
./ListMachines.sh ebac9b7726cb4be597c92c6769134d25
{"machines":["MachineName"]}
#Empty machines means that there has no log

For Windows:
ListMachines.bat ebac9b7726cb4be597c92c6769134d25
{"machines":["MachineName"]}
#Empty machines means that there has no log
<!--NeedCopy--> ```

マシン名と時間範囲でログをダウンロードします。時刻はUTC形式です。

```bash
#Usage: ./DownloadLogsByTime.sh [AuthKey] [MachineName] [StartTime] [EndTime] [OutputFile]
#Example:

For Linux
./DownloadLogsByTime.sh ebac9b7726cb4be597c92c6769134d25 MachineName 2025-01-01T00:00:00Z 2025-01-02T00:00:00Z logs.csv

For Windows
DownloadLogsByTime.bat ebac9b7726cb4be597c92c6769134d25 MachineName 2025-01-01T00:00:00Z 2025-01-02T00:00:00Z logs.csv
<!--NeedCopy--> ```

キーワードフィルターでログをダウンロードします。時刻はUTC形式です:

注:

  • キーワードは、単一の単語または単語の組み合わせにすることができます。
  • キーワードはログメッセージ内のどこでも一致させることができます。
  • トランザクションIDもキーワードとして使用できます。
```bash
#Usage: ./DownloadLogsByWords.sh [AuthKey] [StartTime] [EndTime] [SearchWords] [OutputFile]

#Example:
For Linux:
./DownloadLogsByWords.sh authkey 2025-01-01T00:00:00.000Z 2025-12-31T23:59:59.999Z "session launch" logs.csv

For Windows:
DownloadLogsByWords.bat authkey 2025-01-01T00:00:00.000Z 2025-12-31T23:59:59.999Z "failed vda" logs.csv
<!--NeedCopy--> ```
CVADコアコンポーネントからのAOTログのアップロード

この記事の概要