StoreFront

Citrix Analytics Service

Citrix Cloudをご利用中でオンプレミスのStoreFront展開環境をお持ちの場合、データがCitrix CloudのCitrix Analytics Serviceに送信されるようにStoreFrontを構成できます。構成後は、Citrix WorkspaceアプリおよびWebブラウザーがユーザーイベントを処理するためにCitrix Analyticsに送信します。Citrix Analyticsは、ユーザー、アプリケーション、エンドポイント、ネットワーク、データに関する測定値を集約して、ユーザーの行動に関する包括的な分析情報を提供します。Citrix Analyticsドキュメントでこの機能について確認するには、「StoreFrontを使用したVirtual Apps and Desktopsサイトへのオンボード」を参照してください。

この機能を構成するには、以下を実行します:

  • Citrix Analyticsから構成ファイルをダウンロードします。
  • Citrix AnalyticsデータをPowerShellを使用してオンプレミスのStoreFront展開にインポートします。

StoreFrontの構成後は、Citrix Analytics Serviceが要求した時にCitrix WorkspaceアプリがStoreFrontのストアからデータを送信できます。

重要:

この機能が正しく動作し、モニターサービスを消費するには、使用中のStoreFront展開がポート443の次のアドレスと通信できるようにする必要があります:

  • https://*.cloud.com
  • https://*.citrixdata.com

Citrix Analyticsから構成ファイルをダウンロードする

重要:

初期構成には、機密情報を含む構成ファイルが必要です。ダウンロード後はファイルを安全に保管してください。このファイルを組織外の人と共有しないでください。構成後、このファイルは削除できます。別のマシンに構成を再適用する必要がある場合は、Citrix Analytics Service管理コンソールからファイルを再度ダウンロードできます。

  1. 管理者アカウントでモニター(https://citrix.cloud.com/)にログオンします。
  2. モニター顧客を選択します。
  3. [管理] をクリックして、Citrix Analytics Service管理コンソールを開きます。

    Analyticsタイル

  4. Citrix Analytics Service管理コンソールで、[Settings]>[Data Sources] を選択します。
  5. Virtual App and Desktopsカードで、()メニューアイコン、[Connect StoreFront deployment] の順に選択します。
  6. [Connect StoreFront Deployment]ページで [Download File] を選択してStoreFrontConfigurationFile.jsonファイルをダウロードします。

構成ファイルの例

{
  "customerId": "<yourcloudcustomer>",
  "enablementService": " https://api.analytics.cloud.com /casvc/<yourcloudcustomer>/ctxana/v1/cas/<yourcloudcustomer>/XenDesktop/<deviceid>/dsconfigdata",
  "cwsServiceKey": "PFJTPn…….. T4=",
  "enablementServiceStatus": " https://api.analytics.cloud.com /casvc/<yourcloudcustomer>/ctxana/v1/cas/storefront/config",
  "instanceId": "d98f21d0-56e0-11e9-ba52-5136d90862fe",
  "name": "CASSingleTenant"
}
<!--NeedCopy-->

customerIdは、最新のモニターの顧客用の一意のIDです。

cwsServiceKeyは、最新のモニターの顧客を特定する一意のキーです。

instanceIDは、Citrix WorkspaceアプリからCitrix Analyticsに対して送信された要求に署名(セキュリティ保護済み)するために生成されたIDです。複数のStoreFrontサーバーまたはサーバーグループをモニターに登録すると、それぞれに一意のinstanceIDが割り当てられます。

Citrix AnalyticsデータをStoreFront展開にインポートする

  1. StoreFrontConfigurationFile.jsonファイルをオンプレミスのStoreFrontサーバー(またはStoreFrontサーバーグループのいずれかのサーバー)の適切なフォルダーにコピーします。以下のコマンドは、ファイルがデスクトップに保存されている場合です。
  2. PowerShell ISEを開き、[管理者として実行] を選択します。
  3. 次のコマンドを実行します:

    Import-STFCasConfiguration -Path "$Env:UserProfile\Desktop\StoreFrontConfigurationFile.json"
    Get-STFCasConfiguration
    <!--NeedCopy-->
    
  4. このコマンドはインポートされたデータのコピーを返し、それをPowerShellコンソールに表示します。

    get stf cas configuration

注:

Windows Server 2012 R2にインストールされているオンプレミスStoreFrontサーバーでは、C++ランタイムソフトウェアコンポーネントを手動でインストールしてCASに登録できるようにする必要があります。Citrix Virtual Apps and Desktopsのインストール中にStoreFrontがインストールされる場合、CVADメタインストーラーがC++ランタイムコンポーネントをインストールするため、この手順は不要です。C++ランタイムのないCitrixStoreFront-x64.exeメタインストーラーでStoreFrontがインストールされている場合、CAS構成ファイルのインポート後、モニターへの登録に失敗する場合があります。

Citrix AnalyticsのデータをStoreFrontサーバーグループに伝達する

StoreFrontサーバーグループでこれらの操作を実行している場合は、インポートされたCitrix Analyticsデータをサーバーグループの全メンバーに伝達する必要があります。この手順は、単一のStoreFrontサーバー展開では必要ありません。

データを伝達するには、以下のいずれかの方法を使用します:

  • StoreFront管理コンソールを使用します。
  • PowerShellコマンドレットPublish-STFServerGroupConfigurationを使用します。

StoreFrontサーバーグループIDを確認する

Citrix Analytics Serviceに正常に登録されたかどうかを確認するには、PowerShellを使用して展開のServerGroupIDを検出します。

  1. StoreFrontサーバー、またはサーバーグループ内の1台のStoreFrontサーバーにログオンします。
  2. PowerShell ISEを開き、[管理者として実行] を選択します。
  3. 次のコマンドを実行します:

    $WebConfigPath = "C:\Program Files\Citrix\Receiver StoreFront\Framework\FrameworkData\Framework.xml"
    $XMLObject = (Get-Content $WebConfigPath) -as [Xml]
    $XMLObject.framework.properties.property
    <!--NeedCopy-->
    

    たとえば、これらのコマンドは次のような出力結果を生成します:

    name value
    ---- -----
    ClusterId 8b8ff5c8-44ba-46e4-87f0-2df8cff31432
    HostBaseUrl https://storefront.example.com/
    SelectedIISWebSiteId 1
    AdminConsoleOperationMode Full
    <!--NeedCopy-->
    

StoreFrontからCitrix Analyticsへのデータの送信を停止する

  1. PowerShell ISEを開き、[管理者として実行] を選択します。
  2. 次のコマンドを実行します:

    Remove-STFCasConfiguration

    Get-STFCasConfiguration

    以前にインポートされたCitrix Analyticsデータの削除に成功した場合、Get-STFCasConfigurationは値を返しません。

  3. StoreFrontサーバーグループでこれらの操作を実行している場合は、変更を伝達し、インポートされたCitrix Analyticsデータをサーバーグループの全メンバーから削除する必要があります。サーバーグループ内の1台のサーバーで、次のコマンドを実行します:

    Publish-STFServerGroupConfiguration

  4. 他のサーバーグループメンバーで次のコマンドを実行して、Citrix Analytics構成がグループ内のすべてのサーバーから正常に削除されたことを確認します:

    Get-STFCasConfiguration

  5. 管理者アカウントでモニター(https://citrix.cloud.com/)にログオンします。
  6. モニター顧客を選択します。
  7. [管理] をクリックして、Citrix Analytics Service管理コンソールを開きます。
  8. Citrix Analytics Service管理コンソールで、[Settings]>[Data Sources] を選択します。
  9. Virtual App and Desktopsカードで、StoreFrontの展開数を選択します:

    StoreFrontサーバーグループ

  10. ホストベースURLおよびServerGroupIDを参照して削除対象のStoreFront展開を特定します。
  11. )メニューで、[Remove StoreFront deployment from Analytics] を選択します。

    StoreFrontサーバーグループ

注:

サーバー側で構成を削除する一方、Citrix Analyticsからは削除しない場合、StoreFront展開のエントリはCitrix Analyticsに残るものの、StoreFrontからはデータを受信しません。Citrix Analyticsからのみ構成を削除する場合、StoreFront展開のエントリは次回のアプリプールの再利用時(IISのリセット時、または自動で24時間ごと)に再度追加されます。

Webプロキシを使用してCitrix Cloudに接続し、Citrix Analyticsに登録するようにStoreFrontを構成する

StoreFrontがWebプロキシの背後のホストWebサーバーに配置されている場合、Citrix Analyticsへの登録は失敗します。StoreFront管理者がCitrix展開でHTTPプロキシを使用する場合、インターネットへのStoreFrontトラフィックはクラウド内のCitrix Analyticsに到達する前にWebプロキシを通過する必要があります。StoreFrontは、ホストOSのプロキシ設定を自動的に使用しません。Webプロキシを介してトラフィックを送信するようストアに指示するには、さらに構成が必要です。ストアのweb.configファイルに新しいセクションを追加して<system.net>プロキシ設定を構成できます。Citrix Analyticsへのデータ送信に使用されるStoreFrontサーバー上のすべてのストアに対してこれを実行します。

方法1:Powershellで1つまたは複数のストアでプロキシ構成を設定する(推奨)

PowershellスクリプトConfig-StoreProxy.ps1を実行すると、1つまたは複数のストアでこのプロセスを自動化し、<system.net>を構成する有効なXMLが自動的に挿入されます。また、このスクリプトは現在のユーザーのデスクトップにストアのweb.configファイルのバックアップを作成し、必要な場合変更されていないweb.configファイルを復元できるようにします。

注:

スクリプトを複数回実行すると、複数の<system.net>XMLのコピーが追加されます。ストアごとに<system.net>のエントリは1つのみにする必要があります。複数のコピーを追加すると、ストアのプロキシ構成が正しく機能しなくなります。

  1. PowerShell ISEを開き、[管理者として実行] を選択します。

  2. $Stores = @("Store","Store2")を設定してWebプロキシで構成するストアを含めます。

  3. 次のいずれかを指定します:

    • IPアドレス、または
    • WebプロキシのFQDN
  4. 次のPowerShellを実行します:

    $Stores = @("Store","Store2")
    $ProxyIP = "10.0.0.1"
    $ProxyFQDN = "proxyserver.example.com"
    $ProxyPort = 8888
    
    # Set this for every Store using Stores array
    function Set-StoreProxyServer() # Tested with both IP and FQDN
    {
        [CmdletBinding()]
        param([Parameter(Mandatory=$true,ParameterSetName="ProxyIP")][Parameter(Mandatory=$true,ParameterSetName="ProxyFQDN")][array]$Stores,
            [Parameter(Mandatory=$true,ParameterSetName="ProxyIP")][string]$ProxyIP,
            [Parameter(Mandatory=$true,ParameterSetName="ProxyFQDN")][string]$ProxyFQDN,
            [Parameter(Mandatory=$true,ParameterSetName="ProxyIP")][Parameter(Mandatory=$true,ParameterSetName="ProxyFQDN")][int]$ProxyPort)
    
        foreach($Store in $Stores)
        {
            Write-Host "Backing up the Store web.config file for store $Store before making changes..." -ForegroundColor "Yellow"
            Write-Host "`n"
    
            if(!(Test-Path "$env:UserProfile\desktop$Store"))
            {
                Write-Host "Creating $env:UserProfile\desktop$Store\ directory for backup..." -ForegroundColor "Yellow"
                New-Item -Path "$env:UserProfile\desktop$Store" -ItemType "Directory" | Out-Null
                Write-Host "`n"
            }
    
            Write-Host "Copying c:\inetpub\wwwroot\Citrix$Store\web.config to $env:UserProfile\desktop$Store..." -ForegroundColor "Yellow"
            Copy-Item -Path "c:\inetpub\wwwroot\Citrix$Store\web.config" -Destination "$env:UserProfile\desktop$Store" -Force | Out-Null
    
            if(Test-Path "$env:UserProfile\desktop$Store\web.config")
            {
                Write-Host "$env:UserProfile\desktop$Store\web.config file backed up" -ForegroundColor "Green"
            }
            else
            {
                Write-Host "$env:UserProfile\desktop$Store\web.config file NOT found!" -ForegroundColor "Red"
            }
            Write-Host "`n"
    
            Write-Host "Setting the proxy server to $ProxyAddress for Store $Store..." -ForegroundColor "Yellow"
            Write-Host "`n"
    
            $StoreConfigPath = "c:\inetpub\wwwroot\Citrix$Store\web.config"
            $XMLObject = (Get-Content $StoreConfigPath) -as [Xml]
    
            if([string]::IsNullOrEmpty($ProxyFQDN))
            {
                $ProxyServer = ("HTTP://$ProxyIP"+":"+$ProxyPort)
            }
            else
            {
                $ProxyServer = ("HTTP://$ProxyFQDN"+":"+$ProxyPort)
            }
    
            $XMLObject = (Get-Content $StoreConfigPath) -as [Xml]
    
            # Create 3 elements
            $SystemNet = $XMLObject.CreateNode("element","system.net","")
            $DefaultProxy = $XMLObject.CreateNode("element","defaultProxy","")
            $Proxy = $XMLObject.CreateNode("element","proxy","")
            $Proxy.SetAttribute("proxyaddress","$ProxyServer")
            $Proxy.SetAttribute("bypassonlocal","true")
    
            # Move back up the XML tree appending new child items in reverse order
            $DefaultProxy.AppendChild($Proxy)
            $SystemNet.AppendChild($DefaultProxy)
            $XMLObject.configuration.AppendChild($SystemNet)
    
            # Save the modified XML document to disk
            $XMLObject.Save($StoreConfigPath)
    
            Write-Host "Getting the proxy configuration for c:\inetpub\wwwroot\Citrix$Store..." -ForegroundColor "Yellow"
            $XMLObject = (Get-Content $StoreConfigPath) -as [Xml]
            $ConfiguredProxyServer = $XMLObject.configuration.'system.net'.defaultProxy.proxy.proxyaddress | Out-Null
            Write-Host ("Configured proxy server for Store $Store"+": "+ $ConfiguredProxyServer) -ForegroundColor "Green"
            Write-Host "`n"
        }
        Write-Host "Restarting IIS..." -ForegroundColor "Yellow"
        IISReset /RESTART
    }
    
    Set-StoreProxyServer -Stores $Stores -ProxyFQDN $ProxyFQDN -ProxyPort $ProxyPort
    # OR
    Set-StoreProxyServer -Stores $Stores -ProxyIP $ProxyIP -ProxyPort $ProxyPort
    <!--NeedCopy-->
    
  5. C:\inetpub\wwwroot\Citrix< Store>\web.configでweb.configファイルの最後に新しい<system.net>セクションが含まれていることを確認します。

            </dependentAssembly>
        </assemblyBinding>
    </runtime>
    <system.net>
        <defaultProxy>
        <proxy proxyaddress="HTTP://proxyserver.example.com:8888" bypassonlocal="true" />
        </defaultProxy>
    </system.net>
    </configuration>
    <!--NeedCopy-->
    
  6. Citrix AnalyticsデータをStoreFront展開にインポートする」の説明に従って、Citrix Analyticsデータをインポートします。

方法2:手動で<system.net>セクションをストアのweb.configファイルに追加する

これは、Citrix Analyticsにデータを送信するために使用されるStoreFrontサーバー上のすべてのストアに対して実行する必要があります。

  1. ストアのweb.configファイルのバックアップを作成し、C:\inetpub\wwwroot\Citrix< Store>\web.config以外の別の場所にコピーします。

  2. FQDNとポート番号の組み合わせかIPとポート番号の組み合わせを使用して、以下のXMLでプロキシ設定を編集します。

    たとえば、FQDNとポート番号の組み合わせでは、以下のような<system.net>要素を使用します:

    <system.net>
        <defaultProxy>
        <proxy proxyaddress="HTTP://proxyserver.example.com:8888" bypassonlocal="true" />
        </defaultProxy>
    </system.net>
    <!--NeedCopy-->
    

    たとえば、IPとポート番号の組み合わせでは、以下のような<system.net>要素を使用します:

    <system.net>
        <defaultProxy>
        <proxy proxyaddress="HTTP://10.0.0.1:8888" bypassonlocal="true" />
        </defaultProxy>
    </system.net>
    <!--NeedCopy-->
    
  3. ストアのweb.configファイルの最後に、以下のように適切な<system.net>要素を挿入します:

    <runtime>
    <gcServer enabled="true" />
    <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
        <dependentAssembly>
        <assemblyIdentity name="System.Web.MVC" publicKeyToken="31BF3856AD364E35" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-5.0.0.0" newVersion="5.0.0.0" />
        </dependentAssembly>
        <dependentAssembly>
        <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
        <bindingRedirect oldVersion="0.0.0.0-9.0.0.0" newVersion="9.0.0.0" />
        </dependentAssembly>
    </assemblyBinding>
    </runtime>
    
    Insert the <system.net> element here
    
    </configuration>
    <!--NeedCopy-->
    
  4. Citrix AnalyticsデータをStoreFront展開にインポートする」の説明に従って、Citrix Analyticsデータをインポートします。