Download PDF
Download page サーバのタグ付け.
サーバのタグ付け
カスタムメタデータを使用して、関連するサーバの照会、フィルタ処理、および比較を行うために、サーバのタグ付けを使用します。OS、ロケーション、階層、所有者、またはその他の関連する基準に基づいて、関連するサーバにタグを付けることができます。サーバタグは、サーバメトリックに追加のコンテキストを提供します。
たとえば、特定のクラスタ内のサーバに対して、展開バージョンのタグを指定できます。その後、これらのタグを使用して、新しい展開時にサーバメトリックの異常を識別します。
サービスのタグ付けには、サーバの可視性のライセンスが必要です。サーバのタグ付けは、現在、Linux、Windows、および Solaris で利用できます。
サーバの可視性により、(次の表で説明されている)タグを自動的にインポートできます。
送信元 | タグ | コントローラとエージェントの要件 |
---|---|---|
Custom | サーバの可視性で以下をインポートできます。
|
|
マシンエージェント | 次のタグは、サーバダッシュボードの [Tags] に表示されます。
|
|
Amazon Web Services | 次のタグは、サーバダッシュボードの [Tags] に
|
|
Microsoft Azure | 次のタグは、サーバダッシュボードの [Tags] に
|
|
Docker | サーバの可視性により、ユーザ定義のタグとシステムコンテナレベルのタグをインポートできます。これらは [Container Details > Tags] に インポートされるタグの正確なセットは、コンテナが実行されているシステムによって異なります。 |
|
Kubernetes OpenShift | サーバの可視性により、ReplicaSet タグとポッドタグをインポートできます。これらは [ Container Details > Tags] に K8s|<tag> として表示されます。 |
|
ServiceNow CMDB | サーバーの可視性は、構成管理データベース(CMDB)サーバータグをインポートできます。これらは、Container Details > Tags に 「ServiceNow CMDB タグの構成オプション」を参照してください。 | • コントローラ 20.3 以降 • マシンエージェント 23.8 以降 |
コントローラ UI でのタグによるサーバの表示
[Servers] リストでタグによってサーバをフィルタ処理して表示するには、[Filters] を選択して、タグフィルタに必要な条件を追加します。複数の条件を指定すると、フィルタは AND 検索(キーが異なる条件の場合)および OR 検索(キーが同じ条件の場合)を実行します。この例では、次のタグがあるすべてのサーバを表示するタグ条件フィルタを示します。
- ECommWeb または ECommInventory に等しい Tier タグ、および
- x86_64 に等しい OS Architecture タグ。
サーバのタグの定義と表示
エージェント設定ディレクトリでキーと値の文字列のセットとしてカスタムタグを指定できます。各エージェントは、デフォルトで最大 50 のタグをサポートできます。
サーバタグを定義するには、次の推奨されるベストプラクティスに従ってください。
エージェントが Amazon Web Services に展開されている場合、エージェントは AWS で定義されているタグを自動検出してインポートできます。また、コントローラは、デフォルトのタグのセットを各サーバに自動的に割り当てます。
カスタムタグの主な使用例は、AWS および自動割り当てタグでまだ指定されていない情報を指定することです。エージェント設定ディレクトリでカスタムタグを指定する前に、現在のタグのセットを確認する必要があります。サーバダッシュボードにアクセスし、ページの下部にある [Tags] ペインを表示します。YML
ファイルに重複するタグを定義しないように注意してください。
<machine_agent_home>/extensions/ServerMonitoring/ServerMonitoringConfig.yml
で次のオプションを設定します。
設定 | 説明 |
---|---|
| 個々のサーバのユーザ定義タグのリスト。これらのタグを使用して、関連するサーバの照会、フィルタ処理、集約、および比較を行うことができます。 各タグは、キーと値のペアによって指定します。最大 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 ロールを設定する必要があります。
- AWS コンソールにログインします。https://console.aws.amazon.com/iam/
- EC2 タグの読み取りアクセス権を持つロールを作成します。
特に、このロールには、必要な権限(AmazonEC2ReadOnlyAccess など)が添付された AWS 管理対象ポリシーが必要です。 - このロールを EC2 インスタンスに追加します。
これらの手順の詳細については、このページで「To create an IAM role using the IAM console」および「Attaching an IAM Role to an Instance」を検索してください。 - 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 |
sim.machines.tags.maxPerMachine | アカウントごとの一意のタグの最大数 | 50 |
sim.machines.tags.maxPerAccount | アカウントごとの一意のタグの最大数 | 500 |
Docker タグの設定オプション
マシンエージェントは、さまざまなタイプのタグを収集するように設定できます。デフォルトでは、すべてのタグが収集されます。タグの収集をオフにするには、dockerTagsEnabled
を "false
" に設定します。
<machine_agent_home>/extensions/DockerMonitoring/DockerMonitoringConfig.yml
ファイルを編集します。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
" に設定します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。次のように設定します。
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
" に設定します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。次のように設定します。
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 タグの収集を有効にするには、次の手順を実行します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。Under the serviceNowTagsConfig: section, set enabled: "true".
- 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"