<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>article Dynatrace Operator - Cloud Native Full Stack - Pod Injection Validation and Troubleshooting in Troubleshooting</title>
    <link>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/ta-p/264697</link>
    <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H1&gt;&lt;SPAN&gt;Summary&lt;/SPAN&gt;&lt;/H1&gt;
&lt;P&gt;&lt;SPAN&gt;This article is to help identify potential blockers to deep monitoring pod-contained apps within Kubernetes clusters.&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Before we get started, we expect there to already be a Dynatrace Operator deployment in your cluster. If needed, &lt;A href="https://docs.dynatrace.com/docs/shortlink/installation-k8s-cloud-native-fs#installation-options" target="_self"&gt;see our documentation for deployment details&lt;/A&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/installation-k8s-cloud-native-fs#installation-options&amp;nbsp;" target="_self"&gt;.&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;You can learn more about controlling Pod Monitoring while using Dynatrace Operator Cloud Native Full Stack from our docs here:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/guides/operation/annotate" target="_self"&gt;Configure monitoring for namespaces and pods&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Troubleshooting Pod Injections&lt;/H1&gt;
&lt;H2&gt;Step 1 - Validate Namespace&lt;/H2&gt;
&lt;P&gt;The first step of Pod injection is adding labels to application namespaces. Namespace labels can be listed using:&lt;/P&gt;
&lt;PRE&gt;kubectl describe namespace &amp;lt;application namespace&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Look for the label: &lt;CODE&gt;dynakube.internal.dynatrace.com/instance&lt;/CODE&gt;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;C:\Users\ryan.korteway&amp;gt;kubectl describe ns default
Name:         default
Labels:       dynakube.internal.dynatrace.com/instance=sup-enablement-k8s-cnfs
Annotations:  &amp;lt;none&amp;gt;
Status:       Active&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If you DO see this label but no deep monitoring data, move on to step 2.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If you do NOT see this label, then,&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;validate that communication between the Dynatrace namespace / pods and the kube-system namespace is functional
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/network#ingress-traffic&amp;nbsp;" target="_self"&gt;See this page of Dynatrace Namespace Networking docs&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Collect a Dynatrace Operator support archive before reaching out to Dynatrace Support.
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/troubleshooting#support-archive" target="_self"&gt;How to collect a Dynatrace Operator Support Archive.&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;It is essential to send the whole archive, and not to just send the logs. Configuration and diagnostic runtime information is also collected, and extremely valuable to speed up the investigation of your reported issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Additionally, you can validate Namespace Labels within containerized process properties and tags dropdowns / pop-out menus within the Dynatrace UI:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alternative sensoring.png" style="width: 945px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/25242iDF4A97DEBF1CEE68/image-size/large?v=v2&amp;amp;px=999" role="button" title="alternative sensoring.png" alt="alternative sensoring.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;DIV id="1733706463.644729" class="c-virtual_list__item" tabindex="0" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1733706463.644729"&gt;
&lt;DIV class="c-message_kit__background c-message_kit__background--hovered p-message_pane_message__message c-message_kit__message p-message_pane_message__message--last" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover c-message_kit__hover--hovered" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--above"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;H3 class="p-rich_text_section"&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H2 class="p-rich_text_section"&gt;Step 2 - Validate Pods&lt;/H2&gt;
&lt;DIV class="p-rich_text_section"&gt;The next step is to describe the pod and look for signs of pod-level injection from the Dynatrace Webhook pods.&lt;/DIV&gt;
&lt;PRE class="p-rich_text_section"&gt;kubectl describe pod tomcat-10-deployment-5498c479d4-5hhjf -n default&lt;/PRE&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;BR /&gt;Look for the &lt;CODE&gt;dynatrace-operator init container&lt;/CODE&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&lt;SUP&gt;[1]&lt;/SUP&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;being present, and if it finished successfully:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;Controlled By:  ReplicaSet/tomcat-10-deployment-5498c479d4
Init Containers:
   dynatrace-operator:
    Container ID:  containerd://0ba7ca10b2d0554566c60611da43d6feb310aff829e6313c76226b658bfda093
    Image:         public.ecr.aws/dynatrace/dynatrace-operator:v1.5.1
    Image ID:      public.ecr.aws/dynatrace/dynatrace-operator@sha256:4b0994d8bd1d4723760f793421959377de391600de74104913ef1b1905d986ae
    Port:            &amp;lt;none&amp;gt;
    Host Port:       &amp;lt;none&amp;gt;
    SeccompProfile:  RuntimeDefault
    Args:
      init
    State:          Terminated
      Reason:       Completed
      Exit Code:    0​&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;With the right configuration, such as having &lt;STRONG&gt;metadataEnrichment&lt;/STRONG&gt; enabled but a &lt;STRONG&gt;namespaceSelector&lt;/STRONG&gt; at the &lt;STRONG&gt;oneAgent cloudNativeFullStack&lt;/STRONG&gt; level, its possible to have an install-oneagent (operator version &amp;lt; 1.4.0) or dynatrace-operator (operator version &amp;gt; 1.4.0) init container but &lt;STRONG&gt;no&lt;/STRONG&gt; deep monitoring for the pods.&lt;BR /&gt;&lt;BR /&gt;As such, other key items to watch for are the &lt;CODE&gt;LD_PRELOAD&lt;/CODE&gt; environment variable and the volume mounts for &lt;CODE&gt;/opt/dynatrace/oneagent-paas&lt;/CODE&gt; volumes:&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;Containers:
  tomcat10-container:
    Container ID:  containerd://409633c542b9d1fa6b3e93231cc61f17a1ce4e12dd49a5c4156936338ec07de6
    Image:         tomcat:10
    Image ID:      docker.io/library/tomcat@sha256:0e763cfc66a42679d63132ceacfbf7082a219c0385ca75f85baf3294e76bacf7
    Port:          8080/TCP
    Host Port:     0/TCP
    Command:
      /bin/sh
      -c
      echo 'Hello from Kubernetes!' &amp;amp;
      catalina.sh run

    State:          Running
      Started:      Fri, 06 Dec 2024 12:53:02 -0500
    Ready:          True
    Restart Count:  0
    Environment:
      DT_CUSTOM_PROP:          cnfs_cluster location_us_east
      DT_RELEASE_STAGE:        cloudNativeFullStack
      DT_DEPLOYMENT_METADATA:  orchestration_tech=Operator-cloud_native_fullstack;script_version=v1.3.2;orchestrator_id=f27c4518-9ead-4488-bab0-b2cde9649669
      LD_PRELOAD:              /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
      DT_NETWORK_ZONE:         azure-us-east
    Mounts:
      /etc/ld.so.preload from oneagent-share (rw,path="ld.so.preload")
      /opt/dynatrace/oneagent-paas from oneagent-bin (rw)
      /var/lib/dynatrace/enrichment/dt_metadata.json from metadata-enrichment (rw,path="dt_metadata_tomcat10-container.json")
      /var/lib/dynatrace/enrichment/dt_metadata.properties from metadata-enrichment (rw,path="dt_metadata_tomcat10-container.properties")
      /var/lib/dynatrace/enrichment/endpoint from metadata-enrichment-endpoint (rw)
      /var/lib/dynatrace/oneagent/agent/config/container.conf from oneagent-share (rw,path="container_tomcat10-container.conf")
      /var/lib/dynatrace/oneagent/agent/customkeys/curl_options.conf from oneagent-share (rw,path="curl_options.conf")
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-lzdk6 (ro)​&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;If you DO see the init container and mounts, etc. but still no deep monitoring data, move on to step 3.&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Now would also be a good time to double-check for possible metadataEnrichment injection, but not Cloud Native Full Stack injection due to having a namespaceSelector defined at that level.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;If you do NOT see the init container or any of the mounts/environment variables needed, then,&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;validate that communication between the Dynatrace namespace/ pods and the kube-system namespace is functional. It's the Dynatrace Webhook that provides the mutating webhook that adds these items to the pods (see ingress docs above if necessary)&lt;/LI&gt;
&lt;LI&gt;and collect a Dynatrace Operator support archive before reaching out to Dynatrace Support:&amp;nbsp;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/troubleshooting#support-archive" target="_self"&gt;How to collect a Dynatrace Operator Support Archive.&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;It is essential to send the whole archive, and not to just send the logs. Configuration and diagnostic runtime information is also collected, and extremely valuable to speed up the investigation of your reported issue.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Depending on the health/status of the dynatrace-operator&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&lt;SUP&gt;[1]&lt;/SUP&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;init container, we may also require the logs from the relevant container:&lt;/LI&gt;
&lt;LI&gt;
&lt;PRE&gt;kubectl logs &amp;lt;App pod name&amp;gt; -n &amp;lt;App Pod Namespace&amp;gt; -c dynatrace-operator&lt;BR /&gt;ex.&lt;BR /&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default -c dynatrace-operator&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;H3 class="p-rich_text_section"&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H2 class="p-rich_text_section"&gt;Step 3 - Validate Processes within the Pod&lt;/H2&gt;
&lt;DIV class="p-rich_text_section"&gt;The first step of process validation within the pod is to&amp;nbsp;exec into the pod and look for logs within &lt;CODE&gt;/opt/dynatrace/oneagent-paas/log/&amp;lt;tech type, java, nginx, go, etc.&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;kubectl exec -it tomcat-10-deployment-5498c479d4-5hhjf -n default -- /bin/sh
# bash

root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# cd /opt/dynatrace/oneagent-paas/log/java/

root@tomcat-10-deployment-5498c479d4-5hhjf:/opt/dynatrace/oneagent-paas/log/java# ls
ruxitagent_tomcat_tomcat-_-deployment-__cloudNativeFullStack_8.0.log

root@tomcat-10-deployment-5498c479d4-5hhjf:/opt/dynatrace/oneagent-paas/log/java#​&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;If there&lt;STRONG&gt; are logs&lt;/STRONG&gt;, we most likely have a networking or config blocker issue and can learn about what is going on by reading the log files and reaching out to Dynatrace Support for assistance if needed.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;BR /&gt;If there &lt;STRONG&gt;are no logs&lt;/STRONG&gt;, then this usually means that there is no OneAgent library loading taking place. Still, we can double-check on that possibility using the "env" command to validate that LD_PRELOAD is set within the Pod's environment and not just being within the pod "describe":&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# env | grep LD_PRELOAD
LD_PRELOAD=/opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so​&lt;/LI-CODE&gt;&lt;BR /&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;It is easier to do this phase of the investigation with &lt;CODE&gt;ps aux&lt;/CODE&gt; available within the pod to find the process IDs but I know some images do not include the procps package so I will also provide a pure bash alternative.&lt;BR /&gt;&lt;BR /&gt;Now look for the above-mentioned library within your processes' loaded libraries memory addresses via the &lt;CODE&gt;/proc/&amp;lt;PID&amp;gt;/maps&lt;/CODE&gt; file within the Linux /proc files.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0   6060  2156 ?        Ss   Dec06   0:00 /bin/sh -c echo 'Hello from Kubernetes!' &amp;amp; catalina.s
root           8  0.2  1.6 7969628 273124 ?      Sl   Dec06  22:38 /opt/java/openjdk/bin/java -Djava.util.logging.config

// OR use the pure bash command:
root@tomcat-10-deployment-5498c479d4-5hhjf:/ find /proc/*[0-9]/cmdline -type f -print -exec cat {} \; -exec printf '\n\n' \;

/proc/1/cmdline
/bin/sh-cecho 'Hello from Kubernetes!' &amp;amp;
catalina.sh run

..........

/proc/8/cmdline
/opt/java/openjdk/bin/java-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager-Djdk.tls.ephemeralDHKeySize=2048-Djava.protocol.handler.pkgs=org.apache.catalina.webresources-Dorg.apache.catalina.security.SecurityListener.UMASK=0027--add-opens=java.base/java.lang=ALL-UNNAMED--add-opens=java.base/java.io=ALL-UNNAMED--add-opens=java.base/java.util=ALL-UNNAMED--add-opens=java.base/java.util.concurrent=ALL-UNNAMED--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED-classpath/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar-Dcatalina.base=/usr/local/tomcat-Dcatalina.home=/usr/local/tomcat-Djava.io.tmpdir=/usr/local/tomcat/temporg.apache.catalina.startup.Bootstrapstart​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once the app PID is identified, in this case the app is tomcat/ Java with a pid of 8, then we can use &lt;CODE&gt;/proc/8/maps&lt;/CODE&gt; to learn about what is loaded into the app:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# cat /proc/8/maps | grep oneagent
7f3b5781e000-7f3b5785a000 r--s 003af000 00:2e5 3893709                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.livedebugger.jar
7f3b5785a000-7f3b5789d000 r--s 0030d000 00:2e5 3893712                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.jar
7f3b64023000-7f3b64027000 r--s 00019000 00:2e5 3893716                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.8.jar
7f3b64027000-7f3b64029000 r--s 0000c000 00:2e5 3893719                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.11.jar
7f3b660f8000-7f3b6625e000 r--p 00000000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b6625e000-7f3b675b8000 r-xp 00166000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b675b8000-7f3b67af1000 r--p 014c0000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b67af1000-7f3b67bd3000 r--p 019f8000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b67bd3000-7f3b67bdd000 rw-p 01ada000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b69718000-7f3b69719000 r--s 00005000 00:2e5 3893718                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.17.jar
7f3b69736000-7f3b69741000 r--p 00000000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b69741000-7f3b697de000 r-xp 0000b000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b697de000-7f3b69821000 r--p 000a8000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b69821000-7f3b69827000 r--p 000ea000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b69827000-7f3b69828000 rw-p 000f0000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so&lt;/LI-CODE&gt;&lt;BR /&gt;Above, we can see both liboneagentproc within the file, which means we had OneAgent process injection/ file loading AND liboneagentjava, which is for OneAgent Java code module Injection/ loading.&lt;BR /&gt;&lt;BR /&gt;If you can see both types of OneAgent libraries loaded but still no logs visible in the expected location, then you can also use &lt;CODE&gt;/proc/PID/fd&lt;/CODE&gt; to find open file handles for the app process:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# ls -l /proc/8/fd | grep log
lrwx------ 1 root root 64 Dec 13 18:17 4 -&amp;gt; /opt/dynatrace/oneagent-paas/log/java/ruxitagent_tomcat_tomcat-_-deployment-__cloudNativeFullStack_8.0.log
l-wx------ 1 root root 64 Dec 13 18:17 65 -&amp;gt; /usr/local/tomcat/logs/catalina.2024-12-06.log
l-wx------ 1 root root 64 Dec 13 18:17 68 -&amp;gt; /usr/local/tomcat/logs/localhost_access_log.2024-12-06.txt​&lt;/LI-CODE&gt;&lt;BR /&gt;In this case, the OneAgent Java code module is file handle 4, and we can now see the path we would need to take to read the log if it was in a "non-standard location."&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;BR /&gt;Alternatively, you can print the OneAgent logs to stdout, aka kubectl log &amp;lt;pod name&amp;gt;, and prepare a Dynatrace support ticket by adding&amp;nbsp;the following environment variables within your pods deployment yaml file or the container env spec section of any deployment template you're using before restarting the deployment:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="44.44410134346128%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;Environment variable name&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Environment variable value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;DT_LOGLEVEL_PROC&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;config=debug,pgid=debug&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;DT_LOGCON_PROC&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;stdout&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;DT_LOGLEVELCON&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;info&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H1 class="p-rich_text_section"&gt;What's Next?&lt;/H1&gt;
&lt;DIV class="p-rich_text_section"&gt;If you've not been able to find the OneAgent logs in the container or find the OneAgent libraries within your processes, etc., then open a Dynatrace Support ticket with the following information collected:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="p-rich_text_section"&gt;A Dynatrace Operator Support archive.
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/troubleshooting#support-archive" target="_self"&gt;How to collect a Dynatrace Operator Support Archive.&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;It is essential to send the whole archive, and not to just send the logs. Configuration and diagnostic runtime information is also collected, and extremely valuable to speed up the investigation of your reported issue.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI class="p-rich_text_section"&gt;The logs from the pod itself, preferably with the above environment variables in place:
&lt;UL&gt;
&lt;LI class="p-rich_text_section"&gt;
&lt;PRE&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;And the dynatrace-operator&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&lt;SUP&gt;1]&lt;/SUP&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp; init container logs:&amp;nbsp;&lt;BR /&gt;
&lt;UL&gt;
&lt;LI class="p-rich_text_section"&gt;
&lt;PRE&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default -c dynatrace-operator&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;[1] Starting with Dynatrace Operator 1.4.0, the install-oneagent initcontainer was renamed the dynatrace-operator initcontainer. Please substitute commands as appropriate. IE.&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default -c dynatrace-operator&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
    <pubDate>Wed, 15 Oct 2025 14:22:50 GMT</pubDate>
    <dc:creator>ryan_korteway</dc:creator>
    <dc:date>2025-10-15T14:22:50Z</dc:date>
    <item>
      <title>Dynatrace Operator - Cloud Native Full Stack - Pod Injection Validation and Troubleshooting</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/ta-p/264697</link>
      <description>&lt;P&gt;&lt;LI-TOC indent="15" liststyle="disc" maxheadinglevel="2"&gt;&lt;/LI-TOC&gt;&lt;/P&gt;
&lt;H2&gt;&amp;nbsp;&lt;/H2&gt;
&lt;H1&gt;&lt;SPAN&gt;Summary&lt;/SPAN&gt;&lt;/H1&gt;
&lt;P&gt;&lt;SPAN&gt;This article is to help identify potential blockers to deep monitoring pod-contained apps within Kubernetes clusters.&lt;/SPAN&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Before we get started, we expect there to already be a Dynatrace Operator deployment in your cluster. If needed, &lt;A href="https://docs.dynatrace.com/docs/shortlink/installation-k8s-cloud-native-fs#installation-options" target="_self"&gt;see our documentation for deployment details&lt;/A&gt;&lt;A href="https://docs.dynatrace.com/docs/shortlink/installation-k8s-cloud-native-fs#installation-options&amp;nbsp;" target="_self"&gt;.&lt;/A&gt;&lt;/LI&gt;
&lt;LI&gt;You can learn more about controlling Pod Monitoring while using Dynatrace Operator Cloud Native Full Stack from our docs here:&amp;nbsp;&lt;A href="https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/guides/operation/annotate" target="_self"&gt;Configure monitoring for namespaces and pods&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;H1&gt;Troubleshooting Pod Injections&lt;/H1&gt;
&lt;H2&gt;Step 1 - Validate Namespace&lt;/H2&gt;
&lt;P&gt;The first step of Pod injection is adding labels to application namespaces. Namespace labels can be listed using:&lt;/P&gt;
&lt;PRE&gt;kubectl describe namespace &amp;lt;application namespace&amp;gt;&lt;/PRE&gt;
&lt;P&gt;&lt;BR /&gt;Look for the label: &lt;CODE&gt;dynakube.internal.dynatrace.com/instance&lt;/CODE&gt;&lt;/P&gt;
&lt;LI-CODE lang="java"&gt;C:\Users\ryan.korteway&amp;gt;kubectl describe ns default
Name:         default
Labels:       dynakube.internal.dynatrace.com/instance=sup-enablement-k8s-cnfs
Annotations:  &amp;lt;none&amp;gt;
Status:       Active&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If you DO see this label but no deep monitoring data, move on to step 2.&amp;nbsp;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;If you do NOT see this label, then,&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;validate that communication between the Dynatrace namespace / pods and the kube-system namespace is functional
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/ingest-from/setup-on-k8s/reference/network#ingress-traffic&amp;nbsp;" target="_self"&gt;See this page of Dynatrace Namespace Networking docs&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;Collect a Dynatrace Operator support archive before reaching out to Dynatrace Support.
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/troubleshooting#support-archive" target="_self"&gt;How to collect a Dynatrace Operator Support Archive.&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;It is essential to send the whole archive, and not to just send the logs. Configuration and diagnostic runtime information is also collected, and extremely valuable to speed up the investigation of your reported issue.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;Additionally, you can validate Namespace Labels within containerized process properties and tags dropdowns / pop-out menus within the Dynatrace UI:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alternative sensoring.png" style="width: 945px;"&gt;&lt;img src="https://community.dynatrace.com/t5/image/serverpage/image-id/25242iDF4A97DEBF1CEE68/image-size/large?v=v2&amp;amp;px=999" role="button" title="alternative sensoring.png" alt="alternative sensoring.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;DIV id="1733706463.644729" class="c-virtual_list__item" tabindex="0" role="listitem" aria-setsize="-1" data-qa="virtual-list-item" data-item-key="1733706463.644729"&gt;
&lt;DIV class="c-message_kit__background c-message_kit__background--hovered p-message_pane_message__message c-message_kit__message p-message_pane_message__message--last" role="presentation" data-qa="message_container" data-qa-unprocessed="false" data-qa-placeholder="false"&gt;
&lt;DIV class="c-message_kit__hover c-message_kit__hover--hovered" role="document" aria-roledescription="message" data-qa-hover="true"&gt;
&lt;DIV class="c-message_kit__actions c-message_kit__actions--above"&gt;
&lt;DIV class="c-message_kit__gutter"&gt;
&lt;DIV class="c-message_kit__gutter__right" role="presentation" data-qa="message_content"&gt;
&lt;DIV class="c-message_kit__blocks c-message_kit__blocks--rich_text"&gt;
&lt;DIV class="c-message__message_blocks c-message__message_blocks--rich_text" data-qa="message-text"&gt;
&lt;DIV class="p-block_kit_renderer" data-qa="block-kit-renderer"&gt;
&lt;DIV class="p-block_kit_renderer__block_wrapper p-block_kit_renderer__block_wrapper--first"&gt;
&lt;DIV class="p-rich_text_block" dir="auto"&gt;
&lt;H3 class="p-rich_text_section"&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H2 class="p-rich_text_section"&gt;Step 2 - Validate Pods&lt;/H2&gt;
&lt;DIV class="p-rich_text_section"&gt;The next step is to describe the pod and look for signs of pod-level injection from the Dynatrace Webhook pods.&lt;/DIV&gt;
&lt;PRE class="p-rich_text_section"&gt;kubectl describe pod tomcat-10-deployment-5498c479d4-5hhjf -n default&lt;/PRE&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;BR /&gt;Look for the &lt;CODE&gt;dynatrace-operator init container&lt;/CODE&gt;&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&lt;SUP&gt;[1]&lt;/SUP&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;being present, and if it finished successfully:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;Controlled By:  ReplicaSet/tomcat-10-deployment-5498c479d4
Init Containers:
   dynatrace-operator:
    Container ID:  containerd://0ba7ca10b2d0554566c60611da43d6feb310aff829e6313c76226b658bfda093
    Image:         public.ecr.aws/dynatrace/dynatrace-operator:v1.5.1
    Image ID:      public.ecr.aws/dynatrace/dynatrace-operator@sha256:4b0994d8bd1d4723760f793421959377de391600de74104913ef1b1905d986ae
    Port:            &amp;lt;none&amp;gt;
    Host Port:       &amp;lt;none&amp;gt;
    SeccompProfile:  RuntimeDefault
    Args:
      init
    State:          Terminated
      Reason:       Completed
      Exit Code:    0​&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;With the right configuration, such as having &lt;STRONG&gt;metadataEnrichment&lt;/STRONG&gt; enabled but a &lt;STRONG&gt;namespaceSelector&lt;/STRONG&gt; at the &lt;STRONG&gt;oneAgent cloudNativeFullStack&lt;/STRONG&gt; level, its possible to have an install-oneagent (operator version &amp;lt; 1.4.0) or dynatrace-operator (operator version &amp;gt; 1.4.0) init container but &lt;STRONG&gt;no&lt;/STRONG&gt; deep monitoring for the pods.&lt;BR /&gt;&lt;BR /&gt;As such, other key items to watch for are the &lt;CODE&gt;LD_PRELOAD&lt;/CODE&gt; environment variable and the volume mounts for &lt;CODE&gt;/opt/dynatrace/oneagent-paas&lt;/CODE&gt; volumes:&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;Containers:
  tomcat10-container:
    Container ID:  containerd://409633c542b9d1fa6b3e93231cc61f17a1ce4e12dd49a5c4156936338ec07de6
    Image:         tomcat:10
    Image ID:      docker.io/library/tomcat@sha256:0e763cfc66a42679d63132ceacfbf7082a219c0385ca75f85baf3294e76bacf7
    Port:          8080/TCP
    Host Port:     0/TCP
    Command:
      /bin/sh
      -c
      echo 'Hello from Kubernetes!' &amp;amp;
      catalina.sh run

    State:          Running
      Started:      Fri, 06 Dec 2024 12:53:02 -0500
    Ready:          True
    Restart Count:  0
    Environment:
      DT_CUSTOM_PROP:          cnfs_cluster location_us_east
      DT_RELEASE_STAGE:        cloudNativeFullStack
      DT_DEPLOYMENT_METADATA:  orchestration_tech=Operator-cloud_native_fullstack;script_version=v1.3.2;orchestrator_id=f27c4518-9ead-4488-bab0-b2cde9649669
      LD_PRELOAD:              /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
      DT_NETWORK_ZONE:         azure-us-east
    Mounts:
      /etc/ld.so.preload from oneagent-share (rw,path="ld.so.preload")
      /opt/dynatrace/oneagent-paas from oneagent-bin (rw)
      /var/lib/dynatrace/enrichment/dt_metadata.json from metadata-enrichment (rw,path="dt_metadata_tomcat10-container.json")
      /var/lib/dynatrace/enrichment/dt_metadata.properties from metadata-enrichment (rw,path="dt_metadata_tomcat10-container.properties")
      /var/lib/dynatrace/enrichment/endpoint from metadata-enrichment-endpoint (rw)
      /var/lib/dynatrace/oneagent/agent/config/container.conf from oneagent-share (rw,path="container_tomcat10-container.conf")
      /var/lib/dynatrace/oneagent/agent/customkeys/curl_options.conf from oneagent-share (rw,path="curl_options.conf")
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-lzdk6 (ro)​&lt;/LI-CODE&gt;
&lt;P&gt;&lt;STRONG&gt;&lt;BR /&gt;If you DO see the init container and mounts, etc. but still no deep monitoring data, move on to step 3.&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;Now would also be a good time to double-check for possible metadataEnrichment injection, but not Cloud Native Full Stack injection due to having a namespaceSelector defined at that level.&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;STRONG&gt;If you do NOT see the init container or any of the mounts/environment variables needed, then,&lt;/STRONG&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;validate that communication between the Dynatrace namespace/ pods and the kube-system namespace is functional. It's the Dynatrace Webhook that provides the mutating webhook that adds these items to the pods (see ingress docs above if necessary)&lt;/LI&gt;
&lt;LI&gt;and collect a Dynatrace Operator support archive before reaching out to Dynatrace Support:&amp;nbsp;
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/troubleshooting#support-archive" target="_self"&gt;How to collect a Dynatrace Operator Support Archive.&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;It is essential to send the whole archive, and not to just send the logs. Configuration and diagnostic runtime information is also collected, and extremely valuable to speed up the investigation of your reported issue.&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;Depending on the health/status of the dynatrace-operator&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&lt;SUP&gt;[1]&lt;/SUP&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp;init container, we may also require the logs from the relevant container:&lt;/LI&gt;
&lt;LI&gt;
&lt;PRE&gt;kubectl logs &amp;lt;App pod name&amp;gt; -n &amp;lt;App Pod Namespace&amp;gt; -c dynatrace-operator&lt;BR /&gt;ex.&lt;BR /&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default -c dynatrace-operator&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;H3 class="p-rich_text_section"&gt;&amp;nbsp;&lt;/H3&gt;
&lt;H2 class="p-rich_text_section"&gt;Step 3 - Validate Processes within the Pod&lt;/H2&gt;
&lt;DIV class="p-rich_text_section"&gt;The first step of process validation within the pod is to&amp;nbsp;exec into the pod and look for logs within &lt;CODE&gt;/opt/dynatrace/oneagent-paas/log/&amp;lt;tech type, java, nginx, go, etc.&amp;gt;&lt;/CODE&gt;&lt;BR /&gt;&lt;LI-CODE lang="markup"&gt;kubectl exec -it tomcat-10-deployment-5498c479d4-5hhjf -n default -- /bin/sh
# bash

root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# cd /opt/dynatrace/oneagent-paas/log/java/

root@tomcat-10-deployment-5498c479d4-5hhjf:/opt/dynatrace/oneagent-paas/log/java# ls
ruxitagent_tomcat_tomcat-_-deployment-__cloudNativeFullStack_8.0.log

root@tomcat-10-deployment-5498c479d4-5hhjf:/opt/dynatrace/oneagent-paas/log/java#​&lt;/LI-CODE&gt;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;If there&lt;STRONG&gt; are logs&lt;/STRONG&gt;, we most likely have a networking or config blocker issue and can learn about what is going on by reading the log files and reaching out to Dynatrace Support for assistance if needed.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;BR /&gt;If there &lt;STRONG&gt;are no logs&lt;/STRONG&gt;, then this usually means that there is no OneAgent library loading taking place. Still, we can double-check on that possibility using the "env" command to validate that LD_PRELOAD is set within the Pod's environment and not just being within the pod "describe":&amp;nbsp;&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# env | grep LD_PRELOAD
LD_PRELOAD=/opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so​&lt;/LI-CODE&gt;&lt;BR /&gt;&lt;STRONG&gt;Note:&amp;nbsp;&lt;/STRONG&gt;It is easier to do this phase of the investigation with &lt;CODE&gt;ps aux&lt;/CODE&gt; available within the pod to find the process IDs but I know some images do not include the procps package so I will also provide a pure bash alternative.&lt;BR /&gt;&lt;BR /&gt;Now look for the above-mentioned library within your processes' loaded libraries memory addresses via the &lt;CODE&gt;/proc/&amp;lt;PID&amp;gt;/maps&lt;/CODE&gt; file within the Linux /proc files.&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# ps aux
USER         PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME COMMAND
root           1  0.0  0.0   6060  2156 ?        Ss   Dec06   0:00 /bin/sh -c echo 'Hello from Kubernetes!' &amp;amp; catalina.s
root           8  0.2  1.6 7969628 273124 ?      Sl   Dec06  22:38 /opt/java/openjdk/bin/java -Djava.util.logging.config

// OR use the pure bash command:
root@tomcat-10-deployment-5498c479d4-5hhjf:/ find /proc/*[0-9]/cmdline -type f -print -exec cat {} \; -exec printf '\n\n' \;

/proc/1/cmdline
/bin/sh-cecho 'Hello from Kubernetes!' &amp;amp;
catalina.sh run

..........

/proc/8/cmdline
/opt/java/openjdk/bin/java-Djava.util.logging.config.file=/usr/local/tomcat/conf/logging.properties-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager-Djdk.tls.ephemeralDHKeySize=2048-Djava.protocol.handler.pkgs=org.apache.catalina.webresources-Dorg.apache.catalina.security.SecurityListener.UMASK=0027--add-opens=java.base/java.lang=ALL-UNNAMED--add-opens=java.base/java.io=ALL-UNNAMED--add-opens=java.base/java.util=ALL-UNNAMED--add-opens=java.base/java.util.concurrent=ALL-UNNAMED--add-opens=java.rmi/sun.rmi.transport=ALL-UNNAMED-classpath/usr/local/tomcat/bin/bootstrap.jar:/usr/local/tomcat/bin/tomcat-juli.jar-Dcatalina.base=/usr/local/tomcat-Dcatalina.home=/usr/local/tomcat-Djava.io.tmpdir=/usr/local/tomcat/temporg.apache.catalina.startup.Bootstrapstart​&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Once the app PID is identified, in this case the app is tomcat/ Java with a pid of 8, then we can use &lt;CODE&gt;/proc/8/maps&lt;/CODE&gt; to learn about what is loaded into the app:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# cat /proc/8/maps | grep oneagent
7f3b5781e000-7f3b5785a000 r--s 003af000 00:2e5 3893709                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.livedebugger.jar
7f3b5785a000-7f3b5789d000 r--s 0030d000 00:2e5 3893712                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.jar
7f3b64023000-7f3b64027000 r--s 00019000 00:2e5 3893716                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.8.jar
7f3b64027000-7f3b64029000 r--s 0000c000 00:2e5 3893719                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.11.jar
7f3b660f8000-7f3b6625e000 r--p 00000000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b6625e000-7f3b675b8000 r-xp 00166000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b675b8000-7f3b67af1000 r--p 014c0000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b67af1000-7f3b67bd3000 r--p 019f8000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b67bd3000-7f3b67bdd000 rw-p 01ada000 00:2e5 3897447                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/linux-x86-64/liboneagentjava.so
7f3b69718000-7f3b69719000 r--s 00005000 00:2e5 3893718                   /opt/dynatrace/oneagent-paas/agent/bin/1.306.0.20241128-144422/any/java/oneagentjava.17.jar
7f3b69736000-7f3b69741000 r--p 00000000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b69741000-7f3b697de000 r-xp 0000b000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b697de000-7f3b69821000 r--p 000a8000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b69821000-7f3b69827000 r--p 000ea000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so
7f3b69827000-7f3b69828000 rw-p 000f0000 00:2e5 3900038                   /opt/dynatrace/oneagent-paas/agent/lib64/liboneagentproc.so&lt;/LI-CODE&gt;&lt;BR /&gt;Above, we can see both liboneagentproc within the file, which means we had OneAgent process injection/ file loading AND liboneagentjava, which is for OneAgent Java code module Injection/ loading.&lt;BR /&gt;&lt;BR /&gt;If you can see both types of OneAgent libraries loaded but still no logs visible in the expected location, then you can also use &lt;CODE&gt;/proc/PID/fd&lt;/CODE&gt; to find open file handles for the app process:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;LI-CODE lang="markup"&gt;root@tomcat-10-deployment-5498c479d4-5hhjf:/usr/local/tomcat# ls -l /proc/8/fd | grep log
lrwx------ 1 root root 64 Dec 13 18:17 4 -&amp;gt; /opt/dynatrace/oneagent-paas/log/java/ruxitagent_tomcat_tomcat-_-deployment-__cloudNativeFullStack_8.0.log
l-wx------ 1 root root 64 Dec 13 18:17 65 -&amp;gt; /usr/local/tomcat/logs/catalina.2024-12-06.log
l-wx------ 1 root root 64 Dec 13 18:17 68 -&amp;gt; /usr/local/tomcat/logs/localhost_access_log.2024-12-06.txt​&lt;/LI-CODE&gt;&lt;BR /&gt;In this case, the OneAgent Java code module is file handle 4, and we can now see the path we would need to take to read the log if it was in a "non-standard location."&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;&lt;BR /&gt;Alternatively, you can print the OneAgent logs to stdout, aka kubectl log &amp;lt;pod name&amp;gt;, and prepare a Dynatrace support ticket by adding&amp;nbsp;the following environment variables within your pods deployment yaml file or the container env spec section of any deployment template you're using before restarting the deployment:&lt;/DIV&gt;
&lt;DIV class="p-rich_text_section"&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;TABLE border="1" width="44.44410134346128%"&gt;
&lt;TBODY&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;Environment variable name&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;Environment variable value&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;DT_LOGLEVEL_PROC&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;config=debug,pgid=debug&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;DT_LOGCON_PROC&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;stdout&lt;/TD&gt;
&lt;/TR&gt;
&lt;TR&gt;
&lt;TD width="33.333333333333336%"&gt;DT_LOGLEVELCON&amp;nbsp;&lt;/TD&gt;
&lt;TD width="33.333333333333336%"&gt;info&lt;/TD&gt;
&lt;/TR&gt;
&lt;/TBODY&gt;
&lt;/TABLE&gt;
&lt;DIV class="p-rich_text_section"&gt;&amp;nbsp;&lt;/DIV&gt;
&lt;H1 class="p-rich_text_section"&gt;What's Next?&lt;/H1&gt;
&lt;DIV class="p-rich_text_section"&gt;If you've not been able to find the OneAgent logs in the container or find the OneAgent libraries within your processes, etc., then open a Dynatrace Support ticket with the following information collected:&lt;/DIV&gt;
&lt;UL&gt;
&lt;LI class="p-rich_text_section"&gt;A Dynatrace Operator Support archive.
&lt;UL&gt;
&lt;LI&gt;&lt;A href="https://docs.dynatrace.com/docs/setup-and-configuration/setup-on-k8s/installation/troubleshooting#support-archive" target="_self"&gt;How to collect a Dynatrace Operator Support Archive.&lt;/A&gt;&amp;nbsp;&lt;/LI&gt;
&lt;LI&gt;It is essential to send the whole archive, and not to just send the logs. Configuration and diagnostic runtime information is also collected, and extremely valuable to speed up the investigation of your reported issue.&amp;nbsp;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI class="p-rich_text_section"&gt;The logs from the pod itself, preferably with the above environment variables in place:
&lt;UL&gt;
&lt;LI class="p-rich_text_section"&gt;
&lt;PRE&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;LI&gt;And the dynatrace-operator&lt;FONT color="#0000FF"&gt;&lt;SPAN&gt;&lt;SUP&gt;1]&lt;/SUP&gt;&lt;/SPAN&gt;&lt;/FONT&gt;&amp;nbsp; init container logs:&amp;nbsp;&lt;BR /&gt;
&lt;UL&gt;
&lt;LI class="p-rich_text_section"&gt;
&lt;PRE&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default -c dynatrace-operator&lt;/PRE&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;/LI&gt;
&lt;/UL&gt;
&lt;P&gt;&lt;FONT color="#0000FF"&gt;[1] Starting with Dynatrace Operator 1.4.0, the install-oneagent initcontainer was renamed the dynatrace-operator initcontainer. Please substitute commands as appropriate. IE.&lt;/FONT&gt;&lt;/P&gt;
&lt;UL&gt;
&lt;LI&gt;&lt;CODE&gt;kubectl logs tomcat-10-deployment-5498c479d4-5hhjf -n default -c dynatrace-operator&lt;/CODE&gt;&lt;/LI&gt;
&lt;/UL&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;
&lt;/DIV&gt;</description>
      <pubDate>Wed, 15 Oct 2025 14:22:50 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/ta-p/264697</guid>
      <dc:creator>ryan_korteway</dc:creator>
      <dc:date>2025-10-15T14:22:50Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Operator - Cloud Native Full Stack - Pod Injection Validation and Troubleshooting</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/270522#M855</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/732"&gt;@ryan_korteway&lt;/a&gt;&amp;nbsp;thank you for this right up. The 2nd link is invalid (DT Documentation about pod and namespace annotations). I'm currently looking through this because I've noticed that 1 cluster of ours has label&amp;nbsp;&lt;STRONG&gt;dynakube.internal.dynatrace.com/instance&amp;nbsp;&lt;/STRONG&gt;in our namespaces while others do not. If the label does not exist in a namespace does that mean no dynatrace agent is being installed (as an init container) into their pod? I'm trying to understand what we are missing by not having this label in our namespaces.&lt;/P&gt;</description>
      <pubDate>Thu, 20 Feb 2025 12:11:00 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/270522#M855</guid>
      <dc:creator>sivart_89</dc:creator>
      <dc:date>2025-02-20T12:11:00Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Operator - Cloud Native Full Stack - Pod Injection Validation and Troubleshooting</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/270971#M860</link>
      <description>&lt;P&gt;Hello Sivart,&lt;BR /&gt;&lt;BR /&gt;Not a problem at all on the write up and thank you for the heads up on the broken doc link which I will be fixing right after this comment.&amp;nbsp;&lt;BR /&gt;&lt;BR /&gt;So my understanding is if your namespace is missing that annotation, then the namespace and thus all of the pods within it are not being watched for pod starts and therefore will not have any pod injections.&lt;BR /&gt;&lt;BR /&gt;Sounds to me like you may have some namespaceSelectors set up within the dynakube yaml files for some of your clusters / DT operator deployments.&lt;BR /&gt;&lt;BR /&gt;It may also warrant checking the dynakube yaml file for any dynatrace operator config annotations that disable automatic monitoring for all namespaces within the cluster etc.&lt;BR /&gt;&lt;BR /&gt;Please let me know if you have any further questions or concerns.&lt;/P&gt;</description>
      <pubDate>Tue, 25 Feb 2025 16:26:09 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/270971#M860</guid>
      <dc:creator>ryan_korteway</dc:creator>
      <dc:date>2025-02-25T16:26:09Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Operator - Cloud Native Full Stack - Pod Injection Validation and Troubleshooting</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/288487#M1009</link>
      <description>&lt;P&gt;&lt;a href="https://community.dynatrace.com/t5/user/viewprofilepage/user-id/732"&gt;@ryan_korteway&lt;/a&gt;&amp;nbsp;Thank you for this informative and detailed write up! I was struggling to understand why my pods were not getting the injection and instrumentation. It turns out we had a namespaceSelector value set in our Dynakube yaml to disable injection on our default/system labeled namespaces &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Oct 2025 15:44:39 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/288487#M1009</guid>
      <dc:creator>steven_v</dc:creator>
      <dc:date>2025-10-25T15:44:39Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Operator - Cloud Native Full Stack - Pod Injection Validation and Troubleshooting</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/288488#M1010</link>
      <description>&lt;P&gt;Have you tried to automate this process with something in the pipeline or on the DT side with a Workflow? Seems like a great opportunity to automate this validation so we don't always have to check every time there's a deployment to k8s.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Oct 2025 15:49:40 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/288488#M1010</guid>
      <dc:creator>StrangerThing</dc:creator>
      <dc:date>2025-10-25T15:49:40Z</dc:date>
    </item>
    <item>
      <title>Re: Dynatrace Operator - Cloud Native Full Stack - Pod Injection Validation and Troubleshooting</title>
      <link>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/288489#M1011</link>
      <description>&lt;P&gt;I have not personally but that's a fantastic idea to explore. The k8s connector sounds like something cool we can look at:&lt;/P&gt;&lt;P&gt;&lt;A href="https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/actions/kubernetes-automation/get-started-with-kubernetes-workflows" target="_blank"&gt;https://docs.dynatrace.com/docs/analyze-explore-automate/workflows/actions/kubernetes-automation/get-started-with-kubernetes-workflows&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Sat, 25 Oct 2025 17:43:46 GMT</pubDate>
      <guid>https://community.dynatrace.com/t5/Troubleshooting/Dynatrace-Operator-Cloud-Native-Full-Stack-Pod-Injection/tac-p/288489#M1011</guid>
      <dc:creator>steven_v</dc:creator>
      <dc:date>2025-10-25T17:43:46Z</dc:date>
    </item>
  </channel>
</rss>

