Download PDF
Download page サーバのタグ付け.
サーバのタグ付け
カスタムメタデータを使用して、関連するサーバの照会、フィルタ処理、および比較を行うために、サーバのタグ付けを使用します。OS、ロケーション、階層、所有者、またはその他の関連する基準に基づいて、関連するサーバにタグを付けることができます。サーバタグは、サーバメトリックに追加のコンテキストを提供します。
たとえば、特定のクラスタ内のサーバに対して、展開バージョンのタグを指定できます。その後、これらのタグを使用して、新しい展開時にサーバメトリックの異常を識別します。
サービスのタグ付けには、サーバの可視性のライセンスが必要です。サーバのタグ付けは、現在、Linux、Windows、および Solaris で利用できます。
サーバの可視性により、(次の表で説明されている)タグを自動的にインポートできます。
送信元 | タグ | コントローラとエージェントの要件 |
---|---|---|
カスタムサーバータグ | サーバの可視性で以下をインポートできます。
|
|
マシンエージェント | 次のタグは、サーバダッシュボードの [Tags] に表示されます。
|
|
Amazon Web Services | 次のタグは、サーバダッシュボードの [Tags] に
|
|
Microsoft Azure | 次のタグは、サーバダッシュボードの [Tags] に
|
|
Docker | サーバの可視性により、ユーザ定義のタグとシステムコンテナレベルのタグをインポートできます。これらは [Container Details > Tags] に インポートされるタグの正確なセットは、コンテナが実行されているシステムによって異なります。「Docker タグの設定オプション」を参照してください。 |
|
Kubernetes OpenShift | サーバの可視性により、ReplicaSet タグとポッドタグをインポートできます。これらは、 Container Details > Tags に K8s|<tag> として表示されます。「Kubernetes および OpenShift タグの設定オプション」を参照してください。 |
|
ServiceNow CMDB | サーバーの可視性は、構成管理データベース(CMDB)サーバータグをインポートできます。これらは、Container Details > Tags に 「ServiceNow CMDB タグの構成オプション」を参照してください。 | • コントローラ 20.3 以降 • マシンエージェント 23.8 以降 |
コントローラ UI でのタグによるサーバの表示
[Servers] リストでタグによってサーバをフィルタ処理して表示するには、[Filters] を選択して、タグフィルタに必要な条件を追加します。複数の条件を指定すると、フィルタは AND 検索(キーが異なる条件の場合)および OR 検索(キーが同じ条件の場合)を実行します。この例では、次のタグがあるすべてのサーバを表示するタグ条件フィルタを示します。
- パフォーマンスデータ
- x86_64 に等しい OS Architecture タグ。
カスタムタグ付け API を使用してカスタムタグをインポートした後、ユーザー定義のタグを表示する際に遅延が発生することがあります。
サーバのタグの定義と表示
エージェント設定ディレクトリでキーと値の文字列のセットとしてサーバータグを指定できます。各エージェントは、デフォルトで最大 50 のタグをサポートできます。
サーバタグを定義するには、次の推奨されるベストプラクティスに従ってください。
エージェントが Amazon Web Services に展開されている場合、エージェントは AWS で定義されているタグを自動検出してインポートできます。また、コントローラは、デフォルトのタグのセットを各サーバに自動的に割り当てます。
サーバータグの主な使用例は、AWS および自動割り当てタグでまだ指定されていない情報を指定することです。エージェント設定ディレクトリでサーバータグを指定する前に、現在のタグのセットを確認する必要があります。サーバダッシュボードにアクセスし、ページの下部にある [Tags] ペインを表示します。YML
ファイルに重複するタグを定義しないように注意してください。
<machine_agent_home>/extensions/ServerMonitoring/conf/ServerMonitoringConfig.yml
で次のオプションを設定します。
設定 | 説明 |
---|---|
| 個々のサーバのユーザ定義タグのリスト。これらのタグを使用して、関連するサーバの照会、フィルタ処理、集約、および比較を行うことができます。 各タグは、キーと値のペアによって指定します。最大 127 の Unicode 文字のタグ名と、最大 255 の Unicode 文字のタグ値を定義できます。各キーを別々の行に定義します。すべてのキーと値の文字列は、引用符で囲む必要があります。キーに複数の値がある場合は、カンマを使用してリストを指定します。 <key>: [ <value> ] tags: 'Location': ['NYC', 'Data Center', 'Server Room 7'] 'Environment': ['preProduction'] |
Amazon Web Services からのタグのインポート
Amazon Web Services についての詳細は、Splunk 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
ユーザのパスワードを使用して、コントローラの管理コンソールにログインします。
サーバの可視性プロパティ | 説明 | デフォルト |
---|---|---|
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 タグの設定オプション
AWS タグの収集を有効にするには、次の手順を実行します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。awsTagsConfig
の場合は、enabled: true
を設定します//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. awsTagsConfig: enabled: true # If enabled it reports the AWS Tags to Controller # update interval in milliseconds, minimum is 6 hours samplingInterval: 21600000
CODE
Microsoft Azure タグの設定オプション
Microsoft Azure タグの収集を有効にするには、次の手順を実行します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。azureTagsConfig: section
で、enabled: "true".
を設定します//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. azureTagsConfig: # If enabled it reports the Azure Tags to Controller enabled: true # update interval in milliseconds, minimum is 6 hours samplingInterval: 21600000
CODE
Kubernetes および OpenShift タグの設定オプション
タグの収集を有効にするには、次の手順を実行します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。k8sTagsConfig: section
で、enabled: "true".
を設定します//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. k8sTagsConfig: #If enabled it reports the Kubernetes Container tags to Controller enabled: true
CODE(オプション)
Master
およびWorker
タグを取得するには、次のクラスタロールを適用する必要があります。クラスタエージェントを実行する前に、このクラスタロールを適用してください。この手順は、クラスタエージェント 24.2.0 以降を使用している場合は適用されません。apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: node-viewer rules: - apiGroups: [""] resources: ["nodes"] verbs: ["get", "list", "watch"]
YMLk8sNodeTagsConfig
の場合は、enabled: true
を設定します//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. k8sNodeTagsConfig: # enabled indicate whether the machine agent should report the k8s Cluster Nodes # If enabled it reports whether the Node is a 'Master' node or 'Worker' node enabled: true
CODE
ServiceNow CMDB タグの構成オプション
デフォルトでは、タグ収集がグローバルレベルで有効になっている場合でも、マシンエージェントは ServiceNow CMDB タグを収集しません。CMDB タグの収集を有効にするには、次の手順を実行します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。serviceNowTagsConfig: section
で、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"
スマートエージェントタグの設定オプション
環境変数に設定されているすべてのスマートエージェントタグのレポートを有効にするには、次の手順を実行します。
<machine_agent_home>
/extensions/ServerMonitoring/conf/ServerMonitoring.yml
ファイルを編集します。Under the smartAgentTagsConfig: section, set enabled: "true".
//ServerMonitoring.yml
smartAgentTagsConfig:
# enabled indicate whether the machine agent should report the Smart agent tags
# If enabled it reports all the smart agent variables set in environment variables (starting with APPDYNAMICS_ENTITY_TAG_ prefix)
enabled: true