Chargement des journaux AOT à partir des composants principaux de CVAD

Si vous avez configuré le serveur de journaux en mode HTTPS https://<LogServerFQDN>:port, assurez-vous que le certificat nécessaire est correctement installé et approuvé sur votre système.

  1. Chargement des journaux AOT depuis Storefront™

    #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. Chargement des journaux AOT depuis le DDC :

    #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. Activer AOT sur le VDA Windows :

Depuis la machine où vous avez installé le DDC, exécutez les commandes ci-dessous, puis redémarrez le service Citrix Desktop pour que les modifications prennent effet immédiatement.

```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--> ```

Mettre à jour lorsque l’adresse ou le port du serveur de journaux a changé :

```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--> ```

Comment désactiver :

```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. Activer AOT directement sur le VDA Windows :

Exécutez la commande directement sur la machine (VDA Windows) où vous souhaitez charger AOT. Cela ne prendra effet que sur la machine où la commande est appliquée.

```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--> ```

Affichage et utilisation des journaux AOT

Accès aux journaux via le serveur de journaux

Pour sécuriser vos journaux, vous aurez besoin d’une clé d’authentification avant de les télécharger. Voici la marche à suivre :

  1. Obtenez votre clé d’authentification – Utilisez votre propre nom de rôle/nom pour la générer.
  2. Exécuter localement – Les scripts ne peuvent s’exécuter que sur la machine où le conteneur Docker est installé.
  3. Utilisateurs Windows – Utilisez les scripts GetAuthKey.bat au lieu des scripts shell.
  4. Télécharger les journaux – Une fois authentifié, vous pouvez récupérer vos journaux en toute sécurité.

    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-->
    

Répertorier les noms des machines qui ont déjà envoyé leurs journaux AOT au serveur de journaux :

```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--> ```

Télécharger les journaux par nom de machine et plage horaire. L’heure est au format 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--> ```

Télécharger les journaux par filtre de mot(s)-clé(s). L’heure est au format UTC :

Remarque :

  • Un mot-clé peut être un seul mot ou une combinaison de mots.
  • Les mots-clés peuvent correspondre n’importe où dans le message du journal.
  • Un ID de transaction peut également être utilisé comme mot-clé.
```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--> ```
Chargement des journaux AOT à partir des composants principaux de CVAD