Azure AKS での PSA の設定

次のように、Azure AKS での Web モニタリング PSA と API モニタリング PSA を設定します。既存の Kubernetes クラスタで PSA を設定する場合は、「Kubernetes クラスタの作成」セクションをスキップします。

警告: このページには、Azure CLI のマニュアルへのリンクが含まれています。Azure CLI で自身のマニュアルを管理しているため、Splunk AppDynamics では Azure CLI のマニュアルの精度については一切保証しません。
注: PSA は、パブリッククラウドまたはプライベートクラウドの既存の Kubernetes クラスタに展開できます。自動化スクリプトでは、Kubernetes クラスタの作成はサポートされていません。
注:
  • 自動化スクリプトを使用する場合は、Kubernetes クラスタとノードを手動で設定し、PSA を展開する前にコンテナレジストリにログインする必要があります。
  • 別のレジストリを使用する場合は、PSA を展開する前に、自動化スクリプトでレジストリを指定します。
    1. install_psa ファイルを開き、push_images_to_docker_registry() 関数に移動します。

    2. この関数の下で、${DOCKER_REGISTRY_URL}/ の後に、sum-chrome-agentsum-api-monitoring-agent、および sum-heimdall のレジストリ名を指定します。
    3. generate_psa_k8s_deployment() 関数の下で、YAML 値のリポジトリ名を更新します。

  • Kubernetes クラスタノードと同じ OS タイプのホストでイメージをビルドする必要があります。

Kubernetes クラスタの作成

Azure AKS で Kubernetes クラスタを作成するには、次の手順を実行します。

  1. Azure CLI をインストールして認証します
  2. リソースグループを作成するには、次のように入力します。
    CODE
    RESOURCE_GROUP=heimdall-onprem
    az group create --name $RESOURCE_GROUP --location eastus
  3. コンテナレジストリを作成するには、次のように入力します。
    CODE
    ACR_NAME=heimdallonprem
    az acr create --resource-group $RESOURCE_GROUP --name $ACR_NAME --sku Basic
  4. クラスタを作成するには、次のように入力します。
    CODE
    CLUSTER_NAME=heimdall-onprem
    az aks create \
        --resource-group $RESOURCE_GROUP \
        --name $CLUSTER_NAME \
        --enable-managed-identity \
        --kubernetes-version 1.x.x \
        --node-count 4 \
        --node-vm-size Standard_D8s_v3 \
        --generate-ssh-keys \
        --attach-acr $ACR_NAME
    注: 上記のコードの を、サポートされているバージョンのいずれかに置き換えます。サポートされている Kubernetes のバージョンを参照してください。
    注: 上記のコードの と は、推奨される設定タイプに従って選択されます。異なるタイプとノード数で、任意の設定を指定できます。node-vm-size を参照してください。
    注: コマンドを実行するには、Azure サブスクリプションの所有者または管理者である必要があります。

Access the Cluster

To access the Kubernetes cluster, follow theseinstructionsto install kubectl, a utility to interact with the cluster.

To verify that the cluster is running, enter:

CODE
kubectl get nodes

(Optional) Configure Proxy Server

When you configure a proxy server, it applies to all the domains. Configure a proxy server by specifying the proxy server address on the values.yaml file. See Key-Value Pairs Configuration.

To bypass any domains from the proxy server, perform the following steps:

注: Configuring the bypass list is supported only on Web Monitoring PSA.
  1. Open the values.yaml file.
  2. Add the domain URLs in the bypassList field under browserMonitoringAgent:
    CODE
    browserMonitoringAgent:
    enabled: true
    server: "<proxy server address>"
    bypassList: "<specify the domain URLs that you want to bypass separated by semicolon>"
    For example, bypassList: "*abc.com;*xyz1.com;*xyz2.com" Domain URLs that you specify in bypassList are not redirected to the proxy server. You can add any number of domains in the bypassList. All other unspecified domain URLs are redirected to the proxy server.

Configure Proxy Server at a Job Level

You can configure a proxy server and a bypass list for a particular job. Any proxy server URL and bypass list configured at the agent level gets overridden by the proxy server URL and bypass list configured at the job level. Perform the following steps to configure a proxy server at the job level:
  1. Create or edit a Synthetic job.
  2. Select the Run a script option.
  3. Add the following details in the beginning the script:
    CODE
    '''yml
    jobLevelProxyConfig:
      proxyServer: "<proxy-server-address>"
      bypassProxyList: "<list of URLs that you want to bypass, separated by semi-colon>"
    '''
    Example:
    CODE
    '''yml
    jobLevelProxyConfig:
      proxyServer: "http://tinyproxy: tinyproxy.svc.cluster.local:8888"
      bypassProxyList: "*abc.com;*xyz1.com;*xyz2.com"
    '''
    
    pageUrl = "https://help.splunk.com/en"
    driver.get(pageUrl)
    assert "Splunk" in driver.title, "Title should contain Splunk"

Docker イメージのプル

DockerHub から sum-chrome-agent、sum-api-monitoring-agent、sum- heimdall の既成の Docker イメージをプルします。既成イメージには依存ライブラリが含まれているため、インターネットにアクセスできない場合でもこれらのイメージを使用できます。

次のコマンドを実行して、エージェントイメージをプルします。
CODE
docker pull appdynamics/heimdall-psa

docker pull appdynamics/chrome-agent-psa

docker pull appdynamics/api-monitoring-agent-psa

または、Splunk AppDynamics Download Center から .tar ファイルをダウンロードすることもできます。このファイルには、sum-chrome-agent、sum-api-monitoring-agent、sum-heimdall、ignite、および依存ライブラリの事前ビルド済み Docker イメージが含まれています。したがって、インターネットや DockerHub にアクセスできない場合にこれらのイメージを使用できます。

.tar ファイルを解凍し、次のコマンドを使用してイメージをロードします。
  • sum-chrome-agent:
    CODE
    docker load < ${webAgentTag}
  • sum-api-monitoring-agent:
    CODE
    docker load < ${apiAgentTag}
  • sum-heimdall:
    CODE
    docker load < ${heimdallTag}
  • ignite:
    CODE
    docker load < ${igniteTag}
例:
CODE
# Load all Docker images
docker load -i heimdall-25.7.3098.tar
docker load -i api-monitoring-agent-1.0-415.tar
docker load -i chrome-agent-1.0-1067.tar
docker load -i ignite-2.16.0-jdk11.tar
すべてのイメージがロードされていることを確認します。
CODE
docker images | grep -E "(heimdall|api-monitoring|chrome-agent|ignite)"
イメージが正常にロードされると、次のような出力が表示されます。
CODE
```
829771730735.dkr.ecr.us-west-2.amazonaws.com/sum/heimdall                   25.7.3098    abc123def456   2 hours ago     500MB
829771730735.dkr.ecr.us-west-2.amazonaws.com/sum/api-monitoring-agent       1.0-415      def456ghi789   2 hours ago     300MB
829771730735.dkr.ecr.us-west-2.amazonaws.com/sum/chrome-agent               1.0-1067     ghi789jkl012   2 hours ago     800MB
apacheignite/ignite                                                         2.16.0       jkl012mno345   2 hours ago     400MB
```

(オプション)カスタム Python ライブラリの追加

注: このセクションは、Web モニタリング PSA にのみ適用されます。

標準ライブラリセットに加えて、スクリプト測定用のカスタム Python ライブラリをエージェントに追加できます。カスタム Python ライブラリを追加するには、ダウンロードしたベースイメージを使用してイメージをビルドします。

  1. Dockerfile を作成し、Python pip を実行する ディレクティブを作成します。たとえば、 ライブラリをインストールするには、次のように Dockerfile を作成します。
    CODE
    # Use the sum-chrome-agent image you just loaded as the base image
    FROM appdynamics/chrome-agent-psa:<agent-tag>
    
    USER root
    RUN apk add py3-pip
    USER appdynamics
      
    # Install algorithm for python3 on top of that
    RUN python3 -m pip install algorithms==0.1.4 --break-system-packages
    注: 任意の数の ディレクティブを作成して、必要なライブラリをインストールできます。
  2. 新しいイメージをビルドするには、次のように入力します。
    CODE
    docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile
    新しくビルドされたエージェントイメージには、必要なライブラリが含まれています。

イメージのタグ付けとレジストリへのプッシュ

クラスタがアクセスできるように、イメージにタグを付けてレジストリにプッシュする必要があります。クラスタの作成時に ACR_NAME 環境変数を使用する必要があります。

イメージにタグを付けるには、次のように入力します。

Web モニタリング PSA:

CODE
ACR_LOGIN_SERVER=$ACR_NAME.azurecr.io
docker tag appdynamics/heimdall-psa:<heimdall-tag> $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker tag appdynamics/chrome-agent-psa:<agent-tag> $ACR_LOGIN_SERVER/sum-chrome-agent:<agent-tag>

API モニタリング PSA:

CODE
ACR_LOGIN_SERVER=$ACR_NAME.azurecr.io
docker tag appdynamics/heimdall-psa:<heimdall-tag> $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker tag appdynamics/api-monitoring-agent-psa:<agent-tag> $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>

イメージをプッシュするには、次のように入力します。

Web モニタリング PSA:

CODE
az acr login --name $ACR_NAME
docker push $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker push $ACR_LOGIN_SERVER/sum-chrome-agent:<agent-tag>

API モニタリング PSA:

CODE
az acr login --name $ACR_NAME
docker push $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker push $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>

PSA の手動展開

注: Web モニタリング PSA および API モニタリング PSA をインストールするときは、それぞれの該当する一連の手順に必ず従ってください。一部の手順は、両方で共通しています。

イメージがレジストリに登録されると、アプリケーションはクラスタに展開されます。Helm チャートを使用して、必要な順序ですべての Kubernetes リソースを展開および作成します。

  1. こちらの手順に従って、Helm をインストールします。
    1. Apache Ignite ポッドを実行するための新しい名前空間を作成します。
      警告: 最初に Apache Ignite のコマンドを実行してから、Heimdall のコマンドを実行してください。
      Ignite の新しい名前空間を作成するには、次のように入力します。
      CODE
      kubectl create namespace measurement
      Apache Ignite を展開する前に、いくつかの設定オプションを設定する必要があります。設定オプションを表示するには、すでにダウンロードした ignite-psa.tgz ファイルに移動し、次のように入力します。
      CODE
      helm show values ignite-psa.tgz > values-ignite.yaml
      注: 永続化を有効にする場合は、persistence > enabled を設定します。この設定は、オプションです。
  2. 上記の設定を使用して Helm チャートを展開するには、すでにダウンロードした ファイルに移動し、次のように入力します。
    CODE
    helm install synth ignite-psa.tgz --values values-ignite.yaml --namespace measurement
    すべての Kubernetes リソースがクラスタに作成され、Apache Ignite を使用できます。数秒後、Apache Ignite が初期化され、コントローラに表示されます。
  3. ポッドが実行されているかどうかを確認するには、次のように入力します。
    CODE
    kubectl get pods --namespace measurement
    Apache Ignite ポッドが正常に実行された後にのみ、次の手順に進みます。1 つのコマンドを使用して、展開の詳細を含む Helm チャートを展開できます。エージェントを展開するには、以前にダウンロードした zip ファイルの Helm チャート sum-psa-heimdall.tgz を使用します。Private Synthetic Agent を展開する前に、いくつかの設定オプションを設定する必要があります。設定オプションを表示するには、すでにダウンロードした sum-psa-heimdall.tgz ファイルに移動し、次のように入力します。
    CODE
    helm show values sum-psa-heimdall.tgz > values.yaml

    以下は、values.yaml ファイルで編集する必要がある設定キーと値のペアです。

    Web Monitoring PSA:
    設定キー
    heimdall > repository $ACR_LOGIN_SERVER/sum-heimdall
    heimdall > tag <heimdall-tag>
    heimdall > pullPolicy Always
    chromeAgent > repository $ACR_LOGIN_SERVER/sum-chrome-agent
    chromeAgent > tag <agent-tag>
    shepherd > url シェパード URL
    shepherd > credentials ログイン情報
    shepherd > location agent location
    measurementPodMetadata (オプション) enableCustomTolerationsenableCustomAffinity、および enableCustomLabels の値を true に変更して、toleration、affinity、およびラベルを有効にします。
    PYTHON
    measurementPodMetadata:
      enableCustomTolerations: false  # Enable use of custom tolerations from this config
      enableCustomAffinity: false     # Enable use of custom affinity rules from this config
      enableCustomLabels: false      # Enable use of custom labels from this config
      automountServiceAccountToken: false # Automatically mount service account token in pods
      labels: # Custom labels to apply to the Pod metadata
        team: "qa"             # Example: assign pod to QA team
        priority: "high"       # Example: set custom priority level
        app.kubernetes.io/managed-by: "scheduler-service"  # Standard label
      tolerations:
        - key: "dedicated"                      # Tolerate nodes tainted with key=dedicated
          operator: "Equal"                     # Match taint value exactly
          value: "measurement"                  # Accept taint with value=measurement
          effect: "NoSchedule"                  # Allow scheduling on such tainted nodes
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: "kubernetes.io/hostname"  # Node must have this hostname
                    operator: "In"                 # Match exact value
                    values:
                      - "node-1"                   # Only allow node named node-1
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 80                           # Strong preference weight
              preference:
                matchExpressions:
                  - key: "topology.kubernetes.io/zone"  # Prefer node in this zone
                    operator: "In"
                    values:
                      - "us-central1-a"
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: "app"                     # Co-locate with pod having app=frontend
                    operator: "In"
                    values:
                      - "frontend"
              topologyKey: "kubernetes.io/hostname"  # Must be on the same node
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 50                            # Medium preference
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: "app"                   # Prefer proximity to app=logger pods
                      operator: "In"
                      values:
                        - "logger"
                topologyKey: "topology.kubernetes.io/zone"  # Prefer same zone
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: "app"                     # Do NOT schedule with app=backend pods
                    operator: "In"
                    values:
                      - "backend"
              topologyKey: "kubernetes.io/hostname"  # Must not be on same node
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 30                            # Low preference to avoid
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: "env"                   # Prefer to avoid pods in env=production
                      operator: "In"
                      values:
                        - "production"
                topologyKey: "topology.kubernetes.io/region"  # Prefer different region
    createChromePodServiceAccount true を指定して、Web モニタリング Pod のサービスアカウントを作成します。
    API Monitoring PSA:
    設定キー
    heimdall > repository $ACR_LOGIN_SERVER/sum-heimdall
    heimdall > tag <heimdall-tag>
    heimdall > pullPolicy Always
    apiMonitoringAgent > repository $ACR_LOGIN_SERVER/sum-api-monitoring-agent
    apiMonitoringAgent > tag <agent-tag>
    shepherd > url シェパード URL
    shepherd > credentials ログイン情報
    shepherd > location agent location
    measurementPodMetadata (オプション) enableCustomTolerationsenableCustomAffinity、および enableCustomLabels の値を true に変更して、toleration、affinity、およびラベルを有効にします。
    PYTHON
    measurementPodMetadata:
      enableCustomTolerations: false  # Enable use of custom tolerations from this config
      enableCustomAffinity: false     # Enable use of custom affinity rules from this config
      enableCustomLabels: false      # Enable use of custom labels from this config
      automountServiceAccountToken: false # Automatically mount service account token in pods
      labels: # Custom labels to apply to the Pod metadata
        team: "qa"             # Example: assign pod to QA team
        priority: "high"       # Example: set custom priority level
        app.kubernetes.io/managed-by: "scheduler-service"  # Standard label
      tolerations:
        - key: "dedicated"                      # Tolerate nodes tainted with key=dedicated
          operator: "Equal"                     # Match taint value exactly
          value: "measurement"                  # Accept taint with value=measurement
          effect: "NoSchedule"                  # Allow scheduling on such tainted nodes
      affinity:
        nodeAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            nodeSelectorTerms:
              - matchExpressions:
                  - key: "kubernetes.io/hostname"  # Node must have this hostname
                    operator: "In"                 # Match exact value
                    values:
                      - "node-1"                   # Only allow node named node-1
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 80                           # Strong preference weight
              preference:
                matchExpressions:
                  - key: "topology.kubernetes.io/zone"  # Prefer node in this zone
                    operator: "In"
                    values:
                      - "us-central1-a"
        podAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: "app"                     # Co-locate with pod having app=frontend
                    operator: "In"
                    values:
                      - "frontend"
              topologyKey: "kubernetes.io/hostname"  # Must be on the same node
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 50                            # Medium preference
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: "app"                   # Prefer proximity to app=logger pods
                      operator: "In"
                      values:
                        - "logger"
                topologyKey: "topology.kubernetes.io/zone"  # Prefer same zone
        podAntiAffinity:
          requiredDuringSchedulingIgnoredDuringExecution:
            - labelSelector:
                matchExpressions:
                  - key: "app"                     # Do NOT schedule with app=backend pods
                    operator: "In"
                    values:
                      - "backend"
              topologyKey: "kubernetes.io/hostname"  # Must not be on same node
          preferredDuringSchedulingIgnoredDuringExecution:
            - weight: 30                            # Low preference to avoid
              podAffinityTerm:
                labelSelector:
                  matchExpressions:
                    - key: "env"                   # Prefer to avoid pods in env=production
                      operator: "In"
                      values:
                        - "production"
                topologyKey: "topology.kubernetes.io/region"  # Prefer different region
    createApiPodServiceAccount true を指定して、API モニタリング Pod のサービスアカウントを作成します。

    残りの値はデフォルトのままにすることも、要件に基づいて設定することもできます。シェパード URL、ログイン情報、場所、およびオプションのキーと値のペアの詳細については、「Web モニタリング PSA および API モニタリング PSA の設定」を参照してください。

    注:

    Kubernetes クラスタがロックダウンされていて、クラスタ全体の設定を行うことができない場合は、ポッドレベルの変更を行うことができます。

    たとえば、ポッドレベルの DNS サーバー設定を変更して、DNS 名の解決に内部ネームサーバーを使用する場合は、values.yaml ファイルで次の詳細を指定します。

    設定キー
    agentDNSConfig:
    enabled: true
    dnsConfig:
    nameservers: ["4.4.4.4"]
    searches: ["svc.cluster.local", "cluster.local"]
  4. 上記の設定を使用して Helm チャートを展開するには、すでにダウンロードした sum-psa-heimdall.tgz ファイルに移動し、次のように入力します。
    CODE
    helm install heimdall-onprem sum-psa-heimdall.tgz --values values.yaml --namespace measurement
    すべての Kubernetes リソースがクラスタに作成され、Heimdall を使用できます。数秒後、Heimdall が初期化され、コントローラに表示されます。
  5. ポッドが実行されているかどうかを確認するには、次のように入力します。
    CODE
    kubectl get pods --namespace measurement
    初期展開後に values.yaml に変更を加えるには、すでにダウンロードした sum-psa-heimdall.tgz ファイルに移動して、次のように入力します。
    CODE
    helm upgrade heimdall-onprem sum-psa-heimdall.tgz --values values.yaml --namespace measurement
    注:

    展開を削除するには、次のコマンドを実行します。

    CODE
    helm uninstall heimdall-onprem --namespace measurement

    これは、必要でない限り推奨されません。

Deploy PSA in AKS Using the Automation Script

Download the PSA installation zip file from the Splunk AppDynamics Download Center or from the beta upload tool. This file contains Docker files for sum-chrome-agent, sum-api-monitoring-agent, sum-heimdall, Helm charts, and automation scripts. To build an image for sum-chrome-agent, sum-api-monitoring-agent, and sum-heimdall, ensure that Docker is installed. You can download and install Docker from here if it is not installed.

Perform the following steps to install PSA:

  1. Unzip the PSA installation zip file.
  2. Run the following command to install PSA in AKS:
    CODE
    ./install_psa -e kubernetes -l -v -u <Shepherd-URL> -a <EUM-account> -k <EUM-key> -c <location-code> -d <location-description> -t <location-name> -s <location-state> -o <location-country> -i <location-latitude> -g <location-longitude> -p <PSA-tag> -r <heimdall-replica-count> -z <agent-type> -m <chrome-agent_min/max-memory> -n <API-agent_min/max-memory> -x <chrome-agent_min/max-CPU> -y <API-agent_min/max-CPU> -b <heimdall_min/max-memory> -f <heimdall_min/max-CPU> -q <ignite-persistence> -w <heimdall_proxy_server>~<api_monitoring_proxy_server>~<web_monitoring_proxy_server> -B <"bypassURL1;bypassURL2;bypassURL3"> -C true -A <serviceaccount-name> -U <userID> -G <groupID> -N <run_as_a_non-root_user> -F <file_system_groupID> -O <override_the_security_context>
    A sample installation command looks like this:
    CODE
    ./install_psa -e kubernetes -u <Shepherd-URL> -a <EUM-account> -k <EUM-key> -c DEL -d Delhi -t Delhi -s DEL -o India -i 28.70 -g 77.10 -p 23.5 -r 1 -z all -m 100Mi/500Mi -n 100Mi/100Mi -x 0.5/1.5 -y 0.1/0.1 -b 2Gi/2Gi -f 2/2 -q true -w 127.0.0.1:8887~127.0.0.1:8888~127.0.0.1:8889 -B "*abc.com;*xyz1.com;*xyz2.com" -C true -A serviceaccount-name -U 9001 -G 9001 -N true -F 9001 -O true
    The install_psa script can also read parameters from a configuration file, which makes it easier to manage complex installations. Use the following command if you want to install PSA using a .txt configuration file:
    CODE
    ./install_psa --config <path-to-config-file.txt>
    注:
    The installation package contains a sample configuration file named config.sample.txt. You can copy this file and edit the values. Any parameter values specified through command line flags will override the values specified in the text file:
    CODE
    ./install_psa --config production.txt -e kubernetes -r 5 -v
The following table describes the usage of the flags in the command. Asterisk (*) on the description denotes mandatory parameters.
Flag Configuration Key Description
-a EUM_ACCOUNT

*EUM Account

For example, Ati-23-2-saas-nov2

-A SERVICE_ACCOUNT Specify the service account of the sum-chrome-agent and sum-api-monitoring-agent pod.
-b

First value: HEIMDALL_MIN_MEMORY

Second value: HEIMDALL_MAX_MEMORY

*Minimum/Maximum memory in Mi/Gi for sum-heimdall

-B BYPASS_LIST

Specify the domain URLs that you want to bypass from the proxy server.

For example, "*abc.com;*xyz1.com;*xyz2.com"

-c LOCATION_CODE

*Location Code

For example, DEL NY

-C CHROME_PERFORMANCE_LOGS Specify true to enable performance logs on the Chrome browser. The default value is false.
-d LOCATION_DESCRIPTION

*Location Description

For example, 'Delhi, 100001'

-e ENVIRONMENT

*Environment

For example, Docker, Minikube, or Kubernetes.

-f

First value: HEIMDALL_MIN_CPU

Second value: HEIMDALL_MAX_CPU

*Minimum/Maximum CPU for sum-heimdall

-F FS_GROUP Specify the file system group ID of the sum-chrome-agent or sum-api-monitoring-agent container.
-g LOCATION_LONGITUDE

Location Longitude

For example, 77.10

-G RUN_AS_GROUP Specify the group ID that the sum-chrome-agent or sum-api-monitoring-agent container should run as.
-i LOCATION_LATITUDE

Location Latitude

For example, 28.70

-k EUM_KEY

*EUM Key

For example, 2d35df4f-92f0-41a8-8709-db54eff7e56c

-l LOAD_IMAGES Load images to the Minkube environment
-m

First value: CHROME_MIN_MEMORY

Second value: CHROME_MAX_MEMORY

*Minimum/Maximum memory in Mi/Gi for sum-chrome-agent

-n

First value: API_MIN_MEMORY

Second value: API_MAX_MEMORY

*Minimum/Maximum memory in Mi/Gi for sum-api-monitoring-agent

-N RUN_AS_NON_ROOT Specify if the sum-chrome-agent or sum-api-monitoring-agent container should run as a non-root user. The default value is true.
-o LOCATION_COUNTRY

*Location Country

For example, India, United States

-O OVERRIDE_SECURITY_CONTEXT_FOR_WEB_API_MON Specify true to override the security context for Web and API monitoring. The default value is false.
-p TAG

*PSA release tag

For example, 23.12

-q IGNITE_PERSISTENCE Specify true or false to enable or disable Ignite Persistence.
-r HEIMDALL_REPLICA *Heimdall replica count
-s LOCATION_STATE

*Location State

For example, CA

-t LOCATION_CITY

*Location City

For example, Delhi

-u EUM_URL

*Shepherd URL

For example, https://sum-shadow-master-shepherd.saas.appd-test.com/

For the list of Shepherd URLs, See Shepherd URL.

-U RUN_AS_USER Specify the user ID that the sum-chrome-agent or sum-api-monitoring-agent container should run as.
-v VERBOSE Debug mode
-w

First value: HEIMDALL_PROXY

Second value: API_MON_PROXY

Third value: WEB_MON_PROXY

Specify the proxy servers for Heimdall, API, and Web monitoring, separated by a tilde(~).

If you do not need to set up any proxy server, you can leave it blank.

-x

First value: CHROME_MIN_CPU

Second value: CHROME_MAX_CPU

*Minimum/Maximum CPU for sum-chrome-agent

-y

First value: API_MIN_CPU

Second value: API_MAX_CPU

*Minimum/Maximum CPU for sum-api-monitoring-agent

-z AGENT_TYPE

*Agent type

For example, web, api, or all

Kubernetes クラスタのモニタリング

ダウンロードした zip 内の Helm チャート sum-psa-monitoring.tgz により、モニタリングスタックがインストールされます。この Helm チャートは、Private Simple Synthetic Agent をモニタするためのカスタム Grafana ダッシュボードとともに kube-prometheus-stack をインストールします。
注: この展開のモニタリングはオプションです。ただし、クラスタをモニターして正常性を定期的に確認することを強く推奨します。

Install the Monitoring Stack

  1. To create a separate monitoring namespace, enter:
    CODE
    kubectl create namespace monitoring
    To review configuration options, enter:
    CODE
    helm show values sum-psa-monitoring.tgz > values-monitoring.yaml
    This generates a values-monitoring .yaml file that contains all the configuration options. To modify and pass the generated values-monitoring .yaml file while installing the Helm chart, enter:
    CODE
    helm install psa-monitoring sum-psa-monitoring.tgz --values values-monitoring.yaml --namespace monitoring
  2. After the monitoring stack is installed, you can Launch Grafana (which runs inside the cluster) to view the dashboard. To access Grafana from outside of the cluster, you can configure port forwarding or set up Ingress. To configure port forward to access it locally, enter:
    CODE
    kubectl port-forward svc/psa-monitoring-grafana 3000:80 --namespace monitoring
  3. Launch localhost:3000 from the browser and log in using the default credentials with username as admin and password as prom-operator. A dashboard named Private Simple Synthetic Agent displays and provides details about the Kubernetes cluster, Apache Ignite, Heimdall, and running measurements.

Uninstall PSA

To uninstall PSA, run the following command:

CODE
./uninstall_psa -e kubernetes -p

Upgrade PSA in Azure AKS

Pull the Docker Image

Pull the pre-built docker images for sum-chrome-agent, sum-api-monitoring-agent, and sum-heimdall from DockerHub. The pre-built images include the dependent libraries, so you can use these images even when you do not have access to the Internet.

Run the following commands to pull the agent images:

CODE
docker pull appdynamics/heimdall-psa
docker pull appdynamics/chrome-agent-psa
docker pull appdynamics/api-monitoring-agent-psa

Add Custom Python Libraries

This is an optional step. In addition to the available standard set of libraries, you can add custom Python libraries to the agent to use in scripted measurements. You build a new image based on the image you loaded as the base image.

  1. Create a Dockerfile and then create RUN directives to run pythonpip. For example, to install the library algorithms you can create a Dockerfile:

    CODE
    # Use the sum-chrome-agent image you just loaded as the base image
    FROM appdynamics/chrome-agent-psa:<agent-tag>
    USER root
    RUN apk add py3-pip
    USER appdynamics
    # Install algorithm for python3 on top of that
    RUN python3 -m pip install algorithms==0.1.4 --break-system-packages
    Note: You can create any number of RUN directives to install the required libraries.
  2. To build the new image, run the following commands:

    Web Monitoring PSA:

    CODE
    docker build -t sum-chrome-agent:<agent-tag> - < Dockerfile

    API Monitoring PSA:

    CODE
    docker build -f Dockerfile-PSA -t sum-api-monitoring-agent:<agent-tag> .

    You must build the images on the host with the same OS type of Kubernetes cluster nodes. For example, if you are pushing the image to AWS, then run the following command:

    CODE
    docker buildx build -f Dockerfile-PSA --platform=linux/amd64 -t sum-api-monitoring-agent:<api-tag> .

    The newly built agent image contains the required libraries.

Tag and Push Images to the Registry

Note: Managed Kubernetes services, such as EKS or AKS, provide container registries where you can push your image. No other configuration is needed. Kubernetes cluster within EKS or AKS will have the access to these images.

You must tag and push the images to a registry for the cluster to access them. You have to use the ACR_NAME environment variable while creating the cluster.

To tag the images, enter:

CODE
ACR_LOGIN_SERVER=$ACR_NAME.azurecr.io
docker tag sum-heimdall:<heimdall-tag> $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker tag sum-chrome-agent:<agent-tag> $ACR_LOGIN_SERVER/sum-chrome-agent:<agent-tag>
docker tag sum-api-monitoring-agent:<agent-tag> $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>

To push the images, enter:

CODE
az acr login --name $ACR_NAME
docker push $ACR_LOGIN_SERVER/sum-heimdall:<heimdall-tag>
docker push $ACR_LOGIN_SERVER/sum-chrome-agent:<agent-tag>
docker push $ACR_LOGIN_SERVER/sum-api-monitoring-agent:<agent-tag>

Update the Helm Chart

Follow these steps and update the configuration key-value pairs in the values.yaml file:

Upgrade the PSA

Note: From PSA 23.12 onwards, you must deploy Ignite and Heimdall in a single namespace named measurement.
  1. Navigate to the new Linux distribution folder and run the following command:

    CODE
    helm install synth ignite-psa.tgz --values values-ignite.yaml --namespace measurement
  2. Wait until the status of Ignite pods changes to running. Then, run the following command:

    CODE
    helm upgrade heimdall-onprem sum-psa-heimdall.tgz --values values.yaml --namespace measurement
  3. After the status of the new Heimdall and Ignite pods changes to running, uninstall the old Ignite namespace:

    CODE
    helm uninstall synth -n ignite