We build our own Docker image based off of datadog/agent. In an attempt to disable several checks that we do not need, we do something like this:
#!/bin/bash
# Remove un-necessary DD checks
# We don't care about monitoring local disk, etc on this agent!
rm -rf /etc/datadog-agent/conf.d/ntp.d/*
rm -rf /etc/datadog-agent/conf.d/cpu.d/*
rm -rf /etc/datadog-agent/conf.d/uptime.d/*
rm -rf /etc/datadog-agent/conf.d/file_handle.d/*
rm -rf /etc/datadog-agent/conf.d/load.d/*
rm -rf /etc/datadog-agent/conf.d/memory.d/*
rm -rf /etc/datadog-agent/conf.d/containerd.d/*
rm -rf /etc/datadog-agent/conf.d/disk.d/*
./init
This script is the entrypoint for our container. The goal is to remove the check configurations, and then start the agent with ./init. This used to work prior to 6.11. Now it seems like the configuration files that I am removing get re-created when we run init.
What is the right way to permanently disable these checks?
Hey @joshuabaird, thanks for reaching out. At a first glance, this looks like it should disable the default checks of the agent, but seems like there's something else going on behind the scenes. Most users will typically either remove those files altogether, or replace the default extension (i.e., mv /etc/datadog-agent/conf.d/cpu.d/conf.yaml.default /etc/datadog-agent/conf.d/cpu.d/conf.yaml.example)
Could open up a support ticket and send us a flare from one of your agents where you would expect these checks to be removed?
We actually used the mv method prior to 6.11. But, something keeps re-writing the configuration files - so we tried to just delete them instead. I'll open a ticket.
Please report back the results of this issue if it gets solved through support.
The way I solved it was by building my own container with:
FROM datadog/agent:latest
ENTRYPOINT find /etc/datadog-agent/conf.d/ -iname "*.yaml.default" -delete; \
./init
Does this mean that one has to remove all checks from different folders of conf.d/* in order to turn off all system checks?
Let's say I want an agent that does some custom http checks but I totally don't care about metrics from environment where it is hosted.
I have a case where we just need to send logs from a host. Using DD_LOGS_ENABLED I can turn on logs, but I can't disable the system checks, which means we get charged for an Infra host even though we just want the logs and not the system metrics. Would be great to have a DD_CHECKS_ENABLED setting we can turn off.
Most helpful comment
I have a case where we just need to send logs from a host. Using
DD_LOGS_ENABLEDI can turn on logs, but I can't disable the system checks, which means we get charged for an Infra host even though we just want the logs and not the system metrics. Would be great to have aDD_CHECKS_ENABLEDsetting we can turn off.