我正在使用DataDog Helm图表在我的EKS Kubernetes群集(https://github.com/helm/charts/tree/master/stable/datadog)上安装DataDog代理。我现在遇到的问题是我无法按群集名称过滤日志。我还设置了DD_CLUSTER_NAME
环境变量,但是它似乎没有任何作用。
我在values.yml文件中设置了以下内容:
datadog:
site: datadoghq.com
logLevel: ERROR
logsEnabled: true
logsConfigContainerCollectAll: true
processAgentEnabled: true
apmEnabled: true
nonLocalTraffic: true
leaderElection: true
collectEvents: true
resources:
requests:
cpu: 100m
memory: 100Mi
limits:
cpu: 500m
memory: 500Mi
nodeLabelsAsTags:
beta.kubernetes.io/instance-type: aws_instance_type
kubernetes.io/role: kube_role
podAnnotationsAsTags:
iam.amazonaws.com/role: kube_iamrole
podLabelsAsTags:
app: kube_app
release: helm_release
clusterAgent:
enabled: true
答案 0 :(得分:2)
我相信您正在寻找clusterName
:
https://github.com/helm/charts/blob/master/stable/datadog/values.yaml#L75
您可以将其添加到values.yaml
部分的datadog
中,如下所示:
datadog:
clusterName: myexamplename
答案 1 :(得分:2)
请参考以下命令
helm install --name datadog-monitoring \
--set datadog.apiKey=<DATADOG_API_KEY> \
--set datadog.appKey=<DATADOG_APP_KEY \
--set clusterAgent.enabled=true \
--set clusterAgent.metricsProvider.enabled=true \
--set datadog.clusterName=<CLUSTER_NAME> \
stable/datadog