Disable
Disable Infrastructure Monitoring (Infra)β
By default, UniAgent will enable infrastructure monitoring for all Nodes in the cluster.
To disable infrastructure monitoring for a specific Node, set the label: tingyun-infra-monitor=disabled.
kubectl label node [Node name] tingyun-infra-monitor=disabled
Disable Application Monitoring (APM)β
-
To disable monitoring for a specific deployment/daemonset/statefulset/pod, annotate the label
tingyun-agent-injected: "true"in the yaml, and redeploy the application that has already been injected. -
To disable monitoring for all applications under a Namespace, set the Namespace label:
tingyun-injection=disabled, and redeploy the applications that have already been injected.kubectl label namespace [namespace of the application] tingyun-injection=disabled -
To disable monitoring for all applications in the entire Kubernetes cluster, set the global configuration switch of UniAgent to
apm_enabled: false, and redeploy the applications that have already been injected.After modifying the configuration, it will take effect dynamically, but there will be a certain delay. The delay time depends on the kubelet startup parameter
--sync-frequency, which defaults to 1 minute. Therefore, after updating the contents of the ConfigMap, you need to wait about 2 minutes.-
Recommended method: Modify the yaml file used for Agent installation.
Set
apm_enabledin tingyun-common-config in tingyunagent.yaml tofalse.# Global configuration, required
# configmap
# tingyun-common
apiVersion: v1
kind: ConfigMap
metadata:
name: tingyun-common-config
namespace: tingyun
data:
tingyun-common.yaml: |
infra_dc: http://10.128.2.95:11001
apm_dc: http://10.128.2.95:7071
apm_enabled: true
apm_aggressive: falseThen update using the yaml file.
kubectl apply -f tingyunagent.yaml -
Command method: If the yaml file used for installation has been lost, use the following command.
kubectl edit configmap tingyun-common-config -n tingyunYou will see an interface similar to the following. Set
apm_enabledin tingyun-common.yaml tofalse, save and exit.apiVersion: v1
data:
tingyun-common.yaml: |
infra_dc: http://10.128.2.95:11001
apm_dc: http://10.128.2.95:7071
apm_enabled: true
apm_aggressive: false
-