How to Disable Metrics Using Kubernetes Agent

Wei LiWei Li admin
edited April 2019 in Knowledgebase Articles
  • Find the scalyr agent container running on your host and login to the agent container.
  • Go to the directory /etc/scalyr-agent-2/agent.d
  • Edit file docker.json by changing report_container_metrics and report_k8s_metrics to "false"
{  // Whether or not to turn on v2 k8s support.  Note, you need to contact Scalyr to turn this on since
  // it requires also turning in a service-side setting.
  "import_vars": [ "SCALYR_K8S_V2", { "var": "SCALYR_DAEMONSETS_AS_DEPLOYMENTS", "default": "true"} ],

      "module": "scalyr_agent.builtin_monitors.kubernetes_monitor",
      "include_deployment_info": "$SCALYR_K8S_V2",
      "report_k8s_metrics": "false",
      "report_container_metrics": "false",
      "k8s_use_v2_attributes": "$SCALYR_K8S_V2",
      "k8s_use_v1_and_v2_attributes": "$SCALYR_K8S_INCLUDE_V1",
      "include_daemonsets_as_deployments": "$SCALYR_DAEMONSETS_AS_DEPLOYMENTS"
  • Once you save your change, you should no longer see metrics generated from that host in Scalyr
  • Use configmap to mount the changes in the agent config files and apply it to the scalyr agent daemonset


Sign In or Register to comment.