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

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

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

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

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

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

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

次のタグは、サーバダッシュボードの [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 以降
Docker

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

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

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

Kubernetes

OpenShift

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


コントローラ 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 ユーザのパスワードを使用して、コントローラの管理コンソールにログインします。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