カスタムメタデータを使用して、関連するサーバの照会、フィルタ処理、および比較を行うために、サーバのタグ付けを使用します。OS、ロケーション、階層、所有者、またはその他の関連する基準に基づいて、関連するサーバにタグを付けることができます。サーバタグは、サーバメトリックに追加のコンテキストを提供します。

たとえば、特定のクラスタ内のサーバに対して、展開バージョンのタグを指定できます。その後、これらのタグを使用して、新しい展開時にサーバメトリックの異常を識別します。 

サービスのタグ付けには、サーバの可視性のライセンスが必要です。サーバのタグ付けは、現在、Linux、Windows、および Solaris で利用できます。 

サーバの可視性により、(次の表で説明されている)タグを自動的にインポートできます。

送信元タグコントローラとエージェントの要件
Custom

サーバの可視性で以下をインポートできます。

  • ServerMonitoringConfig.yml で定義されているカスタムタグ。「サーバのタグの定義と表示」を参照してください。
  • Amazon EC2 で定義されているカスタムタグ(Amazon AWS の EC2 リソースのタグ付けに関連するドキュメントを参照してください)。
  • Linux および Windows の Azure 仮想マシン(VM)で定義されているカスタムタグ(Microsoft Azure ドキュメントの「How to tag a VM using the Azure CLI」を参照してください)。
  • ServerMonitoringConfig.yml および Amazon EC2:
    • コントローラ 20.3 以降
    • マシンエージェント 20.1 以降
  • Azure VM:
    • コントローラ 20.3 以降
    • マシンエージェント 22.12 以降
マシンエージェント

次のタグは、サーバダッシュボードの [Tags] に表示されます。

  • OS アーキテクチャ
  • OS カーネル
  • AppDynamics エージェントのバージョン
  • コントローラ 20.3 以降
  • マシンエージェント 20.1 以降
Amazon Web Services

次のタグは、サーバダッシュボードの [Tags] に AWS|<tag> として表示されます。「Amazon Web Services からのタグのインポート」を参照してください。

  • resource-id
  • availability-zone
  • region
  • ami-id
  • instance-type
  • security-group
  • コントローラ 20.3 以降
  • マシンエージェント 20.1 以降
Microsoft Azure

次のタグは、サーバダッシュボードの [Tags] に Azure|<tag> として表示されます。Microsoft Azure タグはデフォルトで有効になっており、コントローラまたはエージェントの設定オプションはありません。

  • vmId
  • location
  • コントローラ 20.3 以降
  • マシンエージェント 22.12 以降
Docker

サーバの可視性により、ユーザ定義のタグとシステムコンテナレベルのタグをインポートできます。これらは [Container Details > Tags] に Docker|<tag> として表示されます。

インポートされるタグの正確なセットは、コンテナが実行されているシステムによって異なります。

  • コントローラ 20.3 以降
  • マシンエージェント 20.1 以降

Kubernetes

OpenShift

サーバの可視性により、ReplicaSet タグとポッドタグをインポートできます。これらは [ Container Details > Tags] に K8s|<tag> として表示されます。
  • コントローラ 20.3 以降
  • マシンエージェント 20.1 以降
ServiceNow CMDB

サーバーの可視性は、構成管理データベース(CMDB)サーバータグをインポートできます。これらは、Container Details > Tags に ServiceNow|<tag> として表示されます。

ServiceNow CMDB タグの構成オプション」を参照してください。

•    コントローラ 20.3 以降
•    マシンエージェント 23.8 以降


コントローラ UI でのタグによるサーバの表示

[Servers] リストでタグによってサーバをフィルタ処理して表示するには、[Filters] を選択して、タグフィルタに必要な条件を追加します。複数の条件を指定すると、フィルタは AND 検索(キーが異なる条件の場合)および OR 検索(キーが同じ条件の場合)を実行します。この例では、次のタグがあるすべてのサーバを表示するタグ条件フィルタを示します。

  1. ECommWeb または ECommInventory に等しい Tier タグ、および
  2. x86_64 に等しい OS Architecture タグ。

Filters and Servers by Tagging

サーバのタグの定義と表示

エージェント設定ディレクトリでキーと値の文字列のセットとしてカスタムタグを指定できます。各エージェントは、デフォルトで最大 50 のタグをサポートできます。

サーバタグを定義するには、次の推奨されるベストプラクティスに従ってください。

エージェントが Amazon Web Services に展開されている場合、エージェントは AWS で定義されているタグを自動検出してインポートできます。また、コントローラは、デフォルトのタグのセットを各サーバに自動的に割り当てます。
カスタムタグの主な使用例は、AWS および自動割り当てタグでまだ指定されていない情報を指定することです。エージェント設定ディレクトリでカスタムタグを指定する前に、現在のタグのセットを確認する必要があります。サーバダッシュボードにアクセスし、ページの下部にある [Tags] ペインを表示します。
Tags Pane

YML ファイルに重複するタグを定義しないように注意してください。

<machine_agent_home>/extensions/ServerMonitoring/ServerMonitoringConfig.yml で次のオプションを設定します。

設定説明

tag

個々のサーバのユーザ定義タグのリスト。これらのタグを使用して、関連するサーバの照会、フィルタ処理、集約、および比較を行うことができます。
各タグは、キーと値のペアによって指定します。最大 127 の Unicode 文字のタグ名と、最大 255 の Unicode 文字のタグ値を定義できます。各キーを別々の行に定義します。すべてのキーと値の文字列は、引用符で囲む必要があります。キーに複数の値がある場合は、カンマを使用してリストを指定します。
<key>: [ <value> ]  
tags:
    'Location': ['NYC', 'Data Center', 'Server Room 7']
    'Environment': ['preProduction']


Amazon Web Services からのタグのインポート

Amazon Web Services についての詳細は、AppDynamics のドキュメントの範囲外です。

サーバの可視性により AWS からタグをインポートできるようになる前に、IAM ロールを設定する必要があります。

  1. AWS コンソールにログインします。https://console.aws.amazon.com/iam/
  2. EC2 タグの読み取りアクセス権を持つロールを作成します。
    特に、このロールには、必要な権限(AmazonEC2ReadOnlyAccess など)が添付された AWS 管理対象ポリシーが必要です。 
  3. このロールを EC2 インスタンスに追加します。
    これらの手順の詳細については、このページで「To create an IAM role using the IAM console」および「Attaching an IAM Role to an Instance」を検索してください。 
  4. Amazon Web Services が有効な状態でマシンエージェントを実行します。

サーバのタグ付けの設定オプション

これらの設定を編集するには、root ユーザのパスワードを使用して、コントローラの管理コンソールにログインします。2023-10-19_05-04-05_Access the Administration Console」を参照してください。

サーバの可視性プロパティ説明デフォルト
sim.machines.tags.enabled

すべてのサーバのサーバタグの有効化または無効化

True
sim.machines.tags.aws.enabledすべてのサーバの AWS タグの収集を有効または無効にしますTrue
sim.machines.tags.aws.pollingInterval

AWS タグのポーリングの間隔(ミリ秒単位)

21600000
(6 時間)

sim.machines.tags.maxPerMachineアカウントごとの一意のタグの最大数50
sim.machines.tags.maxPerAccount

アカウントごとの一意のタグの最大数

500

Docker タグの設定オプション

マシンエージェントは、さまざまなタイプのタグを収集するように設定できます。デフォルトでは、すべてのタグが収集されます。タグの収集をオフにするには、dockerTagsEnabled を "false" に設定します。

  1.  <machine_agent_home>/extensions/DockerMonitoring/DockerMonitoringConfig.yml ファイルを編集します。
  2. containerMonitoringConfig セクションで、dockerTagsEnabled: "false" を設定します。

    # WARNING: Before making any changes to this file read the following section carefully
    # 
    # After editing the file, make sure the file follows the yml syntax. Common issues include
    # - Using tabs instead of spaces
    # - File encoding should be UTF-8
    #
    # The safest way to edit this file is to copy paste the examples provided and make the
    # necessary changes using a plain text editor instead of a WYSIWYG editor.
    #
    
    # samplingInterval indicates how often to gather metric data. Units in milliseconds.
    samplingInterval: 30000
    
    containerMonitoringConfig:
        # containerProcessSelectorRegex defines regular expression to evaluate the processes in
        # each running container to be monitored by the machine agent. The regular expression is
        # compared against each process full command line within running
        # If the pattern matches, then the machine agent start monitoring it.
        containerProcessSelectorRegex: ".*[ ]-Dappdynamics.*"
        dockerTagsEnabled: "false" 
    CODE

AWS タグの設定オプション

マシンエージェントは、さまざまなタイプのタグを収集するように設定できます。デフォルトでは、すべてのタグが収集されます。タグの収集をオフにするには、awsTagsEnabled を "false" に設定します。

  1. <machine_agent_home>/extensions/ServerMonitoring/conf/ServerMonitoring.yml ファイルを編集します。
  2. 次のように設定します。awsTagsEnabled: "false" 

    //ServerMonitoring.yml
    # WARNING: Before making any changes to this file read the following section carefully
    # 
    # After editing the file, make sure the file follows the yml syntax. Common issues include
    # - Using tabs instead of spaces
    # - File encoding should be UTF-8
    #
    # The safest way to edit this file is to copy paste the examples provided and make the
    # necessary changes using a plain text editor instead of a WYSIWYG editor.
    #
    awsTagsEnabled: "false"
    # samplingInterval indicates how often to gather metric data. Units in milliseconds.
    samplingInterval: 30000
    ...
    CODE

Kubernetes および OpenShift タグの設定オプション

マシンエージェントは、さまざまなタイプのタグを収集するように設定できます。デフォルトでは、すべてのタグが収集されます。タグの収集をオフにするには、k8sTagsEnabled を "false" に設定します。

  1. <machine_agent_home>/extensions/ServerMonitoring/conf/ServerMonitoring.yml  ファイルを編集します。
  2. 次のように設定します。k8sTagsEnabled: "false"

    //ServerMonitoring.yml
    # WARNING: Before making any changes to this file read the following section carefully
    # 
    # After editing the file, make sure the file follows the yml syntax. Common issues include
    # - Using tabs instead of spaces
    # - File encoding should be UTF-8
    #
    # The safest way to edit this file is to copy paste the examples provided and make the
    # necessary changes using a plain text editor instead of a WYSIWYG editor.
    #
    k8sTagsEnabled: "false"
    # samplingInterval indicates how often to gather metric data. Units in milliseconds.
    samplingInterval: 30000
    ...
    CODE

ServiceNow CMDB タグの構成オプション

デフォルトでは、タグ収集がグローバルレベルで有効になっている場合でも、マシンエージェントは ServiceNow CMDB タグを収集しません。CMDB タグの収集を有効にするには、次の手順を実行します。

  1. <machine_agent_home>/extensions/ServerMonitoring/conf/ServerMonitoring.yml  ファイルを編集します。
  2. Under the serviceNowTagsConfig: section, set enabled: "true".

  3. ServiceNow cmdb_ci_server テーブルを照会するために必要な OAuth トークン認証の詳細と OAuth URL を指定します。
//ServerMonitoring.yml
serviceNowTagsConfig:
    # the enabled flag, by default this is false, set to true to enable this tags extension
    enabled: false
    # update interval in milliseconds, minimum is 300,000 or 5 minutes, recommended(default) 1200000 or 20 minutes
    samplingInterval: 1200000
    oauthURL: "https://< site >/v1/auth/token"
    clientId: "your client id"
    clientSecret:
      encrypted: false
      value: "your client secret"
    clientScope: "the client scope"
    cmdburl: "https://< service now cmdb host >/now/table/cmdb_ci_server"
    # only override the hostname if the hostid does not match what is in the cmdb
    #hostname: "over ride host name"
CODE