Splunk AppDynamics 階層名戦略
tierNameStrategy プロパティを次の値のいずれかに割り当てて 戦略を選択します。手動戦略
デフォルトでは、tierNameStrategy は手動となり、デプロイメント名または tierName パラメータを使用して階層名を設定します。
tierNameが指定されていない場合は、デプロイメント名をtiernameとして使用します。tierNameがインストゥルメンテーション ルールで指定されている場合は、それを使用します。
たとえば、次の仕様で、<deployment name> は ecom および groceries 名前空間に適用されるデフォルトの階層名であり、BookStore は books 名前空間に適用される階層名です。
apiVersion: cluster.appdynamics.com/v1alpha1
kind: Clusteragent
metadata:
name: k8s-cluster-agent
namespace: appdynamics
spec:
appName: "<cluster-name>"
# ...
# auto-instrumentation config
instrumentationMethod: Env
nsToInstrumentRegex: ecom|books|groceries
tierNameStrategy: manual
instrumentationRules:
- namespaceRegex: books
tierName: BookStore
ラベル戦略
このオプションでは、階層名の戦略として label パラメータを使用します。label オプションを使用するには、tierNameLabel パラメータに値を指定します。tierNameLabel 値は、ワークロード仕様で指定されたラベルを参照します。
spec.tierNameLabelが指定されている場合は、インストゥルメンテーション ルールで上書きされない限り、これを使用します。tierNameLabelがインストゥルメンテーション ルールで指定されている場合は、それを使用します。
たとえば、次の仕様では、ワークロード仕様のラベル tiername を使用して ecom と groceries 名前空間の階層名を設定し、ラベル tier を books 名前空間で使用します。
apiVersion: cluster.appdynamics.com/v1alpha1
kind: Clusteragent
metadata:
name: k8s-cluster-agent
namespace: appdynamics
spec:
appName: "<cluster-name>"
# ...
# auto-instrumentation config
instrumentationMethod: Env
nsToInstrumentRegex: ecom|books|groceries
tierNameStrategy: label
tierNameLabel: tiername
instrumentationRules:
- namespaceRegex: books
tierNameLabel: tier
次の導入仕様のスニペットに示すように、ラベル tiername を設定する ecom または groceries 名前空間に導入されたアプリケーションの場合、コントローラのダッシュボードで eCommerce 階層にレポートされます。
apiVersion: apps/v1
kind: Deployment
metadata:
name: ecom-app
labels:
tiername: eCommerce
spec:
...