<p>we have the datadog agent <a href="https://docs.datadoghq.com/containers/guide/kubernetes_daemonset/" rel="nofollow noreferrer">manually setup on our Kubernetes Cluster</a> which helped us forwarding Logs and APM from our application containers into DataDog.</p>
<p>Recently we noticed the biggest item in our bill is &quot;On-Demand Infrastructure Container Hours&quot;. Which seems to be related to this view: <a href="https://i.stack.imgur.com/9ILMh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9ILMh.png" alt="enter image description here" /></a></p>
<p>We really do not use that at all, and maybe we integrated incorrectly but right now we get no value out of it.</p>
<p>Is there a way of getting the Logs and APM from containers, but avoiding the big bill on this feature?</p>
<p>In the table on the manual installation it seems metrics is non-optional for the Agent. And I'm guessing this is what &quot;metrics&quot; is.</p>
<p><a href="https://i.stack.imgur.com/8y1x0.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/8y1x0.png" alt="enter image description here" /></a></p>

chamini2
<p>As per <a href="https://docs.datadoghq.com/account_management/billing/pricing/#infrastructure-monitoring" rel="nofollow noreferrer">Datadog docs</a>, there are following items in the Infrastructure moniroting:</p>
<ul>
<li>containers (in case of k8s: pods)</li>
<li>hosts (in case of k8s: nodes)</li>
<li>etc.</li>
</ul>
<p>What you're showing in the screenshot is the list of <strong>Hosts</strong>.</p>
<p>But the billing item &quot;On-Demand Infrastructure Container Hours&quot; refers to <strong>Containers</strong>.</p>
<p>To disable infra monitoring for some containers, you'd need to exclude them via the DD_CONTAINER_EXCLUDE env variable. <a href="https://docs.datadoghq.com/containers/guide/autodiscovery-management/?tab=containerizedagent" rel="nofollow noreferrer">See the docs</a></p>
<p>E.g. to exclude ALL containers:</p>
<pre><code>DD_CONTAINER_EXCLUDE = &quot;name:.*&quot;
</code></pre>
<p>Bonus:
To also disable <strong>Hosts</strong> monitoring there's a less obvious configuration that needs to be applied (<a href="https://docs.datadoghq.com/logs/guide/how-to-set-up-only-logs/?tab=kubernetes" rel="nofollow noreferrer">see docs</a>) - add the following env variables to disable certain payloads:</p>
<pre><code>env:
  - name: DD_ENABLE_PAYLOADS_EVENTS
    value: &quot;false&quot;
  - name: DD_ENABLE_PAYLOADS_SERIES
    value: &quot;false&quot;
  - name: DD_ENABLE_PAYLOADS_SERVICE_CHECKS
    value: &quot;false&quot;
  - name: DD_ENABLE_PAYLOADS_SKETCHES
    value: &quot;false&quot;
</code></pre>
<p>However as per docs, it may affect the logs collecting, so please verify if it affects your particular case.</p>
